How to prove two subspaces are complementary To give some context, I'm continuing my question here.
Let $U$ be a vector space over a field $F$ and $p, q: U \rightarrow U$ linear maps. Assume $p+q = \text{id}_U$ and $pq=0$. Let $K=\ker(p)$ and $L=\ker(q)$. From the previous question, it is proven that $p^2=p$, $qp=0$ and $K=\text{im}(q)$.
Now I want to prove that $U=K \oplus L$.
By definition, I know that if they are complementary, then $K \cap L = \left\{0 \right\}$ and $K + L =U$. Also, from my lecture notes it mentions a certain proposition that when applied to this question, I can say that subspaces $K$ and $L$ of a vector space $U$ are complementary if and only if each vector $u \in U$ can be written uniquely as $u = k + l$, where $k \in K$ and $l \in L$.
How do I go about proving this? It's hard for me to know what's going on. I would appreciate it if someone could help me draw a diagram representing the linear transformations of $p$ and $q$ as it is easier for me to see. Thank you for your time.
 A: $\Rightarrow$
Let $u\in U$. Since $U=K+L$ so $u=k+l$ where $k\in K$ and $l\in L$ and for uniqueness suppose that $u=k'+l'$ then 
$$k-k'=l'-l\in K\cap L=\{0\}$$
hence $k=k'$ and $l=l'$.
$\Leftarrow$
Let $u\in U$ then there's $k\in K$ and $l\in L$ s.t. $u=k+l$ so $U=K+L$ and if $x\in K\cap L$ then 
$$x=x+0=0+x$$
and by uniqueness $x=0$ so 
$$K\cap L=\{0\}$$
A: From the assumptions you get
$$\def\id{\mathrm{id_U}}\def\im{\mathrm{im}}
p=p\,\id=p(p+q)=p^2+pq=p^2,\qquad
p=\id\, p=(p+q)p=p^2+qp
$$
whence $p^2=p$ and $qp=0$. You also get
$$
\id=(p+q)(p+q)=p^2+qp+pq+q^2=p+q^2
$$
but, since $p+q=\id$ you can also conclude that $q^2=q$.
Let $K=\ker(p)$ and $L=\ker(q)$. Then, for every $x\in U$ you have $x=p(x)+q(x)$. If $x\in K$, then $x=p(x)+q(x)=q(x)$, so $x\in\im(q)$. Therefore $K\subseteq\im(q)$. Conversely, if $x=q(y)\in\im(q)$, we have $p(x)=pq(y)=0$, so $\im(q)\subseteq K$.
Similarly, $\im(p)\subseteq L$, because $qp=0$.
The fact that $x=p(x)+q(x)$ tells now that any element $x\in U$ belongs to $K+L$, because $p(x)\in L$ and $q(x)\in K$. Thus you only need to prove that $K\cap L=\{0\}$.
Let $x\in K\cap L$; then $x\in K$ implies $x=p(x)+q(x)=q(x)$. Now, from $x\in L=\ker(q)$ we get $x=0$.
