A is an $n \times n$ matrix such that $A^2 = A$ I was doing the final homework of the term and got to the last question thinking I was gonna cross the finish line with ease until I got to the last two questions. The second last question, I completed with some difficulty and a lot of time but this question, I am completely lost. 
The question is:
Let $A$ be a $n \times n$ matrix such that $A^2 = A$.
a) Show that if $\lambda$ is an eigenvalue of $A$ then $\lambda = 0$ or $1$.
b) Let $E_1 (A) = \{x \in \mathbb{R}^n | Ax = x\}$; let $E_0(A) = \{x \in \mathbb{R}^n | Ax = 0\}$. Let $x$ be any vector in $\mathbb{R}^n$. Show
that $Ax \in E_1 (A)$ and $x − Ax \in E_0 (A)$.
c) Show that if $A$ is diagonalizable then $\operatorname{rank}(A) = \operatorname{tr}(A)$.
This course is supposed to be with no proofs but we have been given proofs in our homework again and again. I have very little experience on how to tackle proof questions from other courses so I'm gonna need help on this. Thanks guys.
 A: (a) If $\lambda$ is an eigenvalue of $A$ then there exists a non zero vector $v\in\mathbb{R}^{n}$ such that $Av=\lambda v$. Therefore $A^{2}v=A(Av)=A(\lambda v)=\lambda Av=\lambda^{2}v$. That is, $\lambda^{2}$ is an eigenvalue of $A^{2}$. If $A^{2}=A$, then $\lambda^{2}=\lambda$, i.e., $\lambda=0,1$.
(b) Since $A^{2}=A$, we have$A(Ax)=A^{2}x=Ax$. So $Ax\in E_{1}(A)$. Now $A(x-Ax)=Ax-A^{2}x=Ax-Ax=0$. Therefore $x-Ax\in E_{0}(A)$.
(c) If $A$ is diagonalizable then there exist $P_{n\times n}$ and $Q_{n\times n}$ such that $A=PDQ$, where $D$ is an $n\times n$ diagonal matrix consists of the eigenvalues of $A$ and $rank(A)=rank(D)$. Recall that the eigenvalues are only $0$ or $1$.
Now $tr(A)=$ sum of the eigenvalues = number of $1$ s on the diagonal of $D$ = $rank(D)=rank(A)$.
(*) Additional fact: From part (b) we see that $range(A)=E_{1}(A)$ and $ker(A)=E_{0}(A)$. Therefore $rank(A)=dim(range(A))=dim(E_{1}(A))$. 
A: (a) Suppose $Av = cv$ for some eigenvalue $c$ and nonzero eigenvector $v$. Then 
$$
A^2 v = c^2 v = Av = cv
$$
so 
$$
(c^2 - c) v = 0.
$$
Since $v$ is nonzero, that measn that $c^2 - c = 0$, so $c = 0, 1$. ar ethe only possibilities. 
(b) I'll let you give a shot at this one...just follow your nose to show that $Ax$ is in $E_1$. 
(c) If $A$ is diagonalizable, what numbers end up on the diagonal? What's their sum? 
A: For (a), recall that if $\lambda$ is an eigenvalue of $A$, then $\lambda^2$ is an eigenvalue of $A^2$. Thus which numbers satisfy this property?
For (b), $E_1(A)$ is really just the set of all eigenvectors for the eigenvalue $\lambda = 1$. Since you have one eigenvalue, this set is linearly dependent, so each vector is a scalar multiple of the other. Now, $Ax = x$ implies $AAx = Ax = x$, where the second equality is by definition, so $Ax$ is an element of $E_1$.
For $E_0$, consider the product $A(x-Ax)$. What does it equal?
