# Computation of determinant of a matrix with elements from an arbitrary commutative ring

The cofactor formula for computing the determinant of a matrix is applicable when elements of the matrix are from a commutative ring. However, the complexity of this method is extremely high and I believe there should be a better solution.

If it is a matrix over a PID, I believe the method of elimination like Smith normal form may be applicable. But if have a more general ring which is not a PID, are there known methods to do something similar?

-
In a domain you can compute in the fraction field and use the usual algorithm of triangularization. This will give you the determinant a a quotient of elements of your ring... –  Mariano Suárez-Alvarez Aug 9 '12 at 23:53
Smith normal form works slightly more generally than in PIDs; see this answer. –  joriki Aug 9 '12 at 23:55
@MarianoSuárez-Alvarez Thank you for quick response. I do want this to work for rings with zero divisors though. –  Tunococ Aug 10 '12 at 0:11
@joriki It seems like an elementary divisor ring is (roughly) a ring in which Smith normal form works. I am expecting an alternative of Smith normal form when we cannot use Smith normal form. Anyway, thank you for showing me that link. –  Tunococ Aug 10 '12 at 0:21
@Tunococ: OK, here's another comment that may well turn out not to be useful :-) If you have an efficient way of finding out whether and how a certain element can be written as a linear combination of certain others, you could try to produce as many zeros as you can and then use the cofactor expansion. –  joriki Aug 10 '12 at 0:30