Sponsored links: Algebra eBooks
 

Related

submatrix

? submatrix;

Calculate

submatrix

? 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) 
[abs,and,block,col,copy,create_list,fpprintprec,genmatrix,ident,invert,kill,length,lmax,makelist,matrix_size,random,submatrix,sum,while] [abs,and,block,col,copy,fpprintprec,genmatrix,ident,invert,length,lmax,makelist,matrix_size,random,submatrix,sum,while] [abs,append,col,exp,invert,matrix,psi,radcan,submatrix,transpose] [addcol,addrow,diff,do,ev,genmatrix,invert,kill,load,matrix,plot2d,romberg,sqrt,submatrix] [addcol,addrow,diff,ev,genmatrix,invert,kill,length,linsolve,lmax,lmin,load,matrix,plot2d,romberg,sqrt,submatrix] [addcol,addrow,diff,ev,genmatrix,invert,kill,length,lmax,lmin,load,matrix,plot2d,print,romberg,sqrt,submatrix] [addcol,addrow,diff,ev,genmatrix,invert,kill,length,lmax,lmin,load,matrix,plot2d,romberg,sqrt,submatrix] [addcol,addrow,diff,ev,genmatrix,invert,kill,length,load,matrix,plot2d,romberg,sqrt,submatrix] [addcol,echelon,ident,matrix,submatrix] [addcol,ident,matrix,submatrix,triangularize] [addrow,append,block,copylist,copymatrix,delete,error,expand,hipow,length,makelist,print,resultant,return,row,submatrix] [addrow,append,block,copylist,copymatrix,delete,error,hipow,length,makelist,print,remove,resultant,return,submatrix] [addrow,append,block,copylist,copymatrix,delete,error,hipow,length,makelist,print,resultant,return,row,submatrix] [addrow,block,copylist,copymatrix,delete,error,hipow,length,makelist,print,return,row,submatrix] [addrow,block,length,matrix,submatrix] [append,args,block,globalsolve,modulus,submatrix,true,xreduce] [append,args,block,globalsolve,modulus,submatrix,xreduce] [append,args,block,modulus,solve,submatrix,xreduce] [append,col,exp,invert,matrix,psi,radcan,submatrix,transpose] [append,col,exp,invert,matrix,radcan,submatrix,transpose] [args,block,modulus,submatrix,xreduce] [block,modulus,submatrix] [col,create_list,makelist,matrix,member,part,random,row,submatrix] [determinant,eigenvalues,eigenvectors,ev,ident,invert,kill,matrix,rank,submatrix,transpose] [determinant,eigenvalues,eigenvectors,ident,invert,matrix,rank,submatrix,transpose] [determinant,eigenvalues,ident,invert,matrix,rank,submatrix,transpose] [determinant,ev,ident,invert,matrix,submatrix] [determinant,hessian,submatrix] [determinant,ident,invert,matrix,rank,submatrix,transpose] [determinant,ident,invert,matrix,submatrix,transpose] [determinant,invert,matrix,submatrix,transpose] [echelon,ident,mat_fullunblocker,matrix,submatrix,transpose,triangularize] [echelon,integrate,kill,matrix,partfrac,rank,solve,submatrix] [echelon,integrate,kill,matrix,partfrac,rank,submatrix] [echelon,integrate,matrix,partfrac,rank,submatrix] [eigenvalues,matrix,submatrix,transpose] [eval_string,matrix,simplode,string,submatrix] [expand,matrix,rank,solve,submatrix,subst] [expand,matrix,solve,submatrix] [full_listify,intersection,listify,matrix,powerset,rank,submatrix] [full_listify,listify,matrix,powerset,rank,setdifference,submatrix] [if,invert,matrix,printf,submatrix] [invert,matrix,printf,submatrix] [invert,matrix,submatrix,transpose] [load,matrix,submatrix] [matrix,powerset,rank,submatrix] [matrix,printf,submatrix] [matrix,rank,submatrix] [matrix,submatrix,transpose] [matrix,submatrix]

Related Help

Help for Submatrix