Possible values of $\det \left( A \right)$ and $\text{rank}\left( {{A_{3 \times 3}}} \right)$ of an ${A_{n \times n}}$ matrix for which $A A = A$? What are all the possible values of $\det \left( A \right)$ and $\operatorname{rank}\left( {{A_{3 \times 3}}} \right)$ of an ${A_{n \times n}}$ matrix for which $A A = A$?
It looks easy but I noticed that this not only applies for all the identity matrices ${I_n}$ but also for all the zero matrices ${O_n}$.
We are looking for all the matrices for which
$$A A = A$$
$$A A - A = O$$
$$A A - A {I_n} = O$$
$$A \left( {A - {I_n}} \right) = O$$
So it seems that $A = O$ or $A = {I_n}$ are the only ones.
Then we can conclude that since both of these matrices are already in the row echelon form, their determinans well be equal to the product of the values on their diagonals which are 
$$\det \left( {{O_{n \times n}}} \right) = \prod\limits_{}^n 0  = 0$$
$$\det \left( {{E_n}} \right) = \prod\limits_{}^n 1  = 1$$
The rank, I suppose, can only be
$$\operatorname{rank}\left( {{O_{3 \times 3}}} \right) = 0,$$
$$\operatorname{rank}\left( {{I_{3 \times 3}}} \right) = 3.$$
Are there any matrices which I have missed? It doesn't seem right that there are really only these two.
 A: You can't use $A(A - I_n) = 0$ to conclude that $A=0, A=I_n$ are the only solutions. In algebraic terms, the ring of matrices has zero divisors, e.g. there are non-zero $A$ and $B$ so that $AB = 0$.
You can however conclude that:
$$
  AA = A 
\\ \Rightarrow det(AA) = det(A)
\\ \Rightarrow det(A)det(A) = det(A)
$$
So that either $det(A) = 0$ or $det(A) = 1$.
To explore the rank question, consider the matrix $A$ which has a $1$ in the upper-right position, and $0$ everywhere else.
A: Use the fact that determinant is multiplicative:
If $A^2 = A$, then $\det(A^2) = \det(A)$, but $\det(A^2) = \det(A)^2$, so this equation gives us $\det(A)^2 = \det(A) \implies \det(A) = 0 \text{ or } \det(A) = 1$. This holds regardless of the value of $n$.
You're right that such a matrix must satisfy the equation $A^2 - A = 0$, or in other words its minimal polynomial is either $A$, $A-I$, or $A^2 - A$.
If the minimal polynomial is $A$, then the matrix is the zero matrix and has rank $0$.
If the minimal polynomial is $A-I$ then the matrix is the identity matrix, which has rank $3$.
Lastly, if the minimal polynomial is $A^2 - A$, then $A$ is diagonalizable because the roots of this polynomial are distinct. Then since all eigenvalues of $A$ are either $0$ or $1$, $A$ has Jordan form a diagonal matrix with diagonal entries $0$ and $1$. They're not all $0$ and not all $1$, otherwise we're in one of the above cases. But note that any other combination results in a nonzero, nonidentity matrix satisfying $A^2 = A$, so in this case the rank can be either $1$ or $2$.
Thus there is no restriction on the rank of $3\times3$ matrices $A$ such that $A^2 = A$.
A: if $A \neq I_n$ then $det(A)=0$ because let $B=A-I_n\neq 0$ $AB=0$ so(1) $A$ isn't invertible.
(1) : if $A$ invertible then $A^{-1}AB=0$ so $B=0$ impossible !
the rank can be, $0...n$ : get $A=diag(1,..,1,0,..,0)$
