From Wikipedia:
a set of vectors is linearly independent if and only if the Gram determinant (the determinant of the Gram matrix) is non-zero.
But consider the matrix M:
5 4 2 1
0 1 -1 -1
-1 -1 3 0
1 1 -1 2
The Gram matrix G is:
27 22 6 7
22 19 3 5
6 3 15 1
7 5 1 6
And the determinant of G is 1024. The eigenvalues of M are:
4, 4, 1, 2
The eigenvectors of M are:
-0.58 0.58 -0.71 -0.58
0.0 -0.0 0.71 0.58
0.58 -0.58 0.0 0.0
-0.58 0.58 0.0 -0.58
And the rank of this eigenvector matrix is 3, not 4, so... the vectors are not linearly independent. Am I missing something obvious here? Thanks.
Consider the matrix
It's got one eigenvector,
so its eigenvector matrix, as reported by matlab, will be
Its eigenvalues are 1 and 1. But it's got rank 2, even though the eignevector matrix has rank 1. So what you're missing is a clear understanding of what matlab returns when it computes an eigenvector matrix.