Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Orthonormal basis spanned by 2 matrices

  1. May 2, 2010 #1
    1. The problem statement, all variables and given/known data

    Let M1 = [1 1] and M2 = [-3 -2]
    ________[1 -1]_________[ 1 2]
    Consider the inner product <A,B> = trace(transpose(A)B) in the vector space R2x2 of 2x2 matrices. Use the Gram-Schmidt process to determine an orthonormal basis for the subspace of R2x2 spanned by the matrices M1 and M2.


    3. The attempt at a solution

    So the inner product of the 2 matrices is <M1,M2> which is [-2 0]
    __________________________________________________[-4 -4]
    if I calculated it right which I think I did. But I don't what that has to do with Gram-Schmidt or how it relates to orthonormal bases for R2x2. And I know how to use Gram-Schmidt on individual vectors but not on a whole matrix so I'm pretty stuck.
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. May 2, 2010 #2
    So I figured out one of the matrices that forms the basis from M1 by treating M1 as vector v1 equal to [1 1 1 -1] and got the orthonormal vector to be [1/2 1/2 1/2 -1/2] which corresponds to the orthonormal matrix [1/2 1/2]
    ________________________________[1/2 -1/2]
    and I tried to extrapolate that and use the second matrix as v2 equal to [-3 -2 1 2] and got the orthonormal vector [-3/2 -1/2 5/2 1/2] using Gram-Schmidt but that was wrong. Can anyone help?
     
  4. May 2, 2010 #3

    Mark44

    Staff: Mentor

    When you used G-S to get your second matrix, what did you use for the inner product? You can't use the normal inner product for vectors - you need to use the inner product that is defined for this space, namely trace(ATB).
     
  5. May 2, 2010 #4
    so since I'd take v2 - (<v1,v2>/|v1|)v1 the <v1,v2> part would be the trace(A^TB) instead of actually just taking the dot product of v1 and v2?
     
  6. May 2, 2010 #5

    Mark44

    Staff: Mentor

    That's exactly what I'm saying.
     
  7. May 2, 2010 #6
    ok so I did A^T*B = [-2 0 -4 -4] and the trace of that is 8 so then I got v2-8*v1 which came out to [-3 -2 1 2] - 8[1/2 1/2 1/2 -1/2] = [-7 -6 -3 6] which wasn't right... did I do somehtin wrong?
     
  8. May 2, 2010 #7
    ok so I actually calculated trace wrong and it's actually -6 but then I did that and came out to [-3 -3 1 2] - -3[1/2 1/2 1/2 -1/2] = [0 1 4 -1] which is also wrong...
     
  9. May 2, 2010 #8

    Mark44

    Staff: Mentor

    So let's call v1 and v2 the new basis, with v1 = M1. Calculate v2 as follows.
    [tex]v_2 = M_2 - \frac{<M_2, v_1>}{<v_1, v_1>}v_1[/tex]

    Make sure you calculate each inner product using the formula you gave in post #1. I did the calculation and got v2 as a matrix that is orthogonal to v1. I.e. trace(v1T v2) = 0.

    That should give you an orthogonal basis. The only thing left after that is to normalize each matrix, by dividing by its magnitude. Here the magnitude of a matrix M is sqrt(<M, M>), where you use the same inner product as you've been using all along.
     
  10. May 3, 2010 #9
    is v1 supposed to be the vector itself [1 1 1 -1] or the vector in normalized form [1/2 1/2 1/2 -1/2]? I think it should be normalized, right? so then <M2,v1> would be tr(M2Tv1)? and is <v1,v1> going to be tr(v1Tv1) which would just be 1/2 +1/2 =1 if v1 is supposed to be the normalized form?
     
  11. May 3, 2010 #10

    Mark44

    Staff: Mentor

    I think it's a little less work to first get an orthogonal basis, and then normalize the matrices to get an orthonormal basis.

    Also, you should probably be thinking in terms of matrices instead of vectors, if only to reinforce the idea that the inner product in this space is the trace of the product of two matrices.

    Yes <M2, v1> is tr(M2Tv1>. That's what I've been saying since post #3.
     
  12. May 3, 2010 #11
    Ok, I got it right! thank you so much!
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook