ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 May 2019 16:32:20 +0200Formal determinant of symbolic matrixhttps://ask.sagemath.org/question/46624/formal-determinant-of-symbolic-matrix/ I have some sparse symbolic matrices, and want to compute their formal determinant (without cancellation of terms). In other words, if I have the matrix
x,y = var('x,y')
M = Matrix(SR, [[x,y],[x,y]])
I would like the result of
M.determinant()
to be x*y - x*y, rather than just 0. The variables in each monomial are allowed to commute with each other, but on the other hand I would like all monomials containing a 0 to vanish (i.e if in the example above M = Matrix(SR, [[x,0],[x,y]])), then the determinant should be just x*y, rather than x*y - 0*x).
Is there a way to achieve this (without using the expansion of the determinant as permutations, since the dimension of the matrices gets quite big!)? Thanks in advance!
danieleCWed, 22 May 2019 16:32:20 +0200https://ask.sagemath.org/question/46624/