1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
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: Find the QR Factorization of a matrix

  1. Jun 10, 2010 #1
    1. The problem statement, all variables and given/known data
    Find the QR factorization for the 4x3 matrix M
    1 1 0
    1 0 2
    1 0 1
    1 1 1

    2. Relevant equations
    M = QR


    3. The attempt at a solution
    I got the first two columns of Q correct, but im getting the third wrong for some reason beyond me.
    for Q, i got u1= 1/2 (1, 1, 1, 1) (vertical, not horizontal)
    and u2 = 1/2 (1, -1, -1, 1) (once again vertical, not horizontal, dont know how to make matrices easily on here)
    I got R correct except for the last number in the bottom right, need v3perp.


    thanks
     
    Last edited: Jun 10, 2010
  2. jcsd
  3. Jun 10, 2010 #2
    anyone?
     
  4. Jun 10, 2010 #3

    cronxeh

    User Avatar
    Gold Member

    Q=[-0.5 0.5 -0.5 -0.5; -0.5 -0.5 0.5 -0.5; -0.5 -0.5 -0.5 0.5; -0.5 0.5 0.5 0.5]
    r=[-2 -1 -2; 0 1 -1; 0 0 1; 0 0 0]
     
  5. Jun 10, 2010 #4
    your matrices answers seem to big. there should only be three columns in Q

    are you sure those are right. i got the answer not the solution and my u1 and u2 are the same as that, but its my u3 that is wrong. it says it is (-3/2, 3/2, 1/2, 1/2)
     
  6. Jun 10, 2010 #5

    cronxeh

    User Avatar
    Gold Member

    Before we decide to correct my work, lets multiply Q and R, something you could've done with your Q and R to see your mistake


    >> [-0.5 0.5 -0.5 -0.5; -0.5 -0.5 0.5 -0.5; -0.5 -0.5 -0.5 0.5; -0.5 0.5 0.5 0.5]*[-2 -1 -2; 0 1 -1; 0 0 1; 0 0 0]

    ans =

    1 1 0
    1 0 2
    1 0 1
    1 1 1
     
  7. Jun 10, 2010 #6
    ahh but you are wrong. you have TOO MANY columns. there are only three columns in Q and you just added a row in R to make M work.
    i just figure my solution is correct and the soltion book is wrong
    Q is
    .5 .5 -.5
    .5 -.5 .5
    .5 -.5 -.5
    .5 .5 .5

    R is
    2 1 2
    0 1 -1
    0 0 1

    that equals M
    so i believe that is right.
    thanks anyways tho
     
  8. Jun 10, 2010 #7

    cronxeh

    User Avatar
    Gold Member

    Ok then..
     
  9. Jun 11, 2010 #8
    You know that Q is supposed to be an orthogonal matrix, right? So if your Q isn't square, you've done something wrong.
     
  10. Jun 11, 2010 #9
    nah man. Q is fine. R is the orthogonal matrix i believe. or at least it is always squared
    my professor and another solution book both verified my answer.

    thanks you guys, but this problem is good
    /thread
     
  11. Jun 11, 2010 #10
    I haven't checked your solution, but no, Q is the orthogonal matrix... so it needs to be 4 by 4.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook