| Hosted by CoCalc | Download
Kernel: SageMath 9.3

Row Reduction

C = Matrix(QQ,[[1,1,1,1],[5,1,2,2]]);C print '--------------------' C.echelon_form()
--------------------
[ 1 0 1/4 1/4] [ 0 1 3/4 3/4]

H=Matrix(Integers(2),[[1,1,0,0,1,1],[1,0,1,0,1,0],[1,0,1,1,0,1],[0,1,1,1,0,0]]);H print '--------------------' H.echelon_form()
H=Matrix(Integers(2),[[1,1,0,1,0,0,1],[1,0,1,0,1,0,0],[0,1,1,0,0,1,0]]);H print '*****************' H.echelon_form()
H2=Matrix(Integers(2),[[1,1,0,1,1,1],[1,0,1,1,0,0],[0,1,1,0,1,0]]);H2 print '*****************' H2.echelon_form()
A=[[2,1,0,4],[-1,2,1,0],[0,-1,2,1]] A
matrix(A)
%html Edit text...
var (' D, P') A = Matrix (QQ, [[4, 1, 0], [1, 5, 1], [0, 1, 4]]);A
(D,P)=A.right_eigenmatrix();(D,P)
P.inverse()*A*P
A2=Matrix(QQ,[[8,1,0],[1,5,1],[0,1,7]])
P=A2.right_eigenmatrix()[1] P.numerical_approx(digits=3) print '------------------' D=(P.inverse()*A2*P);D.numerical_approx(digits=3)
A=Matrix(QQ,[[1, 0, 0],[0,2,1],[1,-1,4]]) A.right_eigenmatrix()
A=Matrix(QQ,[[2,1],[2,3]]) A.exp()
Matrix?
def inner(g,v,w,h): hs=[] for i in srange(len(v)): hs=hs+[g(v[i],w[i])] return g(hs)
srange(len([1,2,4]))
[0, 1, 2]
var('f','h') inner(g=f,[1,2,3],[3,4,5],h=h)
File "<ipython-input-11-b850776b61a4>", line 2 inner(g=f,[Integer(1),Integer(2),Integer(3)],[Integer(3),Integer(4),Integer(5)],h=h) ^ SyntaxError: positional argument follows keyword argument