LinearAlgebra[Generic]
Determinant
compute the determinant of a square Matrix
Calling Sequence
Parameters
Description
Examples
Determinant[R](A)
Determinant[R](A,method=BerkowitzAlgorithm)
Determinant[R](A,method=MinorExpansion)
Determinant[R](A,method=BareissAlgorithm)
Determinant[R](A,method=GaussianElimination)
R
-
the domain of computation
A
square Matrix of values in R
The parameter A must be a square (n x n) Matrix of values from R.
The (indexed) parameter R, which specifies the domain of computation, a commutative ring, must be a Maple table/module which has the following values/exports:
R[`0`] : a constant for the zero of the ring R
R[`1`] : a constant for the (multiplicative) identity of R
R[`+`] : a procedure for adding elements of R (nary)
R[`-`] : a procedure for negating and subtracting elements of R (unary and binary)
R[`*`] : a procedure for multiplying elements of R (binary and commutative)
R[`=`] : a boolean procedure for testing if two elements of R are equal
The optional argument method=... specifies the algorithm to be used. The specific algorithms are as follows:
method=MinorExpansion directs the code to use minor expansion. This algorithm uses O(n 2^n) arithmetic operations in R.
method=BerkowitzAlgorithm directs the code to use the Berkowitz algorithm. This algorithm uses O(n^4) arithmetic operations in R.
method=BareissAlgorithm directs the code to use the Bareiss algorithm. This algorithm uses O(n^3) arithmetic operations in R but requires exact division, i.e., it requires R to be an integral domain with the following operation defined:
R[Divide]: a boolean procedure for dividing two elements of R where R[Divide](a,b,'q') outputs true if b | a and optionally assigns q the quotient such that a = b q.
method=GaussianElimination directs the code to use the Gaussian elimination algorithm. This algorithm uses O(n^3) arithmetic operations in R but requires R to be a field, i.e., the following operation must be defined:
R[`/`]: a procedure for dividing two elements of R
If the method is not given and the operation R[Divide] is defined, then the Bareiss algorithm is used, otherwise if the operation R[`/`] is defined then GaussianElimination is used, otherwise the Berkowitz algorithm is used.
with⁡LinearAlgebraGeneric:
Z`0`,Z`1`,Z`+`,Z`-`,Z`*`,Z`=`≔0,1,`+`,`-`,`*`,`=`:
A≔Matrix⁡2,1,4,3,2,1,0,0,5
A≔214321005
DeterminantZ⁡A
5
Q`0`,Q`1`,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`≔0,1,`+`,`-`,`*`,`/`,`=`:
A≔Matrix⁡2,1,4,6,3,2,1,7,0,0,5,1,0,0,3,8
A≔2146321700510038
DeterminantQ⁡A
37
DeterminantQ⁡A,method=BerkowitzAlgorithm
See Also
LinearAlgebra[Determinant]
LinearAlgebra[Generic][BareissAlgorithm]
LinearAlgebra[Generic][BerkowitzAlgorithm]
LinearAlgebra[Generic][GaussianElimination]
LinearAlgebra[Generic][MinorExpansion]
Download Help Document