Diffeomorphism between $\mathbb{P}^n$ and the submanifold of $\mathbb{R}^{(n+1)^2}$ consisting of certain matrices? Let $\mathbb{P}^n$ denote the set of all lines through the origin in the coordinates space $\mathbb{R}^{n+1}$. Define a function$$q: \mathbb{R}^{n+1} - \{0\} \to \mathbb{P}^n$$ by $q(x) = \mathbb{R}x =$ line through $x$. How do I see that the functions$$f_{ij}(\mathbb{R}x) = x_ix_j/\sum x_k^2$$define a diffeomorphism between $\mathbb{P}^n$ and the submanifold of $\mathbb{R}^{(n+1)^2}$ consisting of all symmetric $(n+1) \times (n+1)$ matrices $A$ of trace $1$ satisfying $A^2 = A$?
 A: The key point is that is that a real symmetric matrix $a$ can be diagonalized in an orthonormal basis.
In that orthonormal basis the matrix $B=P^{-1}AP$ will be diagonal with diagonal elements $b_{ii}$ equal to $0$ or $1$, since $B^2=B$.
The condition $Tr(B)=1$ implies that only one of those diagonal entries is $1$, the others being $0$.
Hence $A$ is the matrix of the orthogonal projection of $\mathbb{R}^{n+1}$ onto the vector line $L=Im(A)=A(\mathbb{R}^{n+1})$ along the hyperplane $H=ker(A)$ .
Well,  that line $L$ is the line $[L]\in \mathbb P^n(\mathbb R)$ associated to $A$ !
A: $f$ is homogeneous and the denominator is never zero, so it gives a well-defined function on $\mathbb{P}^n$. It is clear that a matrix $A$ in the image of $f$ has trace $1$, is symmetric, and the fact that $A^2 = A$ is an easy algebraic verification. In the coordinate patches given here, away from, for example, $x_{n+1} = 0$, the map is given locally as rational functions without poles in $x_1$, $x_2$, $\dots$, $x_n$, so is smooth.
Conversely, given such a matrix, on the coordinate patch, for example, $x_{n+1} \neq 0$, we can retrieve what $x_i/x_{n+1}$ by dividing the $x_ix_{n+1}/|x|^2$ term by the $x_{n+1}^2/|x|^2$ term, and then we can map it to$$\left[{{x_1}\over{x_{n+1}}}, \dots,\, {{x_n}\over{x_{n+1}}},\,1\right].$$Composing it with the coordinate patch makes it clear this is a smooth map.
Finally, it remains to show bijectivity. It is a well-known fact from linear algebra that symmetric idempotent operators are precisely the orthogonal projections, and their rank is their trace. So our set of matrices is precisely orthogonal projections onto one-dimensional subspaces, and we can check that in fact the orthogonal projection must be onto the line through $(x_1, \dots, x_{n+1})$, since each row/column is linearly dependent with that vector. So we have a smooth map with smooth two-sided inverse, and are hence done.
