\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Consider the following set of simultaneous equations

\begin{eqnarray*} x+y+z & = & 0,\\ 2x-3y-z & = & 1,\\ 2y+z & = &
2. \end{eqnarray*}

Find the solution by matrix inversion.

{\bf{Note:}} If you fail to show detailed working of the matrix
inversion, no marks will be awarded, even if you can write down
the correct answer.
\medskip

{\bf Answer}

$k=0$
\begin{eqnarray*} x+y+z & = & 0\\ 2x-3y-z & = & 1\\ 2y+z & = &
2 \end{eqnarray*}

$\Rightarrow \left(\begin{array}{ccc} 1 & 1 & 1\\ 2 & -3 & -1\\ 0&
2 & 1 \end{array} \right) \left(\begin{array}{c}x\\y\\z
\end{array}\right)=\left(\begin{array}{c} 0\\1\\2 \end{array}
\right)$

              ${\bf{A}} \cdot \ \ \ {\bf{x}}\ \ \ = \ \ \ {\bf{b}}$

Need ${\bf{A}}^{-1}$

\begin{eqnarray*} det A\\ & = & 1\left|\begin{array}{cc} -3 &
-1\\2 & 1 \end{array} \right|-1\left|\begin{array}{cc} 2 & -1\\0 &
1 \end{array} \right|+1\left|\begin{array}{cc} 2 & -3\\0 & 2
\end{array} \right|\\ & = & -1-2+4\\ & = & 1 \ne 0 \end{eqnarray*}

so ${\bf{A}}^{-1}$ exists.

Form matrix of cofactors

cofactor of $A_{11}=+\left|\begin{array} {cc} -3 & -1\\2 & 1
\end{array} \right|=-1$ Following + - sign pattern

cofactor of $A_{12}=-\left|\begin{array} {cc} 2 & -1\\0 & 1
\end{array} \right|=-2$

cofactor of $A_{13}=+\left|\begin{array} {cc} 2 & -3\\0 & 2
\end{array} \right|=+4$

cofactor of $A_{21}=-\left|\begin{array} {cc} 1 & 1\\2 & 1
\end{array} \right|=+1$

cofactor of $A_{22}=+\left|\begin{array} {cc} 1 & 1\\0 & 1
\end{array} \right|=+1$

cofactor of $A_{23}=-\left|\begin{array} {cc} 1 & 1\\0 & 2
\end{array} \right|=-2$

cofactor of $A_{31}=+\left|\begin{array} {cc} 1 & 1\\-3 & -1
\end{array} \right|=+2$

cofactor of $A_{32}=-\left|\begin{array} {cc} 1 & 1\\2 & -1
\end{array} \right|=+3$

cofactor of $A_{33}=+\left|\begin{array} {cc} 1 & 1\\2 & -3
\end{array} \right|=-5$

Cofactor matrix = $\left(\begin{array} {ccc} -1 & -2 & 4\\ 1 & 1 &
-2\\ 2 & 3 & 5 \end{array} \right)$

Transpose = $\left(\begin{array}{ccc} -1 & 1 & 2\\-2 & 1 & 3\\ 4 &
-2 & -5 \end{array} \right)$

$\ds\frac{\rm{Transpose}}{\rm{det}}=\ds\frac{1}{1}\left(\begin{array}{ccc}
-1 & 1 & 2\\-2 & 1 & 3\\ 4 & -2 & -5 \end{array} \right)$

Therefore

$A^{-1}=\left(\begin{array} {ccc} -1 & 1 & 2\\-2 & 1 & 3\\ 4 & -2
& -5 \end{array} \right)$

Therefore

\begin{eqnarray*} {\bf{x}}=\left(\begin{array}{c}x\\y\\z \end{array}\right) & =
& \left(\begin{array} {ccc} -1 & 1 & 2\\-2 & 1 & 3\\ 4 & -2 & -5
\end{array} \right)\left(\begin{array}{c}0\\1\\2
\end{array} \right)\\ & = & \left(\begin{array}{c}5 \\7\\-12
\end{array}\right) \end{eqnarray*}

Therefore $x=5,\ y=7,\ z=-12$
\end{document}
