Method I:
(%i1) load(linearalgebra)$
(%i2) M : matrix([1,2],[3,4])$
(%i3) matrixfun(lambda([x], x^2+3*x+2),M);
(%o3) matrix([12,16],[24,36])
Method II:
(%i4) M.M+3*M+2*ident(2);
(%o4) matrix([12,16],[24,36])
--Barton
-----maxima-bounces at math.utexas.edu wrote: -----
To: maxima at math.utexas.edu
From: subiono2008 at matematika.its.ac.id
Sent by: maxima-bounces at math.utexas.edu
Date: 01/29/2012 09:15PM
Subject: How to calculate of a matrix p(A)
Dear all,
I have a problem to calcute a matrix p(A) with
p(x) is a polynomial of degree n with real koefficient
and A is a matrix of size n time n. For ?an example:
p(x)=x^2 +3x + 2 and then
p(A)=A^2+3A+2I, with I is identity matrix of size 2 time 2.
Thank you in advanced
Subiono
--
http://www.its.ac.id?
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima