Eigenvalues and eigenspaces of a matrix with a given property

Suppose A is a real n×n matrix that satisfies A2v=2Av for every vRn.

  1. Show that the only possible eigenvalues of A are 0 and 2.
  2. For each λR, let Eλ denote the λ-eigenspace of A, i.e., Eλ={vRnAv=λv}. Prove that Rn=E0E2. (Hint: For every vector v one can write v=(v12Av)+12Av.)