R中不同特征向量的数量 [英] number of distinct eigenvectors in R
问题描述
在下面的示例中,有2个特征向量对应于1个特征值(多重性为4).但是,R返回4个不同的特征向量.看起来它们之间的对几乎相同,只是机器浮点误差(ε)不同.您可以检查并确认吗?
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.440892e-16 4.440892e-16
[4,] 1 -1.000000e+00 1.000000e+00 -1.000000e+00
推荐答案
以下是答案:
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...)
这样想:
2 0 0 0
B = 1 2 0 0
0 1 2 0
0 0 1 2.
如果我们从主对角线中减去特征值\ lambda = 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.
如果坐标为(x,y,z,w),那么显然(B-2 I)X = 0得出x = 0(第二行),y = 0(第三行),并且z = 0(从最后一行开始).因此,空间由所有点(0,0,0,w)组成,其中w是任意的.也就是说,它是一维的,任何矢量(0、0、0,t)都将用作基本矢量(t非零).
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).
这篇关于R中不同特征向量的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!