submatrix();

Calculate

? submatrix;

2+3;

Calculate

? submatrix;

Calculate

submatrix();

Calculate

? submatrix;

2+3;

Calculate

? submatrix;

Calculate

### submatrix

Run Example
```(%i1)m:matrix([1,2,3],[4,7,9]);
[ 1  2  3 ]
(%o1)                             [         ]
[ 4  7  9 ]
(%i2) m2:submatrix(m,3);
[ 1  2 ]
(%o2)                              [      ]
[ 4  7 ]
(%i3) m3:submatrix(1,m);
(%o3)                             [ 4  7  9 ]
(%i4) transpose(m);
[ 1  4 ]
[      ]
(%o4)                              [ 2  7 ]
[      ]
[ 3  9 ]
(%i5) invert(m2);
[ - 7   2  ]
(%o5)                            [          ]
[  4   - 1 ]
(%i6) determinant(m2);
(%o6)                                 - 1
(%i7) m2.invert(m2);
[ 1  0 ]
(%o7)                              [      ]
[ 0  1 ]
(%i8) ident(2);
[ 1  0 ]
(%o8)                              [      ]
[ 0  1 ]
(%i9) rank(m);
(%o9)                                  2
(%i10) eigenvalues(m2);
(%o10)              [[4 - sqrt(17), sqrt(17) + 4], [1, 1]]
(%i11) eigenvectors(m2);
(%o11) [[[4 - sqrt(17), sqrt(17) + 4], [1, 1]],
sqrt(17) - 3         sqrt(17) + 3
[[[1, - ------------]], [[1, ------------]]]]
2                    2
(%i12) m2.invert(m2)-ident(2);
[ 0  0 ]
(%o12)                             [      ]
[ 0  0 ]
(%i13) ```
Run Example
```M: matrix([0,-3,2,7],[19,16,3,-13],[1,3,-4,12],[-19,18,14,2]);
[  0    - 3   2    7   ]
[                      ]
[  19   16    3   - 13 ]
(%o1)                      [                      ]
[  1     3   - 4   12  ]
[                      ]
[ - 19  18   14    2   ]
(%i2) submatrix(3,M,1);
[ - 3  2    7   ]
[               ]
(%o2)                          [ 16   3   - 13 ]
[               ]
[ 18   14   2   ]
(%i3) ```
Run Example
```modulus:2;
(%o1)                                  2
(%i2)  N:2;
(%o2)                                  2
(%i3)   block( P:0, Vars:[], Sol:zeromatrix(N,N), for i: 1 thru N do ( for j: 1 thru N do ( S:zeromatrix(N+2,N+2), S[i ][j ]:1, S[i ][j+1]:1,  S[i ][j+2]:1, S[i+1][j ]:1, S[i+1][j+2]:1, S[i+2][j ]:1, S[i+2][j+1]:1, S[i+2][j+2]:1, S:submatrix (1,N+2,S,1,N+2), P:P+V[i*N+j]*S, Vars: append(Vars, [V[i*N+j]]), Sol[i][j]:V[i*N+j]) ) );
(%o3)                                done
(%i4)  P;
[ V  + V  + V   V  + V  + V  ]
[  6    5    4   6    5    3 ]
(%o4)                   [                            ]
[ V  + V  + V   V  + V  + V  ]
[  6    4    3   5    4    3 ]
(%i5)  Vars;
(%o5)                          [V , V , V , V ]
3   4   5   6
(%i6)  R:zeromatrix(N,N)+1;
[ 1  1 ]
(%o6)                              [      ]
[ 1  1 ]
(%i7)  LGS:xreduce('append ,args(P-R));
(%o7) [V  + V  + V  - 1, V  + V  + V  - 1, V  + V  + V  - 1, V  + V  + V  - 1]
6    5    4       6    5    3       6    4    3       5    4    3
(%i8)  Res:algsys(LGS, Vars);
(%o8)                 [[V  = 1, V  = 1, V  = 1, V  = 1]]
3       4       5       6
(%i9)  append([l=Sol],Res[1]);
[ V   V  ]
[  3   4 ]
(%o9)          [l = [        ], V  = 1, V  = 1, V  = 1, V  = 1]
[ V   V  ]   3       4       5       6
[  5   6 ]
(%i10) ```

### Related Help

Help for Submatrix