Sponsored links: Algebra eBooks
 

Related

lu_factor

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

Related Help

Help for Lu_factor