You can see the source of the "minors" method using sage: M.minors??
(you need to have defined M beforehand). By browsing at that source one can easily find the general way of doing it: sage: A = Matrix(QQ, 3, [1,2,3,4,5,6,7,8,9]) sage: [A.matrix_from_rows_and_columns(rows, cols) for cols in combinations_iterator(range(A.ncols()), 2) for rows in combinations_iterator(range(A.nrows()),2)] [ [1 2] [1 2] [4 5] [1 3] [1 3] [4 6] [2 3] [2 3] [5 6] [4 5], [7 8], [7 8], [4 6], [7 9], [7 9], [5 6], [8 9], [8 9] ] Cheers J On Feb 1, 12:10 pm, janwil <[email protected]> wrote: > Hi all, > > Is there a way to get all the k-minors of a matrix as a list of > matrices? Currently there is a method M.minors(2), but this only > produces the list of determinants. What about the matrices themselves? > Obviously, Sage must have them somewhere internally to compute the > determinants, but how to get access to them? > > Best regards, > Jan -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
