Proving sum of two matrices to be identity Given $m<n$. Suppose that $H$ and $K$ be $m \times n$ and $n\times (n-m)$ matrices such that rank$(H)=m$, rank$(K)=n-m$, and $HK=0$. For fixed non singular symmetric matrix $A$ define
\begin{equation}
P=AH^T(HAH^T)^{-1}H\  \text{and} \ Q=K(K^TAK)^{-1}K^TA.
\end{equation}
Prove that $P+Q$ is the $n\times n$ identity matrix.
I have proved $(P+Q)K=K$ and $H(P+Q)=H$. However, I haven't found the proof completely. Can anyone help me? Any help will be appreciated. Thanks
 A: I think this is a counterexample:
$$
A=\begin{bmatrix}1&3\\3&1\end{bmatrix},\ \ H=\begin{bmatrix}1&0\end{bmatrix},\ \ K=\begin{bmatrix}0\\1\end{bmatrix}.
$$
Then
$$
P=AH^T(HAH^T)^{-1}H=\begin{bmatrix}1&3\\3&1\end{bmatrix}\,\begin{bmatrix}1\\0\end{bmatrix}\left(\begin{bmatrix}1&0\end{bmatrix}\begin{bmatrix}1&3\\3&1\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix} \right)^{-1}\begin{bmatrix}1&0\end{bmatrix}\\
=\begin{bmatrix}1&3\\3&1\end{bmatrix}\,\begin{bmatrix}1\\0\end{bmatrix}\begin{bmatrix}1&0\end{bmatrix}=\begin{bmatrix}1&0\\3&0\end{bmatrix}
$$
and
$$
Q=K(K^TAK)^{-1}K^TA=\begin{bmatrix}0\\1\end{bmatrix}\left( \begin{bmatrix}0&1\end{bmatrix}\begin{bmatrix}1&3\\3&1\end{bmatrix}\begin{bmatrix}0\\1\end{bmatrix}\right)^{-1}\begin{bmatrix}0&1\end{bmatrix}\begin{bmatrix}1&3\\3&1\end{bmatrix}\\
=\begin{bmatrix}0\\1\end{bmatrix}\,\begin{bmatrix}0&1\end{bmatrix}\begin{bmatrix}1&3\\3&1\end{bmatrix}=\begin{bmatrix}0&0\\3&1\end{bmatrix}=\begin{bmatrix}0&0\\3&1\end{bmatrix}
$$
So $P+Q\ne I$ (note that it is still true that $(P+Q)K=K$, $H(P+Q)=H$). 
A: Note that $P^2=P$ and $Q^2=Q$. If $P+Q=I$, we must have $(P+Q)^2=P^2+Q^2$ and in turn $QP=0$. In other words, if $QP\ne0$, we obtain a counterexample. Now,
$$
QP = \color{red}{K}\ (K^\top AK)^{-1}\ (K^\top AAH^\top)\ (HAH^\top)^{-1}\ \color{red}{H}.
$$
If we put $n=2$ and $m=n-m=1$, then $\color{red}{K}$ is a column 2-vector, $\color{red}{H}$ is a row 2-vector and $(K^\top AK),\,(HAH^\top),\,(K^\top AAH^\top)$ are three scalars. So, if $\color{red}{K,H}$ and the three scalars are all nonzero, then $QP$ is necessarily nonzero and $P+Q\ne I$.
Hence we can construct a counterexample easily as follows. Let
$$
H=(1,0),\ K=\pmatrix{0\\ 1},\ A=\pmatrix{2&1\\ 1&2},\ A^2=\pmatrix{5&4\\ 4&5}.
$$
Then $HK=0$, $K,H$ are nonzero, $K^\top AK=HAH^\top=2$ and $K^\top AAH^\top=4$. One may verify that $QP=\pmatrix{0&0\\ 1&0}$ and $P+Q=\pmatrix{1&0\\ 1&1}$.
