Are projections with the same kernels the same? This question is related to another question I just asked. 
I thought I figured it out but I got confused again. Given two projections $k^n\rightarrow k^n$, represented by $n\times n$ matrices $A$ and $B$, if they have the same range $H$ which is a subspace $H\subset k^n$ with dimension $r$, and the same kernel, how to prove that they are identical?
Since they are projections, $A^2=A$, $B^2=B$. They have the same kernel, so $A$ is row equivalent to $B$. So $A=PB$ for some invertible matrix $P$. This gives
$$(PB)(PB)=PB\implies BPB=B\implies BA=B \text{  or  } BA=B^2$$
How to get $A=B$ then? Thank you for any help!

As already pointed out in the comments, two projections with the same kernel must not be the same; consider for example $p_1, p_2 \colon k^n \to k^n$ with
$$
 p_1(x,y) = (x,0)
 \quad\text{and}\quad
 p(x,y) = (x,x).
$$
In the case of your earlier question you have the additional property that all projections you consider there have the same image: Then the statement is true.

The most important property of a projection $p \colon k^n \to k^n$ is that $k^n = \ker p \oplus \mathrm{im} \ p$: We have $\ker p \cap \mathrm{im} \ p = \{0\}$, because for every $x \in \ker p \cap \mathrm{im} \ p$ we have some $y \in k^n$ with $x = p(y)$, and thus
$$
 0 = p(x) = p(p(y)) = p^2(y) = p(y) = x.
$$
On the other hand we can write every $x \in k^n$ as $x = x_1 + x_2$ with
$$
 x_1 = p(x) \in \mathrm{im} \ p
 \quad\text{and}\quad
 x_2 = x - p(x) \in \ker p,
$$
so we have $k^n = \ker p + \mathrm{im} \ p$.

Thus we have $k^n = \ker p \oplus \mathrm{im} \ p$. But we know the restrictions $p|_{\ker p} = 0$ and (because $p$ is a projection) $p|_{\mathrm{im} \ p} = \mathrm{id}_{\mathrm{im} \ p}$.
If we have another projection $q$ with $H' := \ker q = \ker p$ and $H := \mathrm{im} \ q = \mathrm{im} \ p$ it follows that the restrictions of $p$ and $q$ on $H$ and $H'$ coincide. Because $k^n = H' \oplus H$ it follows from the linearity of $p$ and $q$ that they already coincide everywhere.

One can also generalize this this by saying that the map
\begin{align*}
 \{p \colon k^n \to k^n \mid \text{$p$ a projection}\}
 &\to
 \{
  (H', H)
 \mid
 \text{$H', H \subseteq k^n$ subspaces, $k^n = H' \oplus H$}
\} \\
 p 
 &\mapsto
(\ker p, \mathrm{im} \ p)
\end{align*}
is a bijection; the statement from your earlier question is then just a special case of this.
