# Solve system of linear equations, using matrix method: $x-y+z=4$ $2x+y-3z=0$ $x+y+z=2$

Toolbox:
• A matrix is said to be singular if |A|= 0.
• A matrix is said to be invertible if |A|$\neq 0$.
• If A is a non-singular matrix,AX=B,then $X=A^{-1}B.$
• Using this we can solve the system of equation which has unique solution.
This given system can be written in the form AX=B.
$\begin{bmatrix}1 & -1&1\\2 & 1&-3\\1 &1 & 1\end{bmatrix}\begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}4\\0\\2\end{bmatrix}$
Where $A=\begin{bmatrix}1 & -1& 1\\2 &1&-3\\1 &1 &1\end{bmatrix}\;X=\begin{bmatrix}x\\y\\z\end{bmatrix}\;B=\begin{bmatrix}4\\0\\2\end{bmatrix}$
Let us now find if A is singular or non-singular.The value of determinant A,|A| can be found by expanding along $R_1$
$|A|=1(1\times 1 -1\times -3)-(-1)(2\times 1-1\times -3)+1(2\times 1-1\times 1)$
$\;\;\;=(1+3)+(2+3)+(2-1)$
$\;\;\;=4+5+1=10\neq 0$
Hence it is a non-singular matrix.
Therefore inverse exists
We know $A^{-1}=\frac{1}{|A|}(adj \;A)$
Let us find the (adj A) by finding the minors and cofactors.
$M_{11}=\begin{vmatrix}1 & -3\\1 & 1\end{vmatrix}=1+3=4$
$M_{12}=\begin{vmatrix}2 &-3\\1 & 1\end{vmatrix}=2+3=5$
$M_{13}=\begin{vmatrix}2 &1\\1 & 1\end{vmatrix}=2-1=1$
$M_{21}=\begin{vmatrix}-1 &1\\1 & 1\end{vmatrix}=-1-1=-2$
$M_{22}=\begin{vmatrix}1 &1\\1 & 1\end{vmatrix}=1-1=0$
$M_{23}=\begin{vmatrix}1 &-1\\1 & 1\end{vmatrix}=1+1=2$
$M_{31}=\begin{vmatrix}-1 &1\\1 & -3\end{vmatrix}=3-1=2$
$M_{32}=\begin{vmatrix}1 &1\\2 & -3\end{vmatrix}=-3-2=-5$
$M_{33}=\begin{vmatrix}1 &-1\\2 & 1\end{vmatrix}=1+2=3$
$A_{11}=(-1)^{1+1}.4=4$
$A_{12}=(-1)^{1+2}.5=-5$
$A_{13}=(-1)^{1+3}.1=1$
$A_{21}=(-1)^{2+1}.-2=2$
$A_{22}=(-1)^{2+2}.0=0$
$A_{23}=(-1)^{2+3}.2=-2$
$A_{31}=(-1)^{3+1}.2=2$
$A_{32}=(-1)^{3+2}.-5=5$
$A_{33}=(-1)^{3+3}.3=3$
Therefore adj A=$\begin{bmatrix}A_{11} & A_{21} & A_{31}\\A_{12} & A_{22} & A_{32}\\A_{13} & A_{23} & A_{33}\end{bmatrix}=\begin{bmatrix}4 & 2 & 2\\-5 & 0 & 5\\1 & -2 & 3\end{bmatrix}$
$A^{-1}=\frac{1}{|A|}(adj \;A)$ We know |A|=10
$A^{-1}=\frac{1}{10}\begin{bmatrix}4 & 2 & 2\\-5 & 0 & 5\\1 & -2 & 3\end{bmatrix}$
We know $X=A^{-1}B$
$\begin{bmatrix}x\\y\\z\end{bmatrix}=\frac{1}{10}\begin{bmatrix}4 & 2 & 2\\-5 & 0 & 5\\1 & -2 & 3\end{bmatrix}\begin{bmatrix}4 \\0\\2\end{bmatrix}$
We can do matrix multiplication by multiplying the rows of matrix A by the column of matrix B
$\begin{bmatrix}x\\y\\z\end{bmatrix}=\frac{1}{10}\begin{bmatrix}16 +0+4\\-20+0+10\\4+0+6\end{bmatrix}$
$\begin{bmatrix}x\\y\\z\end{bmatrix}=\frac{1}{10}\begin{bmatrix}20\\-10\\10\end{bmatrix}=\begin{bmatrix}2\\-1\\1\end{bmatrix}$
Hence x=2,y=-1,z=1.
answered Mar 5, 2013