First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You if you want the quadratic coefficient of a polynomial symbolic expression P, you can do P.coefficient(z^2), so what you can do is to apply that map to each entry of the matrix:

sage: A.apply_map(lambda e : e.coefficient(z^2))
[1 0]
[0 1]