BTW, I also have another question on this topic: if I compute the characteristic polynomial of a matrix and then I evaluate the polynomial at the matrix, I would expect to have the zero matrix as result. This does not happens: try

m:=matrix([[1,2],[3,4]])
p:=characteristicPolynomial(m)
p(m)

Why?

Because Axiom is not smart enough to figure out all the types for you.

Does this make you happier?

M := SquareMatrix(2,Integer)
m:M:=matrix([[1,2],[3,4]])
P:=SUP(M)
p:P := characteristicPolynomial(m)::P
x := first variables p
eval(p, x, m)

There is no function apply: (P, M) -> M. So how have to browse through hyperdoc a bit. And not that the P given above is much more appropriate than Polynomial Integer. Actually, SUP(Integer) should do, but then there is no way to evaluate such a polynomial at a matrix.

Ralf



_______________________________________________
Axiom-math mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-math

Reply via email to