Mister Exam

# 2x1+x2−x3+x4=1; 3x2−x4=1; x3−x4=0

from to

from to

### The solution

You have entered [src]
2*x1 + x2 - x3 + x4 = 1
$$x_{4} + \left(- x_{3} + \left(2 x_{1} + x_{2}\right)\right) = 1$$
3*x2 - x4 = 1
$$3 x_{2} - x_{4} = 1$$
x3 - x4 = 0
$$x_{3} - x_{4} = 0$$
x3 - x4 = 0
Rapid solution
$$x_{31} = x_{4}$$
=
$$x_{4}$$
=
x4

$$x_{21} = \frac{x_{4}}{3} + \frac{1}{3}$$
=
$$\frac{x_{4}}{3} + \frac{1}{3}$$
=
0.333333333333333 + 0.333333333333333*x4

$$x_{11} = \frac{1}{3} - \frac{x_{4}}{6}$$
=
$$\frac{1}{3} - \frac{x_{4}}{6}$$
=
0.333333333333333 - 0.166666666666667*x4
Gaussian elimination
Given the system of equations
$$x_{4} + \left(- x_{3} + \left(2 x_{1} + x_{2}\right)\right) = 1$$
$$3 x_{2} - x_{4} = 1$$
$$x_{3} - x_{4} = 0$$

We give the system of equations to the canonical form
$$2 x_{1} + x_{2} - x_{3} + x_{4} = 1$$
$$3 x_{2} - x_{4} = 1$$
$$x_{3} - x_{4} = 0$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}2 & 1 & -1 & 1 & 1\\0 & 3 & 0 & -1 & 1\\0 & 0 & 1 & -1 & 0\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}2\\0\\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}2 & 1 & -1 & 1 & 1\end{matrix}\right]$$
,
and subtract it from other lines:
In 2 -th column
$$\left[\begin{matrix}1\\3\\0\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}0 & 3 & 0 & -1 & 1\end{matrix}\right]$$
,
and subtract it from other lines:
From 1 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}2 - \frac{0}{3} & 1 - \frac{3}{3} & -1 - \frac{0}{3} & 1 - - \frac{1}{3} & \frac{-1}{3} + 1\end{matrix}\right] = \left[\begin{matrix}2 & 0 & -1 & \frac{4}{3} & \frac{2}{3}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}2 & 0 & -1 & \frac{4}{3} & \frac{2}{3}\\0 & 3 & 0 & -1 & 1\\0 & 0 & 1 & -1 & 0\end{matrix}\right]$$
In 3 -th column
$$\left[\begin{matrix}-1\\0\\1\end{matrix}\right]$$
let’s convert all the elements, except
3 -th element into zero.
- To do this, let’s take 3 -th line
$$\left[\begin{matrix}0 & 0 & 1 & -1 & 0\end{matrix}\right]$$
,
and subtract it from other lines:
From 1 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}2 - \left(-1\right) 0 & - \left(-1\right) 0 & -1 - -1 & \frac{4}{3} - - -1 & \frac{2}{3} - \left(-1\right) 0\end{matrix}\right] = \left[\begin{matrix}2 & 0 & 0 & \frac{1}{3} & \frac{2}{3}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}2 & 0 & 0 & \frac{1}{3} & \frac{2}{3}\\0 & 3 & 0 & -1 & 1\\0 & 0 & 1 & -1 & 0\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}2\\0\\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}2 & 0 & 0 & \frac{1}{3} & \frac{2}{3}\end{matrix}\right]$$
,
and subtract it from other lines:
In 2 -th column
$$\left[\begin{matrix}0\\3\\0\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}0 & 3 & 0 & -1 & 1\end{matrix}\right]$$
,
and subtract it from other lines:
In 3 -th column
$$\left[\begin{matrix}0\\0\\1\end{matrix}\right]$$
let’s convert all the elements, except
3 -th element into zero.
- To do this, let’s take 3 -th line
$$\left[\begin{matrix}0 & 0 & 1 & -1 & 0\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:
$$2 x_{1} + \frac{x_{4}}{3} - \frac{2}{3} = 0$$
$$3 x_{2} - x_{4} - 1 = 0$$
$$x_{3} - x_{4} = 0$$
$$x_{1} = \frac{1}{3} - \frac{x_{4}}{6}$$
$$x_{2} = \frac{x_{4}}{3} + \frac{1}{3}$$
$$x_{3} = x_{4}$$