### Related

##### get_lu_factors-matrix-rat

m: matrix([e1,2*e2,e3...

rat(get_lu_factors(lu...

Calculate

##### get_lu_factors-matrix

A: matrix([1,2],[3,4]);

get_lu_factors(lu_fac...

Calculate

##### get_lu_factors

? get_lu_factors;

Calculate

##### get_lu_factors-matrix-rat

m: matrix([e1,2*e2,e3...

rat(get_lu_factors(lu...

Calculate

##### get_lu_factors-matrix

m: matrix([e1,2*e2,e3...

get_lu_factors(lu_fac...

Calculate

##### get_lu_factors

? get_lu_factors;

Calculate

##### get_lu_factors-matrix-rat

m: matrix([e1,2*e2,e3...

rat(get_lu_factors(lu...

Calculate

##### get_lu_factors

? get_lu_factors;

Calculate

##### get_lu_factors-matrix

A: matrix([1,2],[3,4]);

get_lu_factors(lu_fac...

Calculate

##### get_lu_factors-matrix-rat

m: matrix([2*e1,e2,e3...

rat(get_lu_factors(lu...

Calculate

### get_lu_factors

Run Example
```(%i1)A:matrix([2,2,1],[1,1,2],[2,-1,1]);
[ 2   2   1 ]
[           ]
(%o1)                            [ 1   1   2 ]
[           ]
[ 2  - 1  1 ]
(%i2) lu_factor(A);
[ 2   2   1 ]
[           ]
[ 1       3 ]
(%o2)               [[ -   0   - ], [1, 3, 2], generalring]
[ 2       2 ]
[           ]
[ 1  - 3  0 ]
(%i3) get_lu_factors(lu_factor(A));
[ 1  0  0 ]  [ 2   2   1 ]
[ 1  0  0 ]  [         ]  [           ]
[         ]  [ 1  1  0 ]  [ 0  - 3  0 ]
(%o3)              [[ 0  0  1 ], [         ], [           ]]
[         ]  [ 1       ]  [         3 ]
[ 0  1  0 ]  [ -  0  1 ]  [ 0   0   - ]
[ 2       ]  [         2 ]
(%i4) ```
Run Example
```eq: [2*x-5*y+z=-7,x+y+z=9,-x+6*y-3*z=4];
(%o1)      [z - 5 y + 2 x = - 7, z + y + x = 9, - 3 z + 6 y - x = 4]
(%i2) linsolve(eq,[x,y,z]);
(%o2)                        [x = 2, y = 3, z = 4]
(%i3) A: matrix([2,-5,1],[1,1,1],[-1,6,-3]);
[  2   - 5   1  ]
[               ]
(%o3)                          [  1    1    1  ]
[               ]
[ - 1   6   - 3 ]
(%i4) M: lu_factor(A);
[  2   - 5   1  ]
[               ]
[  1    7    1  ]
[  -    -    -  ]
(%o4)             [[  2    2    2  ], [1, 2, 3], generalring]
[               ]
[   1           ]
[ - -   1   - 3 ]
[   2           ]
(%i5) get_lu_factors(M);
[  1   0  0 ]
[           ]  [ 2  - 5   1  ]
[ 1  0  0 ]  [  1        ]  [             ]
[         ]  [  -   1  0 ]  [     7    1  ]
(%o5)            [[ 0  1  0 ], [  2        ], [ 0   -    -  ]]
[         ]  [           ]  [     2    2  ]
[ 0  0  1 ]  [   1       ]  [             ]
[ - -  1  1 ]  [ 0   0   - 3 ]
[   2       ]
(%i6) b: transpose([-7,9,4]);
[ - 7 ]
[     ]
(%o6)                               [  9  ]
[     ]
[  4  ]
(%i7) x: lu_backsub(M,b);
[ 2 ]
[   ]
(%o7)                                [ 3 ]
[   ]
[ 4 ]
(%i8) ```
Run Example
```A:matrix([2,2,1],[2,-1,1],[1,1,2]);
[ 2   2   1 ]
[           ]
(%o1)                            [ 2  - 1  1 ]
[           ]
[ 1   1   2 ]
(%i2) lu_factor(A);
[ 2   2   1 ]
[           ]
[ 1  - 3  0 ]
(%o2)               [[           ], [1, 2, 3], generalring]
[ 1       3 ]
[ -   0   - ]
[ 2       2 ]
(%i3) get_lu_factors(lu_factor(A));
[ 1  0  0 ]  [ 2   2   1 ]
[ 1  0  0 ]  [         ]  [           ]
[         ]  [ 1  1  0 ]  [ 0  - 3  0 ]
(%o3)              [[ 0  1  0 ], [         ], [           ]]
[         ]  [ 1       ]  [         3 ]
[ 0  0  1 ]  [ -  0  1 ]  [ 0   0   - ]
[ 2       ]  [         2 ]
(%i4) ```

### Related Help

Help for Get_lu_factors