> > read("/afs/eos.ncsu.edu/users/k/kaltofen/www/courses/LinAlgebra/Maple/ > RefPkg/InitPkg.mpl"); libname := /afs/eos.ncsu.edu/users/k/kaltofen/www/courses/LinAlg\ ebra/Maple, "/afs/bp.ncsu.edu/dist/maple70/lib" > with('RefPkg'); [E_I, E_II, E_III, MyDet, MyInverse, MySolve, Ref, XRef] > ?Ref > > help(Ref); # > with(LinearAlgebra); [Add, Adjoint, BackwardSubstitute, BandMatrix, Basis, BezoutMatrix, BidiagonalForm, BilinearForm, CharacteristicMatrix, CharacteristicPolynomial, Column, ColumnDimension, ColumnOperation, ColumnSpace, CompanionMatrix, ConditionNumber, ConstantMatrix, ConstantVector, CreatePermutation, CrossProduct, DeleteColumn, DeleteRow, Determinant, DiagonalMatrix, Dimension, Dimensions, DotProduct, Eigenvalues, Eigenvectors, Equal, ForwardSubstitute, FrobeniusForm, GaussianElimination, GenerateEquations, GenerateMatrix, GetResultDataType, GetResultShape, GivensRotationMatrix, GramSchmidt, HankelMatrix, HermiteForm, HermitianTranspose, HessenbergForm, HilbertMatrix, HouseholderMatrix, IdentityMatrix, IntersectionBasis, IsDefinite, IsOrthogonal, IsSimilar, IsUnitary, JordanBlockMatrix, JordanForm, LA_Main, LUDecomposition, LeastSquares, LinearSolve, Map, Map2, MatrixAdd, MatrixInverse, MatrixMatrixMultiply, MatrixNorm, MatrixScalarMultiply, MatrixVectorMultiply, MinimalPolynomial, Minor, Multiply, NoUserValue, Norm, Normalize, NullSpace, OuterProductMatrix, Permanent, Pivot, QRDecomposition, RandomMatrix, RandomVector, Rank, ReducedRowEchelonForm, Row, RowDimension, RowOperation, RowSpace, ScalarMatrix, ScalarMultiply, ScalarVector, SchurForm, SingularValues, SmithForm, SubMatrix, SubVector, SumBasis, SylvesterMatrix, ToeplitzMatrix, Trace, Transpose, TridiagonalForm, UnitVector, VandermondeMatrix, VectorAdd, VectorAngle, VectorMatrixMultiply, VectorNorm, VectorScalarMultiply, ZeroMatrix, ZeroVector, Zip] > A := Matrix(2,4,[[1,3,1,5],[2,0,-1,0]]); [1 3 1 5] A := [ ] [2 0 -1 0] > Ref(A); Searching column 1 Added row 1 times , -2, to row 2 [1 3 1 5] [ ] [0 -6 -3 -10] [1 3 1 5] [ ] [0 -6 -3 -10] > ReducedRowEchelonForm(A); [1 0 -1/2 0 ] [ ] [0 1 1/2 5/3] > infolevel['Ref']:=3; infolevel[Ref] := 3 > Ref(A); Searching column 1 Added row 1 times , -2, to row 2 [1 3 1 5] [ ] [0 -6 -3 -10] [1 3 1 5] [ ] [0 -6 -3 -10] > rnd:=rand(-5..5); rnd := proc() local t; global _seed; _seed := irem(a*_seed, p); t := _seed; to concats do _seed := irem(a*_seed, p); t := s*t + _seed end do; irem(t, divisor) + offset end proc > rnd(); -5 > B := Matrix(5,6); [0 0 0 0 0 0] [ ] [0 0 0 0 0 0] [ ] B := [0 0 0 0 0 0] [ ] [0 0 0 0 0 0] [ ] [0 0 0 0 0 0] > for i from 1 to 5 do for j from 1 to 6 do B[i,j]:=rnd(); od: od: > B; [ 5 -5 -4 -1 -3 5] [ ] [-3 1 3 5 -4 4] [ ] [-1 3 -5 5 2 -4] [ ] [ 3 -3 5 2 4 -3] [ ] [-3 -1 -5 -2 -2 -4] > Ref(B); Searching column 1 Added row 1 times , 3/5, to row 2 [ 5 -5 -4 -1 -3 5] [ ] [ 0 -2 3/5 22/5 -29/5 7] [ ] [-1 3 -5 5 2 -4] [ ] [ 3 -3 5 2 4 -3] [ ] [-3 -1 -5 -2 -2 -4] Added row 1 times , 1/5, to row 3 [ 5 -5 -4 -1 -3 5] [ ] [ 0 -2 3/5 22/5 -29/5 7] [ ] [ 0 2 -29/5 24/5 7/5 -3] [ ] [ 3 -3 5 2 4 -3] [ ] [-3 -1 -5 -2 -2 -4] Added row 1 times , -3/5, to row 4 [ 5 -5 -4 -1 -3 5] [ ] [ 0 -2 3/5 22/5 -29/5 7] [ ] [ 0 2 -29/5 24/5 7/5 -3] [ ] [ 0 0 37/5 13/5 29/5 -6] [ ] [-3 -1 -5 -2 -2 -4] Added row 1 times , 3/5, to row 5 [5 -5 -4 -1 -3 5] [ ] [0 -2 3/5 22/5 -29/5 7] [ ] [0 2 -29/5 24/5 7/5 -3] [ ] [0 0 37/5 13/5 29/5 -6] [ ] [0 -4 -37/5 -13/5 -19/5 -1] Searching column 2 Added row 2 times , 1, to row 3 [5 -5 -4 -1 -3 5] [ ] [0 -2 3/5 22/5 -29/5 7] [ ] [0 0 -26/5 46/5 -22/5 4] [ ] [0 0 37/5 13/5 29/5 -6] [ ] [0 -4 -37/5 -13/5 -19/5 -1] Added row 2 times , 0, to row 4 [5 -5 -4 -1 -3 5] [ ] [0 -2 3/5 22/5 -29/5 7] [ ] [0 0 -26/5 46/5 -22/5 4] [ ] [0 0 37/5 13/5 29/5 -6] [ ] [0 -4 -37/5 -13/5 -19/5 -1] Added row 2 times , -2, to row 5 [5 -5 -4 -1 -3 5] [ ] [0 -2 3/5 22/5 -29/5 7] [ ] [0 0 -26/5 46/5 -22/5 4] [ ] [0 0 37/5 13/5 29/5 -6] [ ] [0 0 -43/5 -57/5 39/5 -15] Searching column 3 37 Added row 3 times , --, to row 4 26 [5 -5 -4 -1 -3 5 ] [ ] [0 -2 3/5 22/5 -29/5 7 ] [ ] [0 0 -26/5 46/5 -22/5 4 ] [ ] [ 204 -6 -4 ] [0 0 0 --- -- -- ] [ 13 13 13 ] [ ] [0 0 -43/5 -57/5 39/5 -15] -43 Added row 3 times , ---, to row 5 26 [5 -5 -4 -1 -3 5 ] [ ] [0 -2 3/5 22/5 -29/5 7 ] [ ] [0 0 -26/5 46/5 -22/5 4 ] [ ] [ 204 -6 -4 ] [0 0 0 --- -- -- ] [ 13 13 13 ] [ ] [ -346 196 -281] [0 0 0 ---- --- ----] [ 13 13 13 ] Searching column 4 173 Added row 4 times , ---, to row 5 102 [5 -5 -4 -1 -3 5 ] [ ] [0 -2 3/5 22/5 -29/5 7 ] [ ] [0 0 -26/5 46/5 -22/5 4 ] [ ] [ 204 -6 -4 ] [0 0 0 --- -- -- ] [ 13 13 13 ] [ ] [ 243 -1129] [0 0 0 0 --- -----] [ 17 51 ] [5 -5 -4 -1 -3 5 ] [ ] [0 -2 3/5 22/5 -29/5 7 ] [ ] [0 0 -26/5 46/5 -22/5 4 ] [ ] [ 204 -6 -4 ] [0 0 0 --- -- -- ] [ 13 13 13 ] [ ] [ 243 -1129] [0 0 0 0 --- -----] [ 17 51 ] > ReducedRowEchelonForm(B); [ 4007 ] [1 0 0 0 0 ---- ] [ 2916 ] [ ] [ 2845 ] [0 1 0 0 0 ---- ] [ 2916 ] [ ] [ 23 ] [0 0 1 0 0 -- ] [ 54 ] [ ] [ -95 ] [0 0 0 1 0 ---- ] [ 1458 ] [ ] [ -1129] [0 0 0 0 1 -----] [ 729 ] > C:=Matrix(3,3); [0 0 0] [ ] C := [0 0 0] [ ] [0 0 0] > for i from 1 to 3 do for j from 1 to 3 do C[i,j]:=rnd(); od: od: > C; [ 1 1 3] [ ] [-4 0 4] [ ] [-1 2 4] > Ref(C); Searching column 1 Added row 1 times , 4, to row 2 [ 1 1 3] [ ] [ 0 4 16] [ ] [-1 2 4] Added row 1 times , 1, to row 3 [1 1 3] [ ] [0 4 16] [ ] [0 3 7] Searching column 2 Added row 2 times , -3/4, to row 3 [1 1 3] [ ] [0 4 16] [ ] [0 0 -5] [1 1 3] [ ] [0 4 16] [ ] [0 0 -5] > ReducedRowEchelonForm(C); [1 0 0] [ ] [0 1 0] [ ] [0 0 1] > Ref(C,2); Searching column 1 Added row 1 times , 4, to row 2 [ 1 1 3] [ ] [ 0 4 16] [ ] [-1 2 4] Added row 1 times , 1, to row 3 [1 1 3] [ ] [0 4 16] [ ] [0 3 7] Searching column 2 Added row 2 times , -3/4, to row 3 [1 1 3] [ ] [0 4 16] [ ] [0 0 -5] [1 1 3] [ ] [0 4 16] [ ] [0 0 -5] > Ref(C,1); Searching column 1 Added row 1 times , 4, to row 2 [ 1 1 3] [ ] [ 0 4 16] [ ] [-1 2 4] Added row 1 times , 1, to row 3 [1 1 3] [ ] [0 4 16] [ ] [0 3 7] [1 1 3] [ ] [0 4 16] [ ] [0 3 7] > >