Gaussian elimination
Given the system of equations
$$x_{2} - y_{2} = 24$$
$$x - 2 y = 7$$
We give the system of equations to the canonical form
$$x_{2} - y_{2} = 24$$
$$x - 2 y = 7$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}0 & 1 & 0 & -1 & 24\\1 & 0 & -2 & 0 & 7\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}0\\1\end{matrix}\right]$$
let’s convert all the elements, except
2 -th element into zero.
- To do this, let’s take 2 -th line
$$\left[\begin{matrix}1 & 0 & -2 & 0 & 7\end{matrix}\right]$$
,
and subtract it from other lines:
In 2 -th column
$$\left[\begin{matrix}1\\0\end{matrix}\right]$$
let’s convert all the elements, except
1 -th element into zero.
- To do this, let’s take 1 -th line
$$\left[\begin{matrix}0 & 1 & 0 & -1 & 24\end{matrix}\right]$$
,
and subtract it from other lines:
In 1 -th column
$$\left[\begin{matrix}0\\1\end{matrix}\right]$$
let’s convert all the elements, except
2 -th element into zero.
- To do this, let’s take 2 -th line
$$\left[\begin{matrix}1 & 0 & -2 & 0 & 7\end{matrix}\right]$$
,
and subtract it from other lines:
In 2 -th column
$$\left[\begin{matrix}1\\0\end{matrix}\right]$$
let’s convert all the elements, except
1 -th element into zero.
- To do this, let’s take 1 -th line
$$\left[\begin{matrix}0 & 1 & 0 & -1 & 24\end{matrix}\right]$$
,
and subtract it from other lines:
It is almost ready, all we have to do is to find variables, solving the elementary equations:
$$x_{2} - x_{4} - 24 = 0$$
$$x_{1} - 2 x_{3} - 7 = 0$$
We get the answer:
$$x_{2} = x_{4} + 24$$
$$x_{1} = 2 x_{3} + 7$$
where x3, x4 - the free variables