Let $\ M_{22}$ have the standard inner product and let
A = $\bigl(\begin{bmatrix} -1 & 1 \\ 0 & 2 \\ \end{bmatrix})$, U = $\bigl(\begin{bmatrix} 1 & -1 \\ 3 & 0 \\ \end{bmatrix})$, V = $\bigl(\begin{bmatrix} 4 & 0 \\ 9 & 2 \\ \end{bmatrix})$.
a) Find an orthonormal basis for the subspace span{U,V}
b) Find the orthogonal projection of A onto span{U,V}
I know that the inner product is $\langle A, B \rangle =\operatorname{tr}(A^TB)$ but don't know what to do past here.
Here is one way using Gram Schmidt. Note that the order of computations matters below in the sense that if you start with $V$ instead, you will get a different basis (but the same span, of course).
Compute $\tilde{U} = {1 \over \|U\|} U$ and then $W = V - \langle \tilde{U}, V \rangle $, $\tilde{V} = {1 \over \|W\|} W$.
Note that $\tilde{U}, \tilde{V}$ are orthonormal and $\operatorname{sp} \{ \tilde{U}, \tilde{V} \} = \operatorname{sp} \{ U, V \} $.
The projection of $A$ onto this span is given by $P = \langle \tilde{U}, A \rangle \tilde{U} + \langle \tilde{V}, A \rangle \tilde{V} $.
Now grind through the computations.
The answer is
As a quick check, verify that $\langle \tilde{U}, A-P \rangle = \langle \tilde{V}, A-P \rangle = 0$.
In case you want a numerical verification: