# Matrix Equations

## AX = B, where A is Invertible

Since matrix multiplication isn't always commutative, we multiply to the left both members of the equations by$A^{-1}$.

$A^{-1}\cdot|A\cdot X = B$

$A^{-1}\cdot A\cdot X = A^{-1}\cdot B$

$I_{n}\cdot X = A^{-1}\cdot B$

The general form of the solution of the equation is:
$\color{red}{X =A^{-1}\cdot B}$

Example 50
Solve the equation
$\begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}\cdot X \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}$

We check if the first matrix is invertible.
$\left|A\right|=5-6=-1\neq 0$, so the matrix is invertible.

We multiply to the left by its inverse.
$\begin{pmatrix} 1 & 3\\ 2 & 5\\ \end{pmatrix}^{-1}\cdot \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}\cdot X= \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}\cdot \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}$

$I_{2}\cdot X = \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}\cdot \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}$

$X=\begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}\cdot \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}$

$\begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}= \begin{pmatrix} -5 & 3\\ 2 & -1 \end{pmatrix}\rightarrow X= \begin{pmatrix} -5 & 3\\ 2 & -1 \end{pmatrix}\cdot \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}= \begin{pmatrix} -9 & -22\\ 4 & 9 \end{pmatrix}$

## XA = B, where A is Invertible

Since matrix multiplication isn't always commutative, we multiply to the right both members of the equation by $A^{-1}.$

$X\cdot A = B |\cdot A^{-1}$

$X\cdot A\cdot A^{-1} = B\cdot A^{-1}$

$X \cdot I_{n} =B\cdot A^{-1}$

The general form of the solution of the equation is:
$\color{red}{X =B\cdot A^{-1}}$

Example 51
Solve the equation
$X \begin{pmatrix} 1 & 3\\ 2 & 5\\ \end{pmatrix}= \begin{pmatrix} 3 & 5\\ 2 & 1\\ \end{pmatrix}$

We check if the first matrix is invertible.
$\left|A\right|=5-6=-1\neq 0$, so the matrix is invertible.

We multiply to the right by its inverse.
$X \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}\cdot \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}= \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}\cdot \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}$

$X\cdot I_{2}= \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}\cdot \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}$

$X=\begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix}\cdot \begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}$

$\begin{pmatrix} 1 & 3\\ 2 & 5 \end{pmatrix}^{-1}= \begin{pmatrix} -5 & 3\\ 2 & -1 \end{pmatrix}\rightarrow X= \begin{pmatrix} 3 & 5\\ 2 & 1 \end{pmatrix} \cdot \begin{pmatrix} -5 & 3\\ 2 & -1 \end{pmatrix}= \begin{pmatrix} -5 & 4\\ -8 & 5 \end{pmatrix}$

Contact email: