Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

On the wolfram website, the following program is given for computing the minimal polynomial of a square matrix $a$ in the variable $x$:

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}]

]

(It's given here: http://mathworld.wolfram.com/MatrixMinimalPolynomial.html also)

I'm having trouble following the algrothim it's using. How is Mathematica actually computing the matrix minimal polynomial?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

While I can't quite grok the code, it looks like M. is building in increasingly long list of powers of $a$, and searching (by NullSpace) for a relation of linear dependency. Once one is found, the coefficients of the dependency relation are turned into a polynomial through the Table method.

share|improve this answer
    
Ooh ok. That's specific enough for me. Thanks! –  Fortunato Jan 31 '13 at 16:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.