linalg::det
-- determinant of a
matrixlinalg::det
(A)
computes the determinant of
the square matrix A.
linalg::det(A)
A |
- | a square matrix of a domain of category Cat::Matrix . |
an element of the component ring of A
.
linalg::gaussElim
, linalg::permanent
, linalg::rank
, numeric::det
numeric::det
, if
A
is defined over the component ring Dom::Float
. In this case it is
recommended to call numeric::det
directly for a better
efficiency.A
must be a commutative ring,
i.e., a domain of category Cat::CommutativeRing
.We compute the determinant of the following matrix:
>> A := matrix([[a11, a12], [a21, a22]])
+- -+ | a11, a12 | | | | a21, a22 | +- -+
which gives us the well-known formula for the determinant of an arbitrary 2x2 matrix:
>> linalg::det(A)
a11 a22 - a12 a21
det(A):= Sum( sign(s)*Prod( a[s(j),j],j=1..n ), s in Sn )(Sn is the symmetric group of all permutations of {1,...,n}.)
Cat::IntegralDomain
) and not
defined over the domain Dom::Float
, Gaussian elimination is used
to compute the determinant of A.
For any other commutative ring that is not an integral domain, a modification of the Berkowitz algorithm is used. Reference: A. Jounaidi: The Berkowitz Algorithm, Maple and Computing the Characteristic Polynomial in an Arbitrary Commutative Ring. Equipe de Mathèmatiques de Besancon, Universitè de Franche - Comtè, 25030 Besancon Cedex, May 1996.
numeric::det
for
a floating-point approximation of the determinant.