Proving a projection onto subspace if $P^2 = P$

linear algebralinear-transformationsprojection

Suppose that V is a vector space, and M is a subspace of V . A transformation $P : V \to V$
is called the projection of V onto M if

(i) there exists a subspace N such that every vector v ∈ V can be written uniquely as
$v = x + y$ for some $x ∈ M$ and $y ∈ N$; and

(ii) P is given by $P(x + y) = x$, for all $x ∈ M$ and $y ∈ N$.

Question: Suppose that $P : V \to V$ is a linear transformation. Prove that P is a projection onto
some subspace of V if and only if $P^2 = P$

So I can't seem to prove the reverse direction where I assume P^2 = P. Like what do we need to prove in order to show that it is a projection??

Best Answer

Let $M$ be the range of $P$ and $N$ be the kernel. Then $x =Px+(x-P(x)), Px \in M$ and $x-Px \in N$ because $P(x-Px)=Px-P^{2}x=0$. Hence every vector is a sum of an element from $M$ and an element from $N$. Suppose $x+y=u+v$ where $x, u \in M$ and $y,v \in N$. Then we can write $x=Px',u=Pu'$ so $P(x-u)=P^{2}(x'-u')=P(x'-u')=x-u$. But $x-u=v-y$. Applying $P$ to both sides we get $x-u=P(v-y)=Pv-Py=0-0=0$. Hence $x=u$ and it is now obviuous that $v=y$. This proves (i). (ii) is easy: if $x =m+n, m \in M, n \in N$ then $Px=P(m+n)=Pm+0=Pm=m$ since $m =Pz$ for some $z$ which gives $Pm=P^{2}z=Pz=m$.