 Determinant - Maple Help

LinearAlgebra[Generic]

 Determinant
 compute the determinant of a square Matrix Calling Sequence Determinant[R](A) Determinant[R](A,method=BerkowitzAlgorithm) Determinant[R](A,method=MinorExpansion) Determinant[R](A,method=BareissAlgorithm) Determinant[R](A,method=GaussianElimination) Parameters

 R - the domain of computation A - square Matrix of values in R Description

 • 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 : a constant for the zero of the ring R
 R : 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. Examples

 > $\mathrm{with}\left({\mathrm{LinearAlgebra}}_{\mathrm{Generic}}\right):$
 > ${Z}_{\mathrm{0}},{Z}_{\mathrm{1}},{Z}_{\mathrm{+}},{Z}_{\mathrm{-}},{Z}_{\mathrm{*}},{Z}_{\mathrm{=}}≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{=}:$
 > $A≔\mathrm{Matrix}\left(\left[\left[2,1,4\right],\left[3,2,1\right],\left[0,0,5\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{2}& {1}& {4}\\ {3}& {2}& {1}\\ {0}& {0}& {5}\end{array}\right]$ (1)
 > ${\mathrm{Determinant}}_{Z}\left(A\right)$
 ${5}$ (2)
 > ${Q}_{\mathrm{0}},{Q}_{\mathrm{1}},{Q}_{\mathrm{+}},{Q}_{\mathrm{-}},{Q}_{\mathrm{*}},{Q}_{\mathrm{/}},{Q}_{\mathrm{=}}≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{/},\mathrm{=}:$
 > $A≔\mathrm{Matrix}\left(\left[\left[2,1,4,6\right],\left[3,2,1,7\right],\left[0,0,5,1\right],\left[0,0,3,8\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cccc}{2}& {1}& {4}& {6}\\ {3}& {2}& {1}& {7}\\ {0}& {0}& {5}& {1}\\ {0}& {0}& {3}& {8}\end{array}\right]$ (3)
 > ${\mathrm{Determinant}}_{Q}\left(A\right)$
 ${37}$ (4)
 > ${\mathrm{Determinant}}_{Q}\left(A,\mathrm{method}=\mathrm{BerkowitzAlgorithm}\right)$
 ${37}$ (5)