MATLAB: Linearly independent eigen vectors

linearly independent eigen vectors

set of linearly independent eigenvectors
A=[2 0 0 0 0 0
0 2 0 0 0 0
0 0 2 0 0 0
0 0 0 2 0 0
0 0 0 0 2 0
0 0 0 0 0 2];

Best Answer

And for some strange reason, you think that eig as applied to a diagonal matrix does not produce a set of independent eigenvectors?
Have you tried using eig?
What does eig produce when applied to 2*eye(6)?
[V,D] = eig(2*eye(6))
V =
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
D =
2 0 0 0 0 0
0 2 0 0 0 0
0 0 2 0 0 0
0 0 0 2 0 0
0 0 0 0 2 0
0 0 0 0 0 2
The columns of V are a set of linearly independent eigenvectors. Do you dispute that fact? The diagonal elements of D are the eigenvalues.
Just for kicks,
V*V'
ans =
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
It looks good to me.
(In some cases, when the matrix is defective, it will not have a complete set of eigenvectors, but that is not the fault of eig but of mathematics. No complete set will exist in some cases.) But a diagonal matrix is not even remotely a problem. So feel free to explain why the columns of V do NOT form a set of linearly independent basis vectors for the vector space R^6 in this case?