TITLE: if rank(A)=trace(A)=1 than A is a projection
QUESTION [6 upvotes]: Let A be a complex square matrix. Suppose that rank(A)=trace(A)=1. Prove that A is a projection. 
I have no idea how to prove it, so will be thankful for any help.

REPLY [6 votes]: Rank 1 matrices have the form $A=vw^T$. Note that $\operatorname{tr}(vw^T)=w^Tv$. Therefore $$A^2=vw^Tvw^T=v\cdot 1\cdot w^T=A.$$

REPLY [4 votes]: Hint: Choose a basis containing a vector in the image of $A$, and write down what form the matrix must take in that basis. Then see what $A^2$ looks like.

REPLY [3 votes]: If $\mathrm{rank}(A)=1$ then by the rank nullity theorem $\dim\ker A=n-1$ so let $(e_1,\ldots,e_{n-1})$ a basis for $\ker A$ which we complete to $\mathcal B=(e_1,\ldots,e_{n-1},v)$ a basis to the space and the similar matrix to $A$ written in the basis $\mathcal B$ is
$$B=\left(\begin{matrix}\\
0&0&\cdots&a_1\\
\vdots&&&a_{n-1}\\
0&&\cdots&1
\end{matrix}\right)$$
with $Bv=a_1 e_1+\cdots+a_{n-1}e_{n-1}+v$ since $\mathrm{tr}(B)=\mathrm{tr}(A)=1$ and we verify easily that $B^2=B$ so $B$ and then $A$ is a projection.