且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MATLAB中的广义特征向量?

更新时间:2023-02-26 16:21:05

根据Matlab文档,[V,D] = eig(A,B)生成具有广义特征值的对角矩阵D和列为相应的特征向量,使得A * V = B * V * D

According to Matlab documentation, [V,D] = eig(A,B) produces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D

下面是一个如何自己做的示例...首先,我们输入一个样本矩阵A:

Here an example how to do it yourself... First we enter a sample matrix A:

 A = [ 35  -12   4   30 ;
       22   -8   3   19 ;
      -10    3   0   -9 ;
      -27    9  -3  -23 ]; 

然后,我们研究其特征多项式,特征值和特征向量.

Then we explore its characteristic polynomial, eigenvalues, and eigenvectors.

 poly(A) 
 ans = 
     1.0000   -4.0000    6.0000   -4.0000    1.0000 

这些是特征多项式的系数,因此为(λ− 1)^ 4 然后

These are the coefficients of the characteristic polynomial, which hence is (λ − 1)^4 Then

 [V, D] = eigensys(A) 
 V = 
 [ 1, 0] 
 [ 0, 1] 
 [-1, 3] 
 [-1, 0] 


 D = 
 [1] 
 [1] 
 [1] 
 [1] 

因此MATLAB仅找到两个独立的特征向量

Thus MATLAB finds only the two independent eigenvectors

 w1 = [1  0  -1  -1]';     
 w2 = [0  1   3   0]'; 

与单个多重性4特征值λ= 1相关,因此具有缺陷2.
因此,我们建立了4x4单位矩阵,矩阵B =A-λI

associated with the single multiplicity 4 eigenvalue λ=1 , which therefore has defect 2.
So we set up the 4x4 identity matrix and the matrix B=A-λI

  Id = eye(4);        
  B = A - L*Id; 

当L = 1时,我们计算B ^ 2和B ^ 3

with L=1, When we calculate B^2 and B^3

  B2 = B*B      
  B3 = B2*B 

我们发现B2≠0,但B3 = 0,因此应该有一条与之相关的长度为3的链
特征值λ= 1.选择第一个广义特征向量

We find that B2 ≠ 0, but B3 = 0, so there should be a length 3 chain associated with
the eigenvalue λ = 1 . Choosing the first generalized eigenvector

 u1 = [1  0  0  0]'; 

我们计算出进一步的广义特征向量

we calculate the further generalized eigenvectors

 u2 = B*u1 
 u2 = 
     34 
     22 
    -10 
    -27 

 u3 = B*u2 
 u3 = 
     42 
      7 
    -21 
    -42 

因此,我们根据(普通)找到了长度为3的链{u3,u2,u1} 特征向量u3. (要使该结果与MATLAB的eigensys计算相一致,您可以 可以检查u3-42w1 = 7w2)

Thus we have found the length 3 chain {u3, u2, u1} based on the (ordinary) eigenvector u3. (To reconcile this result with MATLAB's eigensys calculation, you can check that u3-42w1=7w2)