Gaussian elimination
Given the system of equations
$$y_{2} - 5 = 5 x + y$$
$$3 x - y = 9$$
We give the system of equations to the canonical form
$$- 5 x - y + y_{2} = 5$$
$$3 x - y = 9$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}-5 & -1 & 1 & 5\\3 & -1 & 0 & 9\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}-5\\3\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}3 & -1 & 0 & 9\end{matrix}\right]$$
,
and subtract it from other lines:
From 1 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}-5 - \frac{\left(-5\right) 3}{3} & - \frac{\left(-5\right) \left(-1\right)}{3} - 1 & 1 - \frac{\left(-5\right) 0}{3} & 5 - \frac{\left(-5\right) 9}{3}\end{matrix}\right] = \left[\begin{matrix}0 & - \frac{8}{3} & 1 & 20\end{matrix}\right]$$
you get
$$\left[\begin{matrix}0 & - \frac{8}{3} & 1 & 20\\3 & -1 & 0 & 9\end{matrix}\right]$$
In 2 -th column
$$\left[\begin{matrix}- \frac{8}{3}\\-1\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 & - \frac{8}{3} & 1 & 20\end{matrix}\right]$$
,
and subtract it from other lines:
From 2 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}3 - \frac{0 \cdot 3}{8} & -1 - - 1 & \frac{\left(-1\right) 3}{8} & 9 - \frac{3 \cdot 20}{8}\end{matrix}\right] = \left[\begin{matrix}3 & 0 & - \frac{3}{8} & \frac{3}{2}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}0 & - \frac{8}{3} & 1 & 20\\3 & 0 & - \frac{3}{8} & \frac{3}{2}\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}0\\3\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}3 & 0 & - \frac{3}{8} & \frac{3}{2}\end{matrix}\right]$$
,
and subtract it from other lines:
In 2 -th column
$$\left[\begin{matrix}- \frac{8}{3}\\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 & - \frac{8}{3} & 1 & 20\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:
$$- \frac{8 x_{2}}{3} + x_{3} - 20 = 0$$
$$3 x_{1} - \frac{3 x_{3}}{8} - \frac{3}{2} = 0$$
We get the answer:
$$x_{2} = \frac{3 x_{3}}{8} - \frac{15}{2}$$
$$x_{1} = \frac{x_{3}}{8} + \frac{1}{2}$$
where x3 - the free variables