$AA^T =A$, what can you say about the rank of $A$? $AA^T =A$, what can you say about the rank of $A$?

Interview question, and I have no idea. The closest thing I can relate to is the inverse. But that's not the case here.

Robert Israel has already given the answer to the question asked—the rank can be any nonnegative integer up to the dimension of the matrix. However I wanted to point out that one can say a lot more: note that
$$
A^T = (AA^T)^T = (A^T)^TA^T = AA^T = A,
$$
and so $A$ symmetric. In particular, we now know that $A^2=A$ and so $A^2-A=0$, which means that the minimal polynomial of $A$ divides $t^2-t$. This tells a lot about the matrix $A$ (that it's diagonalizable and that its eiegnvalues can only be $0$ or $1$), and ultimately says that it is a projection matrix.
