Gauss.mw

> restart;

> with(linalg);

Warning, the protected names norm and trace have been redefined and unprotected

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...

Résolution d'un système

> A:=array(1..4,1..4): for i from 1 to 4 do for j from 1 to 4 do A[i,j]:=i+j: od:od:

> A=evalm(A);

A = matrix([[2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7], [5, 6, 7, 8]])

> Gsyst(A,[x,y,z,t],[6,7,8,9]);

L[1],

L[2],

L[3],

L[4],

L[2],

L[3],

L[4],

C[3], ", C[4], matrix([[x, 3/2*y, 5/2*t, 2*z], [0, y, 3*t, 2*z], [0, 0, 0, 0], [0, 0, 0, 0]]), "=", matrix([[3], [4], [0], [0]])" align="center">

0 = 0

0 = 0

L[1],

> Calcul du rang

> A:=array(1..4,1..4): for i from 1 to 4 do for j from 1 to 4 do A[i,j]:=min(i-1,j-1): od:od:

> A=evalm(A);

A = matrix([[0, 0, 0, 0], [0, 1, 1, 1], [0, 1, 2, 2], [0, 1, 2, 3]])

> Grang(A);

C[1], ", C[2], matrix([[0, 0, 0, 0], [1, 0, 1, 1], [1, 0, 2, 2], [1, 0, 2, 3]])" align="center">

L[2], ", L[1], matrix([[1, 0, 1, 1], [0, 0, 0, 0], [1, 0, 2, 2], [1, 0, 2, 3]])" align="center">

L[3],

L[4],

C[2], ", C[3], matrix([[1, 1, 0, 1], [0, 0, 0, 0], [0, 1, 0, 1], [0, 1, 0, 2]])" align="center">

L[3], ", L[2], matrix([[1, 1, 0, 1], [0, 1, 0, 1], [0, 0, 0, 0], [0, 1, 0, 2]])" align="center">

L[4],

C[3], ", C[4], matrix([[1, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0], [0, 0, 1, 0]])" align="center">

L[4], ", L[3], matrix([[1, 1, 1, 0], [0, 1, 1, 0], [0, 0, 1, 0], [0, 0, 0, 0]])" align="center">

> Résolution d'un système de CRAMER

> A:=array(1..4,1..4): for i from 1 to 4 do for j from 1 to 4 do A[i,j]:=min(i,j): od:od:

> A=evalm(A);

A = matrix([[1, 1, 1, 1], [1, 2, 2, 2], [1, 2, 3, 3], [1, 2, 3, 4]])

> Gsyst_cramer(A,[x1,x2,x3,x4],[y1,y2,y3,y4]);

L[2],

L[3],

L[4],

L[3],

L[4],

L[4],

L[1],

L[2],

L[3],

L[1],

L[2],

L[1],

> Calcul de l'inverse d'une matrice

> Ginverse(A);

matrix([[1, 1, 1, 1], [1, 2, 2, 2], [1, 2, 3, 3], [1, 2, 3, 4]]),

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [1, 2, 3, 3], [1, 2, 3, 4]]), L[2],

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 2, 2], [1, 2, 3, 4]]), L[3],

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 2, 2], [0, 1, 2, 3]]), L[4],

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 1, 2, 3]]), L[3],

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 2]]), L[4],

matrix([[1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1]]), L[4],

matrix([[1, 1, 1, 0], [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1]]), L[1],

matrix([[1, 1, 1, 0], [0, 1, 1, 0], [0, 0, 1, 1], [0, 0, 0, 1]]), L[2],

matrix([[1, 1, 1, 0], [0, 1, 1, 0], [0, 0, 1, 0], [0, 0, 0, 1]]), L[3],

matrix([[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 0], [0, 0, 0, 1]]), L[1],

matrix([[1, 1, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]), L[2],

matrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]), L[1],

>