General form for a $3\times 3$ orthogonal projection Call a matrix $P\in M_n(\mathbb{C})$ to be an orthogonal projection if $P=P^*=P^2$. I need to know the general form of such a matrix when $n=3$ for some brute force calculations. Is there a place where this has been worked out explicitly? A reference would be welcome. Thank you. (I googled but couldn't find a good source.)
 A: Orthogonal projections are unitarily diagonalisable and their eigenvalues are either $1$ or $0$. Therefore, when $n=3$, $P$ must assume one of the following four forms:
$$
0,\ uu^\ast,\ I-uu^\ast,\ I
$$
where $u$ denotes a unit vector. The matrix traces (and also the ranks) of these four forms are $0, 1, 2, 3$ respectively. So, if $P\ne0,\,I$, you may first calculate the trace of $P$ to determine whether $P=uu^\ast$ or $P=I-uu^\ast$.
A: $P=U\:\text{diag}(p_1,p_2,p_3)\:U^*$ where $p_i\in 0,1$ and $U$ is unitary.
EDIT 1. Moreover, for every unitary $n\times n$ matrix $U$, there is a unique hermitian matrix $H$ s.t. $U=(iI_n+H)(iI_n-H)^{-1}$. Note that, when $n=3$,  $H$ depends on $9$ real parameters: $H=\begin{pmatrix}a_1&a_2+ia_3&a_4+ia_5\\a_2-ia_3&a_6&a_7+ia_8\\a_4-ia_5&a_7-ia_8&a_9\end{pmatrix}$.
EDIT 2. I just read the user1551's answer which is, as usual, perfect. His case $uu^*$ corresponds to $P=U\;diag(0,0,1)\;U^*$ where $U=\begin{pmatrix}Q_{2,2}&c\\r&a\end{pmatrix}$, that is $P=\begin{pmatrix}cc^*&\bar{a}c\\ac^*&|a|^2\end{pmatrix}=uu^*$ where $u=[c,a]^T$ has modulus $1$.
In fact the set of orthogonal projectors is a REAL algebraic set of dimension $4$; indeed $u\in S^5\subset \mathbb{R}^6$ and $(e^{i\theta}u)(e^{i\theta}u)^*=uu^*$.
