How to find orthonormal basis for subspace spanned by matrices and projection?

905 Views Asked by At

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.

1

There are 1 best solutions below

4
On

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

$\tilde{U}={ 1\over \sqrt{11}} \begin{bmatrix} 1 & -1 \\ 3 & 0 \end{bmatrix}$, $\tilde{V}={ 1\over \sqrt{11 \cdot 150}} \begin{bmatrix} 13 & 31 \\ 6 & 22 \end{bmatrix}$, $P={ 1\over 75} \begin{bmatrix} 23 & 101 \\ 24 & 62\end{bmatrix}$.

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:

# Matlab/Octave code to compute the above... 
u = [ 1 -1 ; 3 0 ] ;
v = [ 4 0 ; 9 2 ] ;
a = [ -1 1 ; 0 2 ] ;

# scale u...
u1 = u/sqrt(trace(u'*u)) ;
# make v orthogonal to u...
w = v - trace(u1'*v)*u1 ;
# normalise v...
v1 = w/sqrt(trace(w'*w)) ;

# projection of a onto the span of u, v...
p = trace(u1'*a)*u1+trace(v1'*a)*v1 ;

# check that following matrices have no non unit common divisor...
sqrt(11)*u1
sqrt(11*150)*v1
75*p

# check the error is orthogonal to u, v...
trace(u1'*(a-p))
trace(v1'*(a-p))