# Solve system of linear equations, using matrix method.

Question:

Solve system of linear equations, using matrix method.

$2 x+y+z=1$

$x-2 y-z=\frac{3}{2}$

$3 y-5 z=9$

Solution:

The given system of equations can be written in the form of AX = B, where

$A=\left[\begin{array}{ccc}2 & 1 & 1 \\ 1 & -2 & -1 \\ 0 & 3 & -5\end{array}\right], X=\left[\begin{array}{l}x \\ y \\ z\end{array}\right]$ and $B=\left[\begin{array}{l}1 \\ \frac{3}{2} \\ 9\end{array}\right]$.

Now,

$|A|=2(10+3)-1(-5-3)+0=2(13)-1(-8)=26+8=34 \neq 0$

Thus, A is non-singular. Therefore, its inverse exists.

Now, $A_{11}=13, A_{12}=5, A_{13}=3$

$A_{21}=8, A_{22}=-10, A_{23}=-6$

$A_{31}=1, A_{32}=3, A_{33}=-5$

$\therefore A^{-1}=\frac{1}{|A|}(\operatorname{adj} A)=\frac{1}{34}\left[\begin{array}{ccc}13 & 8 & 1 \\ 5 & -10 & 3 \\ 3 & -6 & -5\end{array}\right]$

$\Rightarrow\left[\begin{array}{l}x \\ y \\ z\end{array}\right]=\frac{1}{34}\left[\begin{array}{l}13+12+9 \\ 5-15+27 \\ 3-9-45\end{array}\right]$

$=\frac{1}{34}\left[\begin{array}{l}34 \\ 17 \\ -51\end{array}\right]=\left[\begin{array}{l}1 \\ \frac{1}{2} \\ -\frac{3}{2}\end{array}\right]$

Hence, $x=1, y=\frac{1}{2}$, and $z=-\frac{3}{2}$