Ask Your Question

Revision history [back]

You can create lists of rows and columns and use them to cut out a submatrix. E.g.

 sage: M=matrix([[1,2,3,4],[3,4,5,6],[6,7,8,9]])
 sage: M[[0,2],[0,2]]
 [1 3]
 [6 8]