2
votes

I have a square matrix C,of which I have to find the eigen values and eigen vectors.

C =

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

When I use the function eig() such that, [V,D]=eig(C,'nobalance') This is the output of V and D that I get:

V =

   -0.5000    0.7071    0.4914   -0.0924
   -0.5000   -0.0000   -0.3607    0.7874
   -0.5000   -0.0000   -0.6221   -0.6025
   -0.5000   -0.7071    0.4914   -0.0924

D =

   -0.0000         0         0         0
         0    2.0000         0         0
         0         0    4.0000         0
         0         0         0    4.0000

But when I give the same matrix C at an online matrix calculator(http://www.bluebit.gr/matrix-calculator/), the corresponding eigen values and vectors that I get are as follows:

Eigenvalues:

(0.000,0.000i)
(2.000,0.000i)
(4.000,0.000i)
(4.000,0.000i)

Eigenvectors:

( 0.500, 0.000i) ( 0.707, 0.000i) ( 0.500, 0.000i) (-0.308, 0.000i)
( 0.500, 0.000i) ( 0.000, 0.000i) (-0.500, 0.000i) (-0.250, 0.000i)
( 0.500, 0.000i) ( 0.000, 0.000i) (-0.500, 0.000i) ( 0.865, 0.000i)
( 0.500, 0.000i) (-0.707, 0.000i) ( 0.500, 0.000i) (-0.308, 0.000i)

Can you tell me why there is a difference in values at the two cases?Are the values returned by the eig function in matlab correct?Thanks in advance.

1
You can find out simply by trying to reconstruct the matrix from V and D...Oliver Charlesworth
Incidentally, the matlab pages say that the balanceOption is ignored in cases where the input matrix is symmetric mathworks.co.uk/help/matlab/ref/eig.html#inputarg_balanceOptionmathematician1975
Yes,I could reconstruct the matrix C. But again, My project deals with eigen vectors calculated based on their signs. So when I gave the input C to the online calculater mentioned in the url, the signs of the figures are seen to be different. So wouldn't that be a problem?Geethu Ann Joseph

1 Answers

1
votes

As you can see, the eigenvalues are the same. The eigenvectors corresponding to the eigenvalue 4 are different because that eigenvalue has multiplicity=2 and therefore its space of eigenvectors is two-dimensional. I.e., a numerical eigenvector solver could come up with any pair of linear independent vectors in that 2-dimensional space.