Diagonalizable matrix with eigenvalues $\pm 1$ 
Let $A \in \mathbb{R}^{n \times n}$ be a diagonalizable matrix with $1$ or $-1$ as its only eigenvalues. Prove that $A^{2} = I_{n}$.

Could someone help me on this one? I have no idea how to start.
 A: You simply have to use the hypothesis that $A$ is diagonalizable : $A=PDP^{-1}$ where $D$ is a diagonal matrix with non-zero coefficients which are $1$ or $-1$ (and $P$ is invertible). From this you can easily compute $A^2$ and find $I_n$.
A: Since $A$ is a diagonalizable matrix, by definition, it can be written as $PDP^{-1}$ where $D$ is an $n \times n$ diagonal matrix (only non-zero elements are on the diagonal). Moreover, the entries on the diagonal of $D$ can be comprised only of eigenvalues of $A$ (in this case, $1$ or $-1$).
So,
$
\begin{align*}
A^2 &= (PDP^{-1})^2
\\&= (PDP^{-1})\cdot(PDP^{-1})
\\&= PD
(P^{-1}P)DP^{-1}
\\&= PD(
I_n)DP^{-1}
\\&= PD^2P^{-1}.
\end{align*}
$
Now, let's think about what possible matrices $D^2$ could be. Since its entries (remember, only on the diagonal) must be either $1$ or $-1$, and $1^2 = (-1)^2 = 1$, $D^2$ will always be $I_n$ (the $n \times n$ identity matrix). So,
$
\begin{align*}
PD^2P^{-1} &= PI_nP^{-1}
\\&=PP^{-1}
\\&= I_n.
\end{align*}
$
Thus, $A^2 = I_n$.
A: Another proof: we have
$$ \mathbb R^n=ker(A-E) \oplus ker(A+E).$$
If $x \in \mathbb R^n$, then $x=y+z$ with $Ay=y$ and $Az=-z$. We get
$Ax=Ay+Az=y-z$, therefore
$$A^2x=Ay-Az=y+z=x=I_nx.$$
