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

Diagonalising a matrix

  1. May 21, 2008 #1
    Hey guys, i'm having trouble trying to understand how the diagonalised matrix is produced

    e.g.

    A =
    1 | 3 | 0
    3 | -2 |-1
    0 | -1 | 1

    I've calculated the eigenvalues to be 1, -4, 3

    My question is, how do we know that
    D =
    1 | 0 | 0
    0 | 3 | 0
    0 | 0 | -4

    and not any other combination of 1, 3, -4 along the diagonal, or does it make no difference?
     
    Last edited: May 21, 2008
  2. jcsd
  3. May 21, 2008 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    I'm not sure I understand your question. Why does "diagonalize a matrix" mean to you?
     
  4. May 21, 2008 #3
    Using the eigenvalues to form the main diagonal of a matrix, you form D. Then determine the eigenvectors corresponding to those eigenvalues to create P (remember to keep the eigenvectors in order corresponding to the entries in D). Then invert P to find P^-1. This should yield the equation A=PDP^-1

    Good Luck!
     
  5. May 21, 2008 #4
    So it doesn't matter the order in which you order the eigenvalues? Cos that would produce a slightly different diagonal
     
  6. May 21, 2008 #5

    rock.freak667

    User Avatar
    Homework Helper

    when you get the e.values and their corresponding e.vectors, to form D you would have to put the e.vectors in the corresponding column. That is, if you put the first e.value in the first column, you put the e.vector in that same column for P.
     
  7. May 21, 2008 #6
    I understand this but is there more than one answer for D?

    Using my example in the 1st question i could get

    1 | 0 | 0
    0 | 3 | 0
    0 | 0 | -4

    or

    1 | 0 | 0
    0 | -4 | 0
    0 | 0 | 3

    etc..simply by assigning a different first eigenvalue from either 1, 3, or -4
     
  8. May 21, 2008 #7

    rock.freak667

    User Avatar
    Homework Helper

    yes there is, but the matrix P would change as well. In the first matrix the e.value of 3 is in column 2, so in P, you'd put the e.vector that corresponds to 3 as the column 2.

    for the 2nd matrix, 3 is in the 3rd column,so you'd put the e.vector for 3 in the 3rd column
     
  9. May 21, 2008 #8
    Ok thanks cos i was getting worried i wasn't getting the same answers for P and D that is given in one of the tutorial books that i'm using where my answers just differed by column arrangements
     
  10. Dec 9, 2008 #9
    Hey, I have a similar question to this but the posts here doesn't seem to solve my problem. I need to solve a matrix to to a certain power by using the diagonal matrix. It seems with different arrangement of eigenvalues gives me different answers. Out of the different arrangment they seem to be only one arrangement that gives an answer that correspond to the value achieved through matrix multiplication. But I can't see the pattern to identify the correct pattern for the general matrix. I tried to arrange it from the smallest to the largest but it sometimes work and sometimes it doesn't.

    Is there an actual proper way to arrange eigenvalues and eigenvectors to form the diagonal matrix and the vector which contains the eigenvectors?
     
  11. Dec 9, 2008 #10
    I think I should have given an example.
    Let A be
    l 1 -2 l
    l -2 4 l
    with Eigenvalue 0 and 5
    if 0 I set it as
    l 2 l
    l 1 l

    if 5 I set it as
    l 1 l
    l -2l

    if I set P
    l 2 1l
    l 1 -2l
    with D as the diagonal matrix then A^3= (P^-1)D^3P
    A^3 =
    l 25 -50l
    l-50 100l
    this is correct if u multiple A.A.A explicitly.

    But if I set P
    l1 2l
    l-2 1l
    then A^3 becomes
    l25 50l
    l50 100l
     
  12. Dec 9, 2008 #11

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Then you are doing a multiplication wrong somewhere.
    If A is a diagonalizable matrix so that A= PDP-1 for some diagonal matrix D and invertible matrix P, then An= (PDP-1)(PDP-1)...(PDP-1) (n times)= PDnP-1.

    Choosing different orders for the eigenvalues will give different diagonal matrices D and different P but for all of those PDnP-1 will be the same.

    If you use
    [tex]P= \left[\begin{array}{cc}1 & 2 \\-2 & 1\end{array}\right][/tex]
    instead of
    [tex]P= \left[\begin{array}{cc}1 & 2 \\-2 & 1\end{array}\right][/tex]
    you will also need to swap the rows in D, using
    [tex]D= \left[\begin{array}{cc}5 & 0 \\0 & 0\end{array}\right][/tex]
    rather than
    [tex]D= \left[\begin{array}{cc}0 & 0 \\0 & 5\end{array}\right][/tex]
    Did you do that?
     
  13. Dec 9, 2008 #12
    Yeah I swapped P's columns and changed D. I first also thought I did some multiplication error but then I tried the multiplication with Maple and it seems no different to the paradoxical conclusion that I came to.
     
  14. Dec 9, 2008 #13
    oh wait, I think I have understood why my multiplication doesn't work. Just now, I used your forumale of PD^nP^-1 instead of P^-1D^nP which my lecturer gave to me. It turns out your forumale actually works.

    Thanks a lot, now I can finally be relieved for my maths exam.
     
  15. Dec 10, 2008 #14

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Remarkable, isn't it!:rolleyes:

     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Diagonalising a matrix
  1. Hermitian Matrix (Replies: 4)

  2. Help with a matrix (Replies: 2)

Loading...