\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*} kx+y-2z & = & 3\\ x-y+2z & = & 1\\ -x+2y+z & = &
2 \end{eqnarray*}

If $k=0$, 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*} y-2z & = & 3\\ x-y+2z & = & 1\\ -x+2y+z & = & 2
\end{eqnarray*}

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

              ${\bf{A}} \cdot \ \ \ {\bf{X}}\ \ \ = \ \ \ {\bf{K}}$

Require ${\bf{A}}^{-1}$, since ${\bf{X}}={\bf{A}}^{-1}{\bf{K}}$

Step (iii)

\begin{eqnarray*} \bigtriangleup & = & det
A\\ & = & \left|\begin{array}{ccc}0 & 1 & -2\\ +1 & -1 & 2\\ -1 &
2 & 1 \end{array} \right|\\ & = & 0\left|\begin{array}{cc} -1 &
2\\2 & 1 \end{array} \right|-1\left|\begin{array}{cc} 1 & 2\\-1 &
1 \end{array} \right|-2\left|\begin{array}{cc} 1 & -1\\-1 & 2
\end{array} \right|\\ & = & -1\times (1+2)-2 \times (2-1)\\ & = &
-3-2\\ & = & \un{-5} \end{eqnarray*}

so solution exists

Step (i) Cofactors of matrix are given by

$\left(\begin{array} {ccc} A_{11} & A_{12} & A_{13}\\ A_{21} &
A_{22} & A_{23}\\ A_{31} & A_{32} & A_{33}
\end{array} \right)=\left(\begin{array} {ccc} 0 & 1 & -2\\ 1 & -1 & 2\\ -1 & 2 & 1
\end{array} \right)$

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

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

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

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

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

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

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

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

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

Matrix of cofactors is thus:

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

Step (ii)

Transpose this to get $adj A$

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

Step (iv)

$A^{-1}=\ds\frac{adj\ A}{det\
A}=\ds\frac{1}{-5}\left(\begin{array} {ccc} -5 & -5 & 0\\ -3 & -2
& -2\\ 1 & -1 & -1 \end{array} \right)$

Hence ${\bf{A}}=-\ds\frac{1}{2}\left(\begin{array} {ccc} -5 & -5 &
0\\ -3 & -2 & -2\\ 1 & -1 & -1 \end{array}
\right)\left(\begin{array}{c}3\\1\\2 \end{array} \right)$

$\Rightarrow \un{\left(\begin{array}{c}x\\y\\z\end{array}\right)=
-\ds\frac{1}{5}\left(\begin{array}{c}-20\\-15\\0
\end{array}\right)=\left(\begin{array}{c} 4\\3\\0
\end{array}\right)}$

\end{document}
