number of distinct eigenvectors in R
There are 2 eigenvectors corresponding to 1 eigenvalue (with multiplicity 4) for the following example. However, R returns 4 distinct eigenvectors. It looks like pairs of them are approximately the same only differing in machine floating point error (epsilon). Can you please check and confirm?
> B
[,1] [,2] [,3] [,4]
[1,] 2 0 0 0
[2,] 1 2 0 0
[3,] 0 1 2 0
[4,] 0 0 1 2
> eigen(B)
$values
[1] 2 2 2 2
$vectors
[,1] [,2] [,3] [,4]
[1,] 0 0.000000e+00 0.000000e+00 8.758115e-47
[2,] 0 0.000000e+00 1.972152e-31 -1.972152e-31
[3,] 0 4.440892e-16 -4.440892开发者_运维技巧e-16 4.440892e-16
[4,] 1 -1.000000e+00 1.000000e+00 -1.000000e+00
Here is the answer:
http://www.wolframalpha.com/input/?i=eigenvalues+[[2,+0,+0,+0],+[1,+2,+0,+0],+[0,+1,+2,+0],+[0,+0,+1,+2]]
(I cannot make it to a link...)
Update
Think of it this way:
2 0 0 0
B = 1 2 0 0
0 1 2 0
0 0 1 2.
If we subtract the eigenvalue \lambda = 2 from the main diagonal (as one does computing eigenspaces), we obtain
0 0 0 0
(B - 2 I) = 1 0 0 0
0 1 0 0
0 0 1 0.
If the coordinates are (x, y, z, w), then, obviously (B - 2 I) X = 0 yields x = 0 (from the second row), y = 0 (from the third row), and z = 0 (from the last row). Hence the space consists of all points (0, 0, 0, w) where w is arbitrary. That is, it is one-dimensional and any vector (0, 0, 0, t) will serve as a basis vector (t nonzero).
精彩评论