Question:
$x+y=5$
$y+z=3$
$x+z=4$
Solution:
These equations can be written as
$x+y+0 z=5$
$0 x+y+z=3$
$x+0 y+z=4$
$D=\left|\begin{array}{lll}1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1\end{array}\right|$
$=1(1-0)-1(0-1)+0(0-1)$
$=1(1)-1(-1)+0$
$=2$
$D_{1}=\left|\begin{array}{lll}5 & 1 & 0 \\ 3 & 1 & 1 \\ 4 & 0 & 1\end{array}\right|$
$=5(1-0)-1(3-4)+0(0-4)$
$=5(1)-1(-1)$
$=6$
$D_{2}=\left|\begin{array}{lll}1 & 5 & 0 \\ 0 & 3 & 1 \\ 1 & 4 & 1\end{array}\right|$
$=1(3-4)-5(0-1)+0(0-4)$
$=1(-1)-5(-1)$
$=4$
$D_{3}=\left|\begin{array}{lll}1 & 1 & 5 \\ 0 & 1 & 3 \\ 1 & 0 & 4\end{array}\right|$
$=1(4-0)-1(0-3)+5(0-1)$
$=1(4)-1(-3)+5(-1)$
$=2$
Now,
$x=\frac{D_{1}}{D}=\frac{6}{2}=3$
$y=\frac{D_{2}}{D}=\frac{4}{2}=2$
$z=\frac{D_{3}}{D}=\frac{2}{2}=1$
$\therefore x=3, y=2$ and $z=1$