f(x,y):= for i from 1 thru 9 do( if (i > 6) then return(i) ); A: matrix( [0,1,2], [0,3,0], [1,0,0] ); for i from 1 thru 3 do( A[2,i]: A[2,i]-3*A[1,i] ); A; A*A; A.A; A^2; A^^2; load(diag); load(eigen); A: matrix( [0,1,2], [0,3,0], [0,4,2] ); /* A:genmatrix(lambda ([i, j], -9 + random(10)),3,4); */ echelon(A); triangularize(A); A.matrix([x],[y],[z]); transpose(%); args(%); %[1]; solve(%,[x,y,z]); lahendid: matrix( [c,0,0] ); A.transpose(lahendid); A: matrix( [1,-1,1], [1,1,-1], [0,-1,2] ); A: matrix( [3,12,-4], [-1,-3,1], [-1,-12,6] ); p:factor(charpoly(A,x)); p:factor(determinant(A-x*ident(3))); solve(p=0,x); eivals(A); eivects(A); jordan(A); dispJordan(%); C:ModeMatrix(A); invert(C).A.C; nondiagonalizable; sims: simtran(A); rank(A-3*ident(3)); A-3*ident(3); %.matrix([x],[y],[z]); transpose(%); args(%); %[1]; solve(%,[x,y,z]); sols:%[1]; lahA: matrix([ev(x,%)],[ev(y,%)],[ev(z,%)]); (A-3*ident(3)).lahA; A: matrix( [1,-2,2,-3], [2,-3,2,4], [0,0,1,0], [0,0,0,1] ); rank(A); F(x,y):= 1*x[1]*y[1] + 2*x[2]*y[2] + 3*x[3]*y[3] + 4*x[4]*y[4]; sols: gramschmidt(A); gramschmidt(A,F); inprod(A[1],A[2]); inprod(sols[1],sols[1]); inprod(sols[1],sols[2]); inprod(sols[1],sols[3]); inprod(sols[1],sols[4]); inprod(sols[2],sols[2]); inprod(sols[2],sols[3]); inprod(sols[2],sols[4]); inprod(sols[3],sols[3]); inprod(sols[3],sols[4]); inprod(sols[4],sols[4]); A: matrix( [0,1,2], [0,3,0], [1,0,0] ); kill(p); p = 7; echelon(A); triangularize(A); modulus; echelon(A), modulus = 3; triangularize(A), modulus = 3; modulus;