Question:
$x+2 y=1$
$3 x+y=4$
Solution:
Given: $x+2 y=1$
$3 x+y=4$
$D=\left|\begin{array}{ll}1 & 2 \\ 3 & 1\end{array}\right|=-5$
$D_{1}=\left|\begin{array}{ll}1 & 2 \\ 4 & 1\end{array}\right|=-7$
$D_{2}=\left|\begin{array}{ll}1 & 1 \\ 3 & 4\end{array}\right|=1$
Now,
$x=\frac{D_{1}}{D}=\frac{7}{5}$
$y=\frac{D_{2}}{D}=-\frac{1}{5}$
$\therefore x=\frac{7}{5}$ and $y=-\frac{1}{5}$