# Distinct Eigenvalues in matlab

1. Oct 15, 2008

### samurye

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. Oct 16, 2008

### Staff: Mentor

yes
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.

3. Oct 16, 2008

### samurye

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 ), 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-$$\lambda$$I to get this?

Last edited: Oct 16, 2008
4. Oct 16, 2008

### HallsofIvy

Staff Emeritus
Well, for this particular matrix, it is pretty easy to see, by expanding the determinant $A-\lambda I$ 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 $Av= \lambda v$ I get
$4x_1+ x_4= \lambda x_1$
$x_2= -\lambda x_2$
$x_1- 3x_3= \lambda x_3$
$3x_4= \lambda x_4$
$-2x_4- x_5= \lambda x_5$
Putting $\lambda$= -1, 1, 2, 3, and 4 gives equations to solve for the corresponding eigenvectors. I get, for example, that the eigenvectors corresponding to $\lambda= -1$ are all multiples of <0, 0, 0, 0, 1> and the eigenvectors corresponding to $\lambda= 1$ are all multiples of <0, 1, 0, 0, 1>.

5. Oct 20, 2008

### samurye

Aha. Thanks for the help.