Equation matricielle avec Xcas

Voici comment on peut résoudre un exercice classique sur les équations matricielles (systèmes linéaires).

Enoncé


Résoudre l’équation matricielle $AX=B$ avec

$A= \beginpmatrix 2&1&3\\ 1&0&1\\ 1&1&0\\ \endpmatrix$ et $B= \beginpmatrix 5\\ 3\\ 2\\ \endpmatrix$.

Résolution à l’aide de Xcas


On rentre la matrice $A$ :

A:=[[2,1,3],[1,0,1],[1,1,0]]

$$\beginpmatrix 2&1&3\\ 1&0&1\\ 1&1&0\\ \endpmatrix$$

On rentre la matrice $B$ :

B:=[[5],[3],[2]]

$$ \beginpmatrix 5\\ 3\\ 2\\ \endpmatrix$$

On calcule $X$ :

X:=inverse(A)*B

ou

simult(A,B)

$$ \beginpmatrix 3\\ -1\\ 0\\ \endpmatrix$$