Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Applying a polynomial to a matrix

In the quickref for linear algebra, it is writen that, if f(x) = x^2 + 5*x+3 then f(B) is possible.

I have tried

B=matrix([[1/2,2/3],[1/2,1/3]]) 
f(B)

but it returns an error when B^2 + 5*B + 3 returns

[34 31 33 27]
[31 34 32 28]
[27 25 43 30]
[32 32 31 30]

I'm wondering?