Assistance with idempotent matrices I am taking linear algebra for the first time and am struggling with the concept of idempotent matrices. I know that $A = A^2$ is the concept behind it, but I can't seem to understand HOW one would find the entries, and the explanations given confused me quite a lot. I was hoping someone could give me the gist of this concept and point me in the right direction.
For example, I am faced with the question of "Find all $2\times 2$ matrices such that $A^2=A$"
Currently, I know that with the matrix $A = \begin{bmatrix}a&b\\c&d\end{bmatrix}$ that:
$a = a^2 + bc\\
b = ab + bd\\
c = ca + cd\\
d = bc + d^2$
but I'm now unsure of how to determine entries off of that.
 A: Consider the system
$$a = a^2 + bc \tag{1}$$
$$b = ab + bd \tag{2}$$
$$c = ca + cd \tag{3}$$
$$d = bc + d^2 \tag{4}$$
Then, $(1) - (4)$ produces
$$a - d = a^2 - d^2 = (a - d)(a + d),$$
so $a = d$ or $a + d = 1$.
Assume, as one possible case, $a + d = 1$. Note that this implies $(2)$ and $(3)$ are automatically satisfied. As expected, if you substitute $d = 1 - a$ into $(4)$, you just get back $(1)$, so we now have only two equations (in this case):
\begin{align*}
bc &= a - a^2 \\
d &= 1 - a.
\end{align*}
We should let $a$ be a free variable; no matter what value $a$ takes, there will always be a solution, from which we can uniquely determine $d$. If $a - a^2 \neq 0$, then we can also let $b$ be a free variable, with the caveat that $b \neq 0$, and $c = \frac{a - a^2}{b}$. This produces a family of solutions:
$$\fbox{$\begin{pmatrix}
a & b \\
\frac{a - a^2}{b} & 1 - a
\end{pmatrix}, \qquad a, b \in \Bbb{R}, \quad b \neq 0$}.$$
If $a - a^2 = 0$, i.e. $a = 0$ or $a = 1$ (and $d = 1$ or $d = 0$ respectively), then we have to be more careful. We would have two cases: $b = 0$ or $c = 0$. This gives us four families of solutions (which, as you should verify, are all solutions:
$$\fbox{$\begin{pmatrix}
1 & b \\
0 & 0
\end{pmatrix}, 
\begin{pmatrix}
1 & 0 \\
c & 0
\end{pmatrix},
\begin{pmatrix}
0 & b \\
0 & 1
\end{pmatrix}, 
\begin{pmatrix}
0 & 0 \\
c & 1
\end{pmatrix}, \qquad b, c \in \Bbb{R}$}.$$
This exhausts all the cases where $a + d = 1$. Otherwise, $a = d$. Then $(2)$ becomes
$$b = 2ab$$
i.e. $b = 0$ or $a = d = \frac{1}{2}$. Since $a = d = \frac{1}{2}$ is covered by the $a + d = 1$ case, we dismiss it. So, we assume $b = 0$. Similar analysis of $(3)$ shows us that $c = 0$. Hence, $(1)$ and $(4)$, along with our assumption that $a = d$, tells us that $a = d = 0$ or $a = d = 1$. That is, we have just two remaining solutions:
$$\fbox{$\begin{pmatrix}
0 & 0 \\
0 & 0
\end{pmatrix},
\begin{pmatrix}
1 & 0 \\
0 & 1
\end{pmatrix}$},$$
i.e. the zero and identity matrices.
A: Since $A$ is $2\times2$, its rank can only be zero, one or two. If the rank is zero, then $A=0$ and it is idempotent; if $A$ is rank-two, it is nonsingular and hence $A^2=A$ if and only if $A=I_2$.
The only interesting case is $\operatorname{rank}(A)=1$. In this case $A=uv^T$ for some nonzero vectors $u$ and $v$. Thus $A^2=uv^Tuv^T=u(v^Tu)v=(v^Tu)uv^T=(v^Tu)A$, and $A$ is idempotent iff $v^Tu=1$. (The quantity $v^Tu$ is actually the trace of $A$.) Let $u=(x,w)^T$ and $v=(y,z)^T$. Then $v^Tu=xy+zw$ and
$$
A=uv^T=\pmatrix{xy&xz\\ wy&wz}.
$$
Now there are two mutually exclusive scenarios:

*

*If $w=0$, then $v^Tu=1$ iff $xy=1$. Hence $x\ne0$ and $A=\pmatrix{1&xz\\ 0&0}$. Since $z$ is not constrained, $A$ can be parametrised as $\pmatrix{1&b\\ 0&0}$ where $b$ is arbitrary.

*If $w\ne0$, by scaling $u$ and $v$ by $\frac{1}{w}$ and $w$ respectively, we may assume that $w=1$. Thus $v^Tu=1$ iff $z=1-xy$. Hence $A$ can be parametrised as $\pmatrix{xy&x(1-xy)\\ y&1-xy}$, where $x$ and $y$ are arbitrary.

In summary, $A$ is idempotent if and only if it is in one of the following four forms:
$$
0,\quad I_2,\quad \pmatrix{1&b\\ 0&0},\quad\pmatrix{xy&x(1-xy)\\ y&1-xy}.
$$
Note that unlike the other answers, our parametrisation here is more parsimonious and it uses only multiplication but not division.
A: The other solution is nice and explicit. Allow me to add a second solution that uses a bit more of the machinery that you will learn if not in this course on linear algebra then in the next. Maybe you will come back to this at that point.
From the idempotency equation $A^2 = A$, we see that $A$ is a zero of the polynomial $x^2 - x$ (i.e. if you substitute $A$ for $x$, you get the zero matrix). Therefore, the minimal polynomial $\mu_A$ divides $x^2 - x$. As $x^2 - x = x(x-1)$ (and the minimal polynomial can’t be $1$), it follows that $\mu_A = x$, $\mu_A = x - 1$ or $\mu_A = x(x-1)$.
For $2 \times 2$ matrices, this is enough to determine the Jordan normal form of $A$. Namely, $A$ must be similar to
$$
\begin{pmatrix}0 & 0 \\ 0 & 0\end{pmatrix}
$$
if $\mu_A = x$, similar to
$$
\begin{pmatrix}1 & 0 \\ 0 & 1\end{pmatrix}
$$
if $\mu_A=x-1$, and similar to
$$
\begin{pmatrix}0 & 0 \\ 0 & 1\end{pmatrix}
$$
if $\mu_A = x(1-x)$.
The first two matrices are only similar to themselves, so they’re two solutions. For the last, we need to conjugate with the general invertible $2 \times 2$ matrix,
$$
\begin{pmatrix}a & b \\ c & d\end{pmatrix}
$$
where $ad - bc \neq 0$ (because that is what it means to be “similar” to that matrix). This gives
$$
\frac{1}{ad-bc}\begin{pmatrix}d & -b \\ -c & a\end{pmatrix}\begin{pmatrix}0 & 0 \\ 0 & 1\end{pmatrix}\begin{pmatrix}a & b \\ c & d\end{pmatrix} = \frac{1}{ad-bc}\begin{pmatrix}-bc & -bd \\ ac & ad\end{pmatrix}.
$$
You can check that the matrix on the right is idempotent (whenever $ad-bc \neq 0$).
