Sponsored links: Algebra eBooks
 

Related

rowop

Run Example
(%i1)rowdiv(A,i,a):=rowop(A,i,i,1-1/a);
                                                         1
(%o1)              rowdiv(A, i, a) := rowop(A, i, i, 1 - -)
                                                         a
(%i2) columndiv(A,i,a):=columnop(A,i,i,1-1/a);
                                                            1
(%o2)           columndiv(A, i, a) := columnop(A, i, i, 1 - -)
                                                            a
(%i3) 
Run Example
load(linearalgebra);
(%o1)   /usr/share/maxima/5.21.1/share/linearalgebra/linearalgebra.mac
(%i2) fpprec:4;
(%o2)                                  4
(%i3) fpprintprec:fpprec;
(%o3)                                  4
(%i4) A: matrix([7, 8, 9],[8, 9, 10],[9, 10, 8]);
                                 [ 7  8   9  ]
                                 [           ]
(%o4)                            [ 8  9   10 ]
                                 [           ]
                                 [ 9  10  8  ]
(%i5)  	B: matrix:([24, 27, 27]);
(%o5)                            [24, 27, 27]
(%i6) AB: bfloat(addcol(A, B));
                        [ 7.0b0  8.0b0  9.0b0  2.4b1 ]
                        [                            ]
(%o6)                   [ 8.0b0  9.0b0  1.0b1  2.7b1 ]
                        [                            ]
                        [ 9.0b0  1.0b1  8.0b0  2.7b1 ]
(%i7) AB: bfloat(echelon(AB));
`rat' replaced 7.0B0 by 7/1 = 7.0B0
`rat' replaced 8.0B0 by 8/1 = 8.0B0
`rat' replaced 9.0B0 by 9/1 = 9.0B0
`rat' replaced 2.4B1 by 24/1 = 2.4B1
`rat' replaced 8.0B0 by 8/1 = 8.0B0
`rat' replaced 9.0B0 by 9/1 = 9.0B0
`rat' replaced 1.0B1 by 10/1 = 1.0B1
`rat' replaced 2.7B1 by 27/1 = 2.7B1
`rat' replaced 9.0B0 by 9/1 = 9.0B0
`rat' replaced 1.0B1 by 10/1 = 1.0B1
`rat' replaced 8.0B0 by 8/1 = 8.0B0
`rat' replaced 2.7B1 by 27/1 = 2.7B1
                     [ 1.0b0  1.143b0  1.286b0  3.429b0 ]
                     [                                  ]
(%o7)                [ 0.0b0   1.0b0    2.0b0    3.0b0  ]
                     [                                  ]
                     [ 0.0b0   0.0b0    1.0b0    1.0b0  ]
(%i8) AB: bfloat(rowop(AB, 2, 3, 2));
                     [ 1.0b0  1.143b0  1.286b0  3.429b0 ]
                     [                                  ]
(%o8)                [ 0.0b0   1.0b0    0.0b0    1.0b0  ]
                     [                                  ]
                     [ 0.0b0   0.0b0    1.0b0    1.0b0  ]
(%i9) AB: bfloat(rowop(AB, 1, 3, bfloat(9/7)));
                      [ 1.0b0  1.143b0  0.0b0  2.143b0 ]
                      [                                ]
(%o9)                 [ 0.0b0   1.0b0   0.0b0   1.0b0  ]
                      [                                ]
                      [ 0.0b0   0.0b0   1.0b0   1.0b0  ]
(%i10) AB: bfloat(rowop(AB, 1, 2, bfloat(8/7)));
                        [ 1.0b0  0.0b0  0.0b0  1.0b0 ]
                        [                            ]
(%o10)                  [ 0.0b0  1.0b0  0.0b0  1.0b0 ]
                        [                            ]
                        [ 0.0b0  0.0b0  1.0b0  1.0b0 ]
(%i11) 
Run Example
A:matrix([1,1,1,1],[1,0,1,1],[1,1,0,1],[1,1,1,0]);
                                [ 1  1  1  1 ]
                                [            ]
                                [ 1  0  1  1 ]
(%o1)                           [            ]
                                [ 1  1  0  1 ]
                                [            ]
                                [ 1  1  1  0 ]
(%i2) row(A,2) - row(A,1);
(%o2)                          [ 0  - 1  0  0 ]
(%i3) A:rowop(A,2,1,1);
                               [ 1   1   1  1 ]
                               [              ]
                               [ 0  - 1  0  0 ]
(%o3)                          [              ]
                               [ 1   1   0  1 ]
                               [              ]
                               [ 1   1   1  0 ]
(%i4) A:rowop(A,3,1,1);
                              [ 1   1    1   1 ]
                              [                ]
                              [ 0  - 1   0   0 ]
(%o4)                         [                ]
                              [ 0   0   - 1  0 ]
                              [                ]
                              [ 1   1    1   0 ]
(%i5) A:rowop(A,4,1,1);
                             [ 1   1    1    1  ]
                             [                  ]
                             [ 0  - 1   0    0  ]
(%o5)                        [                  ]
                             [ 0   0   - 1   0  ]
                             [                  ]
                             [ 0   0    0   - 1 ]
(%i6) 

Related Help

Help for Rowop