找回密码
 快速注册
搜索
查看: 21|回复: 0

Find the minimal polynomial for the square matrix a in the variable x

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2022-7-8 22:44 |阅读模式
MatrixMinimalPolynomial[a_List?MatrixQ,x_]:=Module[
    {
      i,
      n=1,
      qu={},
      mnm={Flatten[IdentityMatrix[Length[a]]]}
    },
    While[Length[qu]==0,
      AppendTo[mnm,Flatten[MatrixPower[a,n]]];
      qu=NullSpace[Transpose[mnm]];
      n++
    ];
    First[qu].Table[x^i,{i,0,n-1}]
  ]
Mathworld

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:24

Powered by Discuz!

× 快速回复 返回顶部 返回列表