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.