> Typesetting:-mrow(Typesetting:-mi(
 

> with(linalg); -1
 

Finding the LU-Factorization of a Matrix in Maple 

 

This example illustrates how to use Maple to find the LU factorization of a matrix.  This is Example 2 in Section 2.5 of your textbook. 

 

> `:=`(A, matrix(4, 5, [2, 4, -1, 5, -2, -4, -5, 3, -8, 1, 2, -5, -4, 1, 8, -6, 0, 7, -3, 1])); 1
 

array( 1 .. 4, 1 .. 5, [( 1, 4 ) = 5, ( 4, 4 ) = -3, ( 2, 1 ) = -4, ( 1, 5 ) = -2, ( 3, 5 ) = 8, ( 4, 3 ) = 7, ( 3, 1 ) = 2, ( 4, 5 ) = 1, ( 4, 2 ) = 0, ( 1, 1 ) = 2, ( 3, 4 ) = 1, ( 2, 4 ) = -8, ( 4,... (1)
 

> LUdecomp(A, L = 'L', U = 'U'); -1
 

> print(L)
 

L (2)
 

> print(U)
 

U (3)
 

>