I was studying Orthogonal Projections on multidimensional subspaces. I checked out the derivation for finding the vectors of the orthogonal projection on the subspace from here.
In the given pdf, the equation $(9)$ is
$$B^T(x-B\lambda) = 0$$
which is essentially the inner product of $B$ and $x-B\lambda$ i.e.
$$<B, x-B\lambda> = 0$$
it later solved to
$$\lambda = (B^T B)^{-1}B^Tx$$
All well and good.
But if we proceed a bit further than the pdf to solving the inverse part in this equation, we have
$$\lambda = B^{-1}(B^T)^{-1}B^Tx$$
Here we have $(B^T)^{-1}B^T$, which is as we know is an identity matrix, $I$. So we now have...
$$\lambda = B^{-1}x$$
But if we use this value of $\lambda$ in later equations for projection we get the incorrect result in which projection of $x$ is $x$ itself, which is not possible for all values of $x \in \mathbb{R}$.
So my question is why does doing this simple thing of solving the inverse give an incorrect result? I really hope that I have not done any blunder in solving this simple inverse equation. Any help would be appreciated.
We would only be able to carry out the "further solving" if $B$ were a square (invertible) matrix. But that case is where the subspace $U$ is indeed all of $\mathbb R^n$.
If $U$ were the entire $n$-dimensional space, then the projection of $x$ on $U$ would be exactly $x$, i.e. $x - B\lambda = 0$. This is the "trivial" case.
The roundabout construction of $(B^T B)^{-1}$ (the inverse of a nonsingular $m\times m$ matrix) is just what one needs to minimize the "error of approximation" of $x$ by $B\lambda$. The construction $(B^T B)^{-1} B^T$ is otherwise referred to as the pseudoinverse of a full rank nonsquare matrix $B$.