Solution (source code)

= Solution

If $P=P^T=P^2$ and $\operatorname{tr}P=1$, the spectral theorem gives <eigenvalues> $1,0,0$. Thus $P$ is orthogonal projection onto a line and
$$
P=XX^T
$$
for a unit <vector> $X$; the only choices are $X$ and $-X$.

The smooth map $\pi:S^2\to S_3(\mathbb R)$, $X\mapsto XX^T$, has image $Gr_{1,3}(\mathbb R)$ and fibers $\{X,-X\}$. Near $X_0$, restrict to the hemisphere $X\cdot X_0>0$; there $\pi$ is one-to-one and has smooth inverse obtained by choosing the positive local unit <eigenvector>. Combining this with a chart of $S^2$ supplies two-dimensional local parametrizations. Hence $Gr_{1,3}(\mathbb R)$ is a two-dimensional submanifold, diffeomorphic to $\mathbb RP^2$.