# What is the square matrix $A$ equal to if $A=A^2$

The question is:
If A is a square matrix such that $A^2=A$ then $A^n =A$ for all natural numbers $n$ greater than one. What is $A$ if $A \ne 0$ and $A \ne I$.

I figured out an answer but I can't tell if that's the only answer. Let's say that $a_{kk}$ is a value in $A$. Every value in $A$ is $0$ except for $a_{kk}$ and $a_{00}$, they're $1$. I haven't gotten this answer mathematically.

I've tried a few approaches but ended up with the identity matrix.

• Hint: If $A^2=A$, then what follows about the eigenvalues? – celtschk Nov 12 '16 at 21:30
• It would be very good if you could prove that is necessary (sufficiency should be trivial). – Jacob Wakem Nov 12 '16 at 21:34
• I have no idea, haven't learned about eigenvalues yet. @celtschk – E.Bob Nov 12 '16 at 21:35
• This question (find idempotent matrices) is treated in (en.wikipedia.org/wiki/Idempotent_matrix) – Jean Marie Nov 12 '16 at 21:37
• There are maaany such matrices and there is no simple way of describing their entries (in particular, their entries can be different from 0 and 1) – Mariano Suárez-Álvarez Nov 12 '16 at 21:38

## 2 Answers

Perhaps one more example, besides $A=0$ and $A=I$ may be insightful: take the block matrix $$A=\begin{pmatrix} I & 0 \cr 0 & 0 \end{pmatrix}$$ Of course, $A=A^2$, but $A\neq 0,I$. The (square) blocks can be of any size, so we obtain several examples. Up to similarity, these are the only ones, too. See "canonical forms" in the wikipedia article.

• This is not very different from the example the OP has found by him/her self. – Jean Marie Nov 12 '16 at 21:41
• @JeanMarie Yes, indeed. But since it said" I haven't gotten this answer mathematically", I wanted to give a clarification. In addition I pointed out that all projection matrices are similar to these. – Dietrich Burde Nov 12 '16 at 21:44
• You are right, because an idempotent matrix is diagonalizable, and that its eigenvalues are $0$ or $1$. – Jean Marie Nov 12 '16 at 21:52

Such a matrix is called idempotent. Here are some examples and properties.