linalg(deprecated)/LUdecomp - Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : linalg(deprecated)/LUdecomp

linalg(deprecated)

  

LUdecomp

  

LU decomposition of a matrix

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

LUdecomp(A)

LUdecomp(A, arg2, arg3, ...)

LUdecomp(A, P='p', L='l', U='u' , U1='u1', R='r', rank='ran', det='d')

Parameters

A

-

rectangular matrix

arg.i

-

(optional) of the form name=val

P='p'

-

(optional) the pivot factor

L='l'

-

(optional) the unit lower triangular factor

U='u'

-

(optional) the upper triangular factor

U1='u1'

-

(optional) the modified U factor

R='r'

-

(optional) the row-reduced factor

rank='ran'

-

(optional) the rank of A

det='d'

-

(optional) the determinant of U1

Description

• 

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[LUDecomposition], instead.

  

- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.

• 

The routine LUdecomp computes both the traditional LU decomposition and a modified PLU1R decomposition of the matrix A.  It returns U.

• 

For matrices of floating-point entries, a partial (row) pivoting method is used.  For symbolic computation, pivoting is done only when a leading entry is zero.  The pivot (permutation) matrix is returned as P.

• 

The basic decomposition generates a square unit lower triangular L factor and an upper triangular U factor with the same dimensions as A so that A = P*L*U.

• 

The decomposition further factors U into U1*R where U1 is square upper triangular and R is the unique reduced row-echelon form of the matrix A.  In this case A = P*L*U1*R.

• 

The det parameter is defined to be the determinant of the U1 factor. This is non-zero for all matrices.  When A has full rank, this will coincide with the determinant of A.

• 

The rank parameter will be the rank of A.  This will be of questionable value if A is composed of floating-point values and is ill-conditioned.

• 

U1 is assumed to be non-singular.  The matrix R, i.e. the row-echelon factor of A, will only be correct if this is the case.  If A has parameters in its entries, and for some values of the parameters det(U1) = 0, then the row-echelon form must be recomputed for these values of the parameters.

• 

Note that this paper names the U1 factor simply U.

• 

The command with(linalg,LUdecomp) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[LUDecomposition], instead.

withlinalg:

A12312k6613k30

A1−2312k66−13k30

(1)

xLUdecompA,L='l',U='u',U1='u1',R='r',P='p',det='d',rank='ran'

x1−2310k+40400kkk+4

(2)

show the results

rankx

3

(3)

evalmx

1−2310k+40400kkk+4

(4)

evalml

100210−11k+41

(5)

verify the decomposition (p is the identity).

mapnormal,evalml &* u

1−2312k66−13k30

(6)

evalmr

10.0.9+kk+4010.4k+40011k+4

(7)

evalmu1

1−230k+4000k

(8)

detu1

k+4k

(9)

det(u1) = k*(4+k) so u1 is singular when k=-4 or k=0, we investigate these separately

xLUdecompsubsk=0,opA,R='r',det='d',rank='ran'

x1−23104040000

(10)

evalmr

10.3301010000

(11)

xLUdecompsubsk=4,opA,R='r',det='d',rank='ran'

x1−23101−410004

(12)

evalmr

10.−50.01−40.0001

(13)

d

4

(14)

ran

3

(15)

and floating point gaussian elimination

Amatrixevalf1,2,3,2,4,5,3,6,7

A1.2.3.2.4.5.3.6.7.

(16)

ULUdecompA,P='p',L='l'

U3.6.7.0.0.0.6666666666666670.0.0.

(17)

evalmp

0.1.0.0.0.1.1.0.0.

(18)

References

  

Corless, Robert M.; Jeffrey, David; and Nerenberg, M. A. H. "The Row Echelon Decomposition of a Matrix." University of Western Ontario Tech Report AM-91-01, Department of Applied Mathematics, 1991.

See Also

linalg(deprecated)[backsub]

linalg(deprecated)[gausselim]

linalg(deprecated)[gaussjord]

LinearAlgebra