Why is this method for solving linear equations systems using determinants works?

The computation of the determinants is equivalent to solving step by step the system of equations in the following way:

  1. Multiply the first equation by $2$, which is the coefficient of $x$ in the second equation;
  2. Multiply the second one by $1$, which is the coefficient of $x$ in the first equation; and then
  3. Subtract the first from the second equation.

This will result in the fourth equation.

Afterwards we can do the same for the first and third equations to get the fifth equation:

  1. Multiply the first equation by $3$, which is the coefficient of $x$ in the third equation;
  2. Multiply the third one by $1$, which is the coefficient of $x$ in the first equation; and then
  3. Subtract the first from the third equation.

Now we can do a similar approach to the fourth and fifth equation to get the sixth equation:

  1. Multiply the fourth equation by $-3$, which is the coefficient of $y$ in the fifth equation;
  2. Multiply the fifth one by $-5$, which is the coefficient of $y$ in the fourth equation; and then
  3. Subtract the fourth from the fifth equation.

And voilà, we have the sixth equation.


The method is called Gauss elimination.

It works like this. Consider some equations, and we only record some of the coefficients of them.

... [A] ... B ... | E
...  C  ... D ... | F

There are further lines not shown, and the data above sorresponds to something like $$ \begin{aligned} \dots +\boxed{a}x+\dots+bz &=e\ ,\\ \dots +cx+\dots+dz &=f\ , \end{aligned} $$ Now we declare a value $a\ne 0$ under the coefficients to be the "pivot", and put it in a box. The pivot line is divided imaginary by the pivot $a$, thus getting $\dots +x+\dots+(b/a)z =(e/a)$, and then used to eliminate all coefficients below (and in a total elimination also above) the pivot. So multiply the above equation by $-c$, and add this to the one involving $cx$ to eliminate $c$. One obtains, in the formal description, in the "next elimination block":

... [A] ...     B    ... |     E
...  0  ... D - BC/A ... | F - EC/A

and note that $D-BC/A$ is the determinant $AD-BC$ divided by the pivot $A$. This is the native Gauss elimination. Numerically, people tend to chose $A$ with maximal absolute value.

The above scheme uses a variation, all new rows are multiplied by the pivot. So:

... [A] ...      B  ... |      E
...  0  ... AD - BC ... | AF - EC

This is it!


In our case, also always copying the pivot line:

$$ \begin{array}{ccc|c} x & y & z & i.t. \\ \hline \boxed1 & 2 & -1 & -5 \\ 2 & -1 & 2 & 8 \\ 3 & 3 & 4 & 5 \\ \hline 1 & 2 & -1 & -5 \\ & \boxed{-5} & 4 & 18 \\ & -3 & 7 & 20 \\ \hline 1 & 2 & -1 & -5 \\ & -5 & 4 & 18 \\ & & \boxed{-23} & -46 \\ \end{array} $$