Determinant - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Generic]

  

Determinant

  

compute the determinant of a square Matrix

 

Calling Sequence

Parameters

Description

Examples

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[`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.

Examples

withLinearAlgebraGeneric:

Z`0`,Z`1`,Z`+`,Z`-`,Z`*`,Z`=`0,1,`+`,`-`,`*`,`=`:

AMatrix2,1,4,3,2,1,0,0,5

A214321005

(1)

DeterminantZA

5

(2)

Q`0`,Q`1`,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`0,1,`+`,`-`,`*`,`/`,`=`:

AMatrix2,1,4,6,3,2,1,7,0,0,5,1,0,0,3,8

A2146321700510038

(3)

DeterminantQA

37

(4)

DeterminantQA,method=BerkowitzAlgorithm

37

(5)

See Also

LinearAlgebra[Determinant]

LinearAlgebra[Generic]

LinearAlgebra[Generic][BareissAlgorithm]

LinearAlgebra[Generic][BerkowitzAlgorithm]

LinearAlgebra[Generic][GaussianElimination]

LinearAlgebra[Generic][MinorExpansion]