Student[LinearAlgebra] - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Package : Linear Algebra : Computation : Solvers : Student/LinearAlgebra/LUDecomposition

Student[LinearAlgebra]

 LUDecomposition
 compute the PLU or PLU1R decomposition of a Matrix

 Calling Sequence LUDecomposition(A, out, options)

Parameters

 A - Matrix out - (optional) equation of the form output = obj where obj is one of 'P', 'L', 'U', 'U1', or 'R', or a list consisting of one or more of these names; selects result objects to compute options - (optional) parameters; for a complete list, see LinearAlgebra[LUDecomposition]

Description

 • The LUDecomposition command computes a PLU decomposition or a modified PLU1R decomposition of the Matrix A.
 Depending on what is included in the output option (out), an expression sequence containing one or more of the factors P, L, U, U1, and R can be returned. The objects are returned in the same order as specified in the output list.
 Note:  Either U or the pair U1 and R may be returned, but not both.
 • The LUDecomposition(A) calling sequence is equivalent to LUDecomposition(A, output=['P','L','U']). This LU decomposition generates a square unit lower triangular L factor and an upper triangular factor U with the same dimensions as A so that $A=P\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}L\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}U$.  The Matrix P is a permutation Matrix.
 The PLU1R decomposition is achieved by using LUDecomposition(A, output=['P','L','U1','R']).  This further factors U into $\mathrm{U1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}R$ where U1 is square upper triangular factor and R is the unique reduced row echelon form of the Matrix A. In this case, $A=P\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}L\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{U1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}R$.
 • The output option (out) determines the content of the returned expression sequence.

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{LinearAlgebra}]\right):$
 > $A≔⟨⟨0,-2,0,3⟩|⟨1,3,0,1⟩|⟨1,1,0,0⟩|⟨-3,4,1,0⟩⟩$
 ${A}{≔}\left[\begin{array}{rrrr}{0}& {1}& {1}& {-}{3}\\ {-}{2}& {3}& {1}& {4}\\ {0}& {0}& {0}& {1}\\ {3}& {1}& {0}& {0}\end{array}\right]$ (1)
 > $p,l,u≔\mathrm{LUDecomposition}\left(A\right)$
 ${p}{,}{l}{,}{u}{≔}\left[\begin{array}{rrrr}{0}& {1}& {0}& {0}\\ {1}& {0}& {0}& {0}\\ {0}& {0}& {0}& {1}\\ {0}& {0}& {1}& {0}\end{array}\right]{,}\left[\begin{array}{cccc}{1}& {0}& {0}& {0}\\ {0}& {1}& {0}& {0}\\ {-}\frac{{3}}{{2}}& \frac{{11}}{{2}}& {1}& {0}\\ {0}& {0}& {0}& {1}\end{array}\right]{,}\left[\begin{array}{cccc}{-}{2}& {3}& {1}& {4}\\ {0}& {1}& {1}& {-}{3}\\ {0}& {0}& {-}{4}& \frac{{45}}{{2}}\\ {0}& {0}& {0}& {1}\end{array}\right]$ (2)
 > $p\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}l\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}u$
 $\left[\begin{array}{rrrr}{0}& {1}& {1}& {-}{3}\\ {-}{2}& {3}& {1}& {4}\\ {0}& {0}& {0}& {1}\\ {3}& {1}& {0}& {0}\end{array}\right]$ (3)
 > $B≔⟨⟨1,0,2⟩|⟨3,1,4⟩|⟨6,1,4⟩|⟨1,1,2⟩⟩:$

To reduce a Matrix using Gaussian elimination, specify the 'U' object:

 > $\mathrm{LUDecomposition}\left(A,\mathrm{output}='U'\right)$
 $\left[\begin{array}{cccc}{-}{2}& {3}& {1}& {4}\\ {0}& {1}& {1}& {-}{3}\\ {0}& {0}& {-}{4}& \frac{{45}}{{2}}\\ {0}& {0}& {0}& {1}\end{array}\right]$ (4)

To reduce a Matrix using Gauss-Jordan elimination, specify the 'R' object:

 > $\mathrm{LUDecomposition}\left(B,\mathrm{output}='R'\right)$
 $\left[\begin{array}{cccc}{1}& {0}& {0}& {-}{1}\\ {0}& {1}& {0}& \frac{{4}}{{3}}\\ {0}& {0}& {1}& {-}\frac{{1}}{{3}}\end{array}\right]$ (5)

References

 For more information on the P*L*U1*R decomposition see:
 Corless, Robert M., and Jeffrey, David J. "The Turing Factorization of a Rectangular Matrix." Sigsam Bulletin, Vol. 31 no. 3. (September 1997): 20-28.
 This paper names the U1 factor U.