Sponsored links: Algebra eBooks
 

Related

lu_factor

Run Example
(%i1)A: matrix([1,-1,2],[2,1,-2],[3,-2,1]);
                                [ 1  - 1   2  ]
                                [             ]
(%o1)                           [ 2   1   - 2 ]
                                [             ]
                                [ 3  - 2   1  ]
(%i2) lu_factor(A);
                    [ 1  - 1   2  ]
                    [             ]
                    [ 2   3   - 6 ]
(%o2)              [[             ], [1, 2, 3], generalring]
                    [     1       ]
                    [ 3   -   - 3 ]
                    [     3       ]
(%i3) 
Run Example
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
A:matrix([2,-1,1],[2,-1,1],[1,1,2]);
                                 [ 2  - 1  1 ]
                                 [           ]
(%o1)                            [ 2  - 1  1 ]
                                 [           ]
                                 [ 1   1   2 ]
(%i2) lu_factor(A);
                     [ 2  - 1  1 ]
                     [           ]
                     [ 1   0   0 ]
(%o2)               [[           ], [1, 3, 2], generalring]
                     [ 1   3   3 ]
                     [ -   -   - ]
                     [ 2   2   2 ]
(%i3) 

Related Help

Help for Lu_factor