show projection matrix is equal to matrix times its transpose Let $V$ be an $n$-dimensional real inner product space and let $a=\lbrace v_1,v_2,\dots v_n \rbrace$ be an orthonormal basis for $V$. Let $W$ be a subspace of $V$ with orthonormal basis $B = \lbrace w_1, w_2,\dots w_k\rbrace$. Let $A = \lbrace [w_1]a, [w_2]a,\dots [w_k]a\rbrace$ and let $P_w$ be the orthogonal projection onto $W$.
Show $[P_w]aa = AA^t$.


*

*What I have is $P_w(x) = w$ 

*$[P_w(x)]a = [P_w]aa[x]a$

*And since $A$ is a orthogonal matrix $AA^t=I$
I'm stuck on this step 
Please help me out. Thanks

 A: The matrix $A$ takes a vector in the subspace $W$, considered as a copy of $\mathbb R^k$, expressed in the basis $B$, and returns the corresponding vector expressed in the basis $a$, as a member of $\mathbb R^n$.
The transpose of $A$ does the opposite:  it takes a vector in $\mathbb R^n$, expressed in the basis $a$, and gives a vector that is intrinsic to the subspace $W$.  This new vector is expressed in the basis $B$.  This new vector, necessarily then, has lost any information about components outside of $W$.
So the transpose takes a general vector and projects it onto $W$, but you then only have that new vector expressed in terms of the the basis $B$.  The original matrix $A$ converts any such vector back to the $a$ basis.
What you should show in order to prove this result is that any out-of-subspace components of an arbitrary input vector are reduced to zero as a result of this composition.  You will need the images of the vectors $w_1, w_2, \ldots$ under $A^T$ to be able to decompose any arbitrary vector of $\mathbb R^n$ this way.
A: The matrix $A$ is not necessarily orthogonal because it is constructed from $k$ vectors of dimension $n$, which means that $A$ may not be square. So $[A]$ is a $k\times n$ matrix. If $k=n$, then the orthogonal projection is just the identity matrix $I$, but this is not true for the case where $k < n$. Using inner-product notation, the orthogonal projection of $x$ onto $B$ is
$$
                   P_{W}x=(x,w_{1})w_{1}+(x,w_{2})w_{2}+\cdots+(x,w_{k})w_{k}.
$$
This is easy to check because $(x-P_{W}x) \perp W$, which is the definition of orthogonal projection (straight from the old days of Calculus.) In terms of matrices, the above can be written as
$$
\begin{align}
      [P_{W}x]_{a} & =[P_{W}]_{aa}[x]_{a}=([w_{1}]_{a}^{T}[x]_{a})[w_{1}]_{a}+\cdots+([w_{k}]^{T}[x]_{a})[w_{k}]_{a}.
\end{align}
$$
It's not hard to see that the right side is $AA^{T}[x]_{a}$, where $A$ is the matrix you have described. To see this, stack the row vectors $[w_{j}]_{a}^{T}$ into a $k\times n$ matrix, and this becomes $A^{T}$. The scalars in the column vector $A^{T}[x]_{a}$ are then multiplied against the columns of $A$ in a linear sum, which is the same as matrix multiplication $A(A^{T}[x]_{a})$. So $[P_{W}]_{aa}=AA^{T}$.
