If $\mathcal B=${${x_1,x_2,...,x_n}$} and $\mathcal B'=${${y_1,y_2,...,y_n}$} are bases for an $n$-dimensional subspace of $\mathcal V \subset R^m$.
Say I let $X_{mxn}$ and $Y_{mxn}$ be the matrices whose columns are the vectors $\mathcal B$ and $\mathcal B'$ respectively.
How would I go about proving that the change of basis matrix from $\mathcal B$ to $\mathcal B'$ is $\mathbf P$=$(\mathbf Y^T \mathbf Y)^{-1}\mathbf Y^T\mathbf X$?
If I'm not mistaken, I would first have to show that $\mathbf Y^T \mathbf Y$ is indeed invertible? How do I go about doing this?