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: Distinct Eigenvalues in matlab

  1. Oct 15, 2008 #1
    All I want to know is if a number and its negative appear as eigenvalues of a matrix, are they considered distinct?

    I have 4,1,-2,3 and -1 as eigenvalues of a particular matrix, but I can't get 5 linearly independent eigenvectors (to diagonalise the original matrix). I've plugged away and used Matlab and this is the only way it would make sense to me.
  2. jcsd
  3. Oct 16, 2008 #2


    Staff: Mentor

    Are you sure you have the right characteristic polynomial or haven't otherwise made a sign error? What you're saying makes me think that one of the eigenvalues is repeated, in which case they wouldn't be distinct. If the eigenspace for the repeated eigenvalue is of dimension 1, then you'll get only four vectors total.
  4. Oct 16, 2008 #3
    The problem is whether the following matrix is diagonalisable:

    4 0 0 1 0
    0 1 0 0 0
    1 0 -2 0 0
    0 0 0 3 0
    0 0 0 -2 -1

    I can't think of any easier way to find the e'values other than by brute force, which looks hard for a 5x5 matrix (or Matlab :smile: ), save to say that they appear on the diagonal on this example. Are there easier ways?

    Matlab tells me there are 5 e'values and enumerates the e'vectors and e'values with the code [v,e]=eig(A).

    The e'vals given are 4, 1, -2, 3, -1. Given that there are 5 distinct e'vals then it should be diagonalisable.

    Edit. I have just worked it out in Matlab but is there an easier way by hand. My notes tell me the Geometric multiplicity will equal the Algebraic multiplicity, so do I now have to work out the ref of each A-[tex]\lambda[/tex]I to get this?
    Last edited: Oct 16, 2008
  5. Oct 16, 2008 #4


    User Avatar
    Science Advisor

    Well, for this particular matrix, it is pretty easy to see, by expanding the determinant [itex]A-\lambda I[/itex] by minors, that we can always choose a row or column with only one non-zero entry so the eigenvalues are just the numbers on the diagonal:-1, 1, -2, 3, and 4.

    To answer your first question, yes , of course, -1 and 1 are different numbers and so "distinct eigenvalues". By simply multiplying out [itex]Av= \lambda v[/itex] I get
    [itex]4x_1+ x_4= \lambda x_1[/itex]
    [itex]x_2= -\lambda x_2[/itex]
    [itex]x_1- 3x_3= \lambda x_3[/itex]
    [itex]3x_4= \lambda x_4[/itex]
    [itex]-2x_4- x_5= \lambda x_5[/itex]
    Putting [itex]\lambda[/itex]= -1, 1, 2, 3, and 4 gives equations to solve for the corresponding eigenvectors. I get, for example, that the eigenvectors corresponding to [itex]\lambda= -1[/itex] are all multiples of <0, 0, 0, 0, 1> and the eigenvectors corresponding to [itex]\lambda= 1[/itex] are all multiples of <0, 1, 0, 0, 1>.
  6. Oct 20, 2008 #5
    Aha. Thanks for the help.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook