First time here? Check out the FAQ!
answered 7 years ago
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:
P.coefficient(z^2)
sage: A.apply_map(lambda e : e.coefficient(z^2)) [1 0] [0 1]