Sponsored links: Algebra eBooks
 

Related

matrixp

m:[[1,2],[3,4]];

matrixp(m);

Calculate

matrixp-minor

m: zeromatrix(2,2);

m: minor(m,2,2);

matrixp(m);

Calculate

matrixp

m:[[1,2],[3,4]];

matrixp(m);

Calculate

matrixp-minor

m: zeromatrix(2,2);

m: minor(m,2,2);

matrixp(m);

Calculate

matrixp

Run Example
(%i1)? matrixp;

 -- Function: matrixp (<expr>)
     Returns `true' if <expr> is a matrix, otherwise `false'.


  There are also some inexact matches for `matrixp'.
  Try `?? matrixp' to see them.

(%o1)                                true
(%i2) 
Run Example
m:matrix([[1,2,3],[4,5,6],[7,8,9]]);
(%o1)                 [ [1, 2, 3]  [4, 5, 6]  [7, 8, 9] ]
(%i2) matrixp(m);
(%o2)                                true
(%i3) m[1];
(%o3)                  [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
(%i4) m[1][1][1];
(%o4)                                  1
(%i5) 
Run Example
a : matrix([-3, 4, 5, 4], [2, 3,-1, 1], [3, 5,-1, 2], [3,-1, 4, 1]);
                             [ - 3   4    5   4 ]
                             [                  ]
                             [  2    3   - 1  1 ]
(%o1)                        [                  ]
                             [  3    5   - 1  2 ]
                             [                  ]
                             [  3   - 1   4   1 ]
(%i2) n : length(a);
(%o2)                                  4
(%i3) t : matrix([1/a[1, 1]]);
                                    [   1 ]
(%o3)                               [ - - ]
                                    [   3 ]
(%i4) k :1;
(%o4)                                  1
(%i5) u : rest(col(a, k + 1), k-n);
(%o5)                                [ 4 ]
(%i6) v : transpose(rest(transpose(row(a, k + 1)), k-n));
(%o6)                                [ 2 ]
(%i7) p : t.u;
                                        4
(%o7)                                 - -
                                        3
(%i8) if not(matrixp(p)) then p : matrix([p]);
                                    [   4 ]
(%o8)                               [ - - ]
                                    [   3 ]
(%i9) w : v.t;
                                        2
(%o9)                                 - -
                                        3
(%i10) if not(matrixp(w)) then w : matrix([w]);
                                    [   2 ]
(%o10)                              [ - - ]
                                    [   3 ]
(%i11) alpha : (a[k + 1, k + 1]-v.p);
                                      17
(%o11)                                --
                                      3
(%i12) (1/alpha)*p.w;
                                      8
(%o12)                                --
                                      51
(%i13) b : t + (1/alpha)*p.w;
                                   [   3  ]
(%o13)                             [ - -- ]
                                   [   17 ]
(%i14) 

Related Help

Help for Matrixp