Let $A$ be a $2 \times 2$ matrix. Prove/disprove if $A^2=A$ then either $A=0$ or $A=I$ 
For a $2 \times 2$ matrix $A$, prove or disprove the claim that if $A^2=A$ then either $A=0$ or $A=I$.

I'm really struggling with this problem. I feel that the statement is true because I can't seem to come up with a specific counterexample. Nevertheless, I don't know how to come up with a proof. Any hints/ideas on where to start?
 A: $$
A=\begin{bmatrix}
1 & 0\\
0 & 0
\end{bmatrix}
$$
is a counterexample.

BTW, this question illuminates this concept of matrix algebra. From $A(I-A)=0$ you cannot conclude $A=0$ or $A=I$ from it.

If you are interested in more examples, we can construct an infinite family of counter examples
$$
\Omega=\{PMP^{-1}|P\in GL_2(R)\} \\
M=\begin{bmatrix}
1 & 0\\
0 & 0
\end{bmatrix}
$$
$P$ is an invertible 2x2 matrix, $A$ is as defined above. I hypothesize $\Omega\cup\{I,0\}$ are all the 2x2 matrices that satisfy $A^2=A$. (I have not proved yet)
A: $A^2=A$
Then eigenvalues of $A$ : $\lambda =0, 1$
Eigenvalues of a diagonal matrix are precisely the diagonal entries. Choose a $2×2 $ diagonal  matrix whose one diagonal is $0$ and other is $1$.This gives the counter example.
$\begin{pmatrix}1&0\\0&0\end{pmatrix}$
$\begin{pmatrix}0&0\\0&1\end{pmatrix}$
A: Often, the best way to come up with a counterexample is to think about what the conditions are describing and then trying to think if there is anything wrong with the consequent. Then you can use this intuition to form a counterexample.
If we think of matrices as linear transformations, it is plain to see that $A^2 = A$ does not imply $A = 0$ or $A=I$. What $A^2 = A$ is saying is that transforming a vector $x$ by $A$ is the same as transforming $x$ by $A$ and then applying $A$ again. The class of matrices that this describes are projection matrices. Since a projection matrix takes a vector into a particular subspace on first application, any further projections onto the same subspace will be the same as just projecting once.
That is the link between all of the counterexamples in this thread. They are all projection matrices. Any diagonal matrix with ones and zeros on the diagonal will similarly be idempotent, since they are projections onto the axes with non-zero diagonal component.
So \begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1 
\end{bmatrix}
is one of many many examples since
\begin{equation}\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1 
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3 
\end{bmatrix} = \begin{bmatrix}
x_1 \\
0 \\
x_3 
\end{bmatrix}
\end{equation}
And
\begin{equation}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1 
\end{bmatrix}^2
\begin{bmatrix}
x_1 \\
x_2 \\
x_3 
\end{bmatrix} =
\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1 
\end{bmatrix}
\begin{bmatrix}
x_1 \\
0 \\
x_3 
\end{bmatrix} = \begin{bmatrix}
x_1 \\
0 \\
x_3 
\end{bmatrix}
\end{equation}
A: A very simple way to attack this problem is to just assume A is a general matrix
$$\begin{pmatrix}a&b\\c&d\end{pmatrix}$$
with some unknown real numbers $a,b,c,d$ and then you look at your condition and set up a system of linear equations.
In this case one of the equations reads $b(a+d-1)=0$. Now if you assume $b=0$ then the other equations give you $a,d \in \{0,1\}$ which is sufficient to find more examples than $A=0$ and $A=I$. If you want to find the set of all solutions this way this is some messy algebra but it is doable.
This approach is not the shortest and if you use more knowledge of linear algebra, matrices or linear transformations more elegant solutions exist (as described in the various other answers) but this is very simple to set up and works for most problems of this nature (although it is often messy and not very quick or elegant).
A: Generalisation:
Let $V$ be a vector space and let $U,W$ subspaces of $V$ such that $U \ne \{0\} \ne W$ and $V= U \oplus W.$
Then define $A:V \to V$ as follows: if $v \in V,$ then there are unique $u \in U$ and $w \in W$ with $v=u+w.$
Put $Av:=u.$
Then we have $A^2=A, im(A)=U$ and $ker(A)=W.$ Since $U \ne \{0\} \ne W$ and $V= U \oplus W,$ it follows that $A \ne 0$ and $A \ne I.$
