Ask Your Question

Revision history [back]

Given a matrix M, say:

sage: M = matrix(ZZ, [[4, 27, -3], [-3, 2, -1], [-177, 45, 5]])
sage: M
[   4   27   -3]
[  -3    2   -1]
[-177   45    5]

You can get its entries by doing:

sage: M.coefficients()
[4, 27, -3, -3, 2, -1, -177, 45, 5]