Large symbolic determinant
I have a dense matrix with symbolic variable entries. I am interested in the equation that describes when the matrix is singular. So I have been having Sage compute the determinant of this matrix and set it equal to zero, and return this expression (a polynomial in several variables).
However when the dimensions get larger (around 9 variables) Sage is taking an incredibly long amount of time to do it. (My program has to perform a number of other tasks as well, the determinant seems to be taking up all the run-time.)
Is there any way I can speed up this kind of computation?
How big is the matrix? You say 9 variables, but do you mean a very large matrix over the symbolic ring with 9 generators, or do you mean a 9x9 matrix?
Not a 9x9, though actually it's smaller than that, a 4x4, but involves many variables. In a sense I'm actually using 18 variables, sorry. I'm taking an upper (symbolic, so I'm not sure how to make it sparse...) triangular matrix (a 4x8) formed by a set of 8 variables, say a0, ... a7. I'm multiplying this by the transpose of another upper triangular matrix with a different set of variables, say b0, ..., b6. Then I'm taking the determinant of that. (I can write the second variables in terms of the first, but I don't think it would speed up the computation.)