Forgot password?
 Create new account
View 99|Reply 0

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

[Copy link]

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

hbghlyj Posted at 2022-7-8 22:44:49 |Read mode
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

手机版Mobile version|Leisure Math Forum

2025-4-20 22:02 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list