AngouriMath

Navigation

PolynomialDeterminant


← Back to list of classes

Description

Summary

The determinant of a matrix whose entries are polynomials over the rationals, by
Bareiss' fraction-free elimination — O(n^3) where Laplace expansion is
O(n!).

Remarks

Laplace is not merely slower. For a fully symbolic matrix it is optimal, because
the determinant genuinely has n! terms and no algorithm returns it smaller in
expanded form. For a numeric one it is pure waste: the answer is a single number
and O(n^3) work suffices. That is the split
#999 asks for, and
what decides it is not the size but whether the entries are polynomials this can read —
which is settled per matrix, by trying, rather than by a rule about n.
Why this cannot introduce a condition. Bareiss divides, and the usual reason to
distrust an elimination is that its divisions leave quotients excluding the points where
a pivot vanishes — the defect
#992 was about. Its
divisions are exact over an integral domain, and here they are exact and checked:
the arithmetic happens in MultivariatePolynomial, which has no quotients to
leave behind at all, and a division that does not come out returns null and sends the
caller to Laplace. So the answer is a polynomial in the entries, or it is Laplace's.
What it declines. An entry that is not a polynomial over the rationals — anything
with sin, a symbolic exponent, a genuine 1/x — a matrix in more than
MaxVariables indeterminates, and a matrix mentioning
a Constant, since e and pi are values rather than
indeterminates and this ring cannot hold them. Each is a refusal to try, not a wrong
answer, and Laplace answers them exactly as before.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online