 Bareiss Algorithm - Maple Help

LinearAlgebra[Generic]

 BareissAlgorithm
 apply the Bareiss algorithm to a Matrix Calling Sequence BareissAlgorithm[D](A) BareissAlgorithm[D](A,r,d) Parameters

 D - the domain of computation A - rectangular Matrix of values in D r - name d - name Description

 • The (indexed) parameter D specifies the domain of computation, an integral domain (a commutative ring with exact division). It must be a Maple table/module which has the following values/exports:
 D : a constant for the zero of the ring D
 D : a constant for the (multiplicative) identity of D
 D[+] : a procedure for adding elements of D (nary)
 D[-] : a procedure for negating and subtracting elements of D (unary and binary)
 D[*] : a procedure for multiplying elements of D (binary and commutative)
 D[=] : a boolean procedure for testing if two elements of D are equal
 D[Divide] : a boolean procedure for testing if a | b in D, and if so assigns q the value of a / b.
 • BareissAlgorithm[D](A) runs Bareiss' fraction-free row reduction on a copy of A.
 • The output Matrix B is upper triangular, and the entry B[i,i] is the determinant of the principal i x i submatrix of A. Thus if A is a square Matrix of dimension n, then B[n,n] is the determinant of A up to a unit. Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\left[\mathrm{Generic}\right]\right):$
 > $Z\left[\mathrm{0}\right],Z\left[\mathrm{1}\right],Z\left[\mathrm{+}\right],Z\left[\mathrm{-}\right],Z\left[\mathrm{*}\right],Z\left[\mathrm{=}\right]≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{=}:$
 > Z[Divide] := proc(a,b,q) evalb( irem(args) = 0 ) end proc:
 > $A≔\mathrm{Matrix}\left(\left[\left[3,4,5,7\right],\left[5,7,11,13\right],\left[7,11,13,17\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cccc}{3}& {4}& {5}& {7}\\ {5}& {7}& {11}& {13}\\ {7}& {11}& {13}& {17}\end{array}\right]$ (1)
 > $\mathrm{BareissAlgorithm}\left[Z\right]\left(A,'r'\right)$
 $\left[\begin{array}{cccc}{3}& {4}& {5}& {7}\\ {0}& {1}& {8}& {4}\\ {0}& {0}& {-12}& {-6}\end{array}\right]$ (2)
 > $r$
 ${3}$ (3)