Originally Posted by

**moljka** Hello,

Suppose one has the matrix A:

[2 0 -1;

0 3 0;

-1 0 2]

i found eigenvalues: 1 & 3 using the ABC formula. For 1 im getting the eigenvectors:

q1=1/√(2) & q3=1/√(2) (q2 ending up equal to 0), for 3 im getting: q1=-1/√(2), q2=0, q3=-1/√(2).

Matlab gives me:

3 eigen values: 1, 3 & 3.

And the following, wich i believe are supposed to be the eigen vectors:

(>> [VA,DD]=eig(A) <---matlab command)

VA =

[-0.7071 -0.7071 0;

0 0 1.0000;

-0.7071 0.7071 0]

(1/√(2)=0.7071) it gives 3 eigen vectors with a - sign, while im getting 2 with a - sign.

-Why is matlab giving 3 eigen values? should a 3 by 3 matrix always have 3 eigenvalues?

-Why is the last eigen vector 0 1 0 according to matlab? What am i doing wrong?

I was only taught to compute eigen values/vectors of 2 by 2's.

Please help me out.

Kind regards,

Moljka

P.S. please forgive me for not displaying the matrices properly in this message.