Mathematica中的广义特征值

时间:2011-12-26 13:04:49

标签: wolfram-mathematica eigenvector

我试图用Mathematica解决一个广义的特征值问题。我想找到关于B的矩阵A的特征值和特征向量。但是当我使用Eigensystem时,我收到以下错误。

A = {{1, 2, 3}, {3, 6, 8}, {5, 9, 2}}
B = {{3, 5, 7}, {1, 7, 9}, {4, 6, 2}}
Eigensystem[{A, B}]

Eigensystem::exnum: Eigensystem has received a matrix with non-numerical or exact 
elements. >>

我该怎么办?

2 个答案:

答案 0 :(得分:3)

嗯,至于你能做什么,你可以在那里扔N[]

为什么你得到你所犯的错误,我现在不确定。可能是其他人都知道的。

A={{1,2,3},{3,6,8},{5,9,2}};
B={{3,5,7},{1,7,9},{4,6,2}};
Eigensystem[{N@A,N@B}]

Out[48]= {{1.6359272851306594,0.52597489217711,0.011174745769153706},
 {{0.0936814383974197,0.7825455672726674,-0.6155048523299302},
 {-0.8489102791046691,0.3575364071543101,0.389254486922913},
 {0.8701002165041747,-0.4913210011447429,0.03910610020848224}}}     

答案 1 :(得分:2)

直接从these answers复制,使用可逆矩阵,您可以使用它来获得Root个对象的精确结果:

A = {{1, 2, 3}, {3, 6, 8}, {5, 9, 2}};
B = {{3, 5, 7}, {1, 7, 9}, {4, 6, 2}};

Eigensystem[Inverse[B].A] // RootReduce
{{Root[-1 + 92 #1 - 226 #1^2 + 104 #1^3 &, 3], 
  Root[-1 + 92 #1 - 226 #1^2 + 104 #1^3 &, 2], 
  Root[-1 + 92 #1 - 226 #1^2 + 104 #1^3 &, 1]},
 {{Root[-1418 - 9903 #1 - 3824 #1^2 + 192 #1^3 &, 2], 
   Root[-2817 + 627 #1 + 2480 #1^2 + 192 #1^3 &, 2], 1},
  {Root[-1418 - 9903 #1 - 3824 #1^2 + 192 #1^3 &, 1],
   Root[-2817 + 627 #1 + 2480 #1^2 + 192 #1^3 &, 3], 1},
  {Root[-1418 - 9903 #1 - 3824 #1^2 + 192 #1^3 &, 3],
   Root[-2817 + 627 #1 + 2480 #1^2 + 192 #1^3 &, 1], 1}}}