Mister Exam

x1-4х2-2х3=-3; 3х1+х2+х3=5; 3х1-5х2-6х3=-7

v

The graph:

from to

from to

The solution

You have entered [src]
x1 - 4*x2 - 2*x3 = -3
$$- 2 x_{3} + \left(x_{1} - 4 x_{2}\right) = -3$$
3*x1 + x2 + x3 = 5
$$x_{3} + \left(3 x_{1} + x_{2}\right) = 5$$
3*x1 - 5*x2 - 6*x3 = -7
$$- 6 x_{3} + \left(3 x_{1} - 5 x_{2}\right) = -7$$
-6*x3 + 3*x1 - 5*x2 = -7
Rapid solution
$$x_{11} = \frac{53}{49}$$
=
$$\frac{53}{49}$$
=
1.08163265306122

$$x_{21} = \frac{2}{7}$$
=
$$\frac{2}{7}$$
=
0.285714285714286

$$x_{31} = \frac{72}{49}$$
=
$$\frac{72}{49}$$
=
1.46938775510204
Gaussian elimination
Given the system of equations
$$- 2 x_{3} + \left(x_{1} - 4 x_{2}\right) = -3$$
$$x_{3} + \left(3 x_{1} + x_{2}\right) = 5$$
$$- 6 x_{3} + \left(3 x_{1} - 5 x_{2}\right) = -7$$

We give the system of equations to the canonical form
$$x_{1} - 4 x_{2} - 2 x_{3} = -3$$
$$3 x_{1} + x_{2} + x_{3} = 5$$
$$3 x_{1} - 5 x_{2} - 6 x_{3} = -7$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}1 & -4 & -2 & -3\\3 & 1 & 1 & 5\\3 & -5 & -6 & -7\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}1\\3\\3\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}1 & -4 & -2 & -3\end{matrix}\right]$$
,
and subtract it from other lines:
From 2 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}\left(-1\right) 3 + 3 & 1 - - 12 & 1 - - 6 & 5 - - 9\end{matrix}\right] = \left[\begin{matrix}0 & 13 & 7 & 14\end{matrix}\right]$$
you get
$$\left[\begin{matrix}1 & -4 & -2 & -3\\0 & 13 & 7 & 14\\3 & -5 & -6 & -7\end{matrix}\right]$$
From 3 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}\left(-1\right) 3 + 3 & -5 - - 12 & -6 - - 6 & -7 - - 9\end{matrix}\right] = \left[\begin{matrix}0 & 7 & 0 & 2\end{matrix}\right]$$
you get
$$\left[\begin{matrix}1 & -4 & -2 & -3\\0 & 13 & 7 & 14\\0 & 7 & 0 & 2\end{matrix}\right]$$
In 2 -th column
$$\left[\begin{matrix}-4\\13\\7\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 & 7 & 0 & 2\end{matrix}\right]$$
,
and subtract it from other lines:
From 1 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}1 - \frac{\left(-4\right) 0}{7} & -4 - \frac{\left(-4\right) 7}{7} & -2 - \frac{\left(-4\right) 0}{7} & -3 - \frac{\left(-4\right) 2}{7}\end{matrix}\right] = \left[\begin{matrix}1 & 0 & -2 & - \frac{13}{7}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}1 & 0 & -2 & - \frac{13}{7}\\0 & 13 & 7 & 14\\0 & 7 & 0 & 2\end{matrix}\right]$$
From 2 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}- \frac{0 \cdot 13}{7} & 13 - \frac{7 \cdot 13}{7} & 7 - \frac{0 \cdot 13}{7} & 14 - \frac{2 \cdot 13}{7}\end{matrix}\right] = \left[\begin{matrix}0 & 0 & 7 & \frac{72}{7}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}1 & 0 & -2 & - \frac{13}{7}\\0 & 0 & 7 & \frac{72}{7}\\0 & 7 & 0 & 2\end{matrix}\right]$$
In 3 -th column
$$\left[\begin{matrix}-2\\7\\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 & 0 & 7 & \frac{72}{7}\end{matrix}\right]$$
,
and subtract it from other lines:
From 1 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}1 - \frac{\left(-2\right) 0}{7} & - \frac{\left(-2\right) 0}{7} & -2 - \frac{\left(-2\right) 7}{7} & - \frac{13}{7} - \frac{\left(-2\right) 72}{7 \cdot 7}\end{matrix}\right] = \left[\begin{matrix}1 & 0 & 0 & \frac{53}{49}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}1 & 0 & 0 & \frac{53}{49}\\0 & 0 & 7 & \frac{72}{7}\\0 & 7 & 0 & 2\end{matrix}\right]$$

It is almost ready, all we have to do is to find variables, solving the elementary equations:
$$x_{1} - \frac{53}{49} = 0$$
$$7 x_{3} - \frac{72}{7} = 0$$
$$7 x_{2} - 2 = 0$$
We get the answer:
$$x_{1} = \frac{53}{49}$$
$$x_{3} = \frac{72}{49}$$
$$x_{2} = \frac{2}{7}$$
Cramer's rule
$$- 2 x_{3} + \left(x_{1} - 4 x_{2}\right) = -3$$
$$x_{3} + \left(3 x_{1} + x_{2}\right) = 5$$
$$- 6 x_{3} + \left(3 x_{1} - 5 x_{2}\right) = -7$$

We give the system of equations to the canonical form
$$x_{1} - 4 x_{2} - 2 x_{3} = -3$$
$$3 x_{1} + x_{2} + x_{3} = 5$$
$$3 x_{1} - 5 x_{2} - 6 x_{3} = -7$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}x_{1} - 4 x_{2} - 2 x_{3}\\3 x_{1} + x_{2} + x_{3}\\3 x_{1} - 5 x_{2} - 6 x_{3}\end{matrix}\right] = \left[\begin{matrix}-3\\5\\-7\end{matrix}\right]$$
- this is the system of equations that has the form
A*x = B

Let´s find a solution of this matrix equations using Cramer´s rule:

Since the determinant of the matrix:
$$A = \operatorname{det}{\left(\left[\begin{matrix}1 & -4 & -2\\3 & 1 & 1\\3 & -5 & -6\end{matrix}\right] \right)} = -49$$
, then
The root xi is obtained by dividing the determinant of the matrix Ai. by the determinant of the matrix A.
( Ai we get it by replacement in the matrix A i-th column with column B )
$$x_{1} = - \frac{\operatorname{det}{\left(\left[\begin{matrix}-3 & -4 & -2\\5 & 1 & 1\\-7 & -5 & -6\end{matrix}\right] \right)}}{49} = \frac{53}{49}$$
$$x_{2} = - \frac{\operatorname{det}{\left(\left[\begin{matrix}1 & -3 & -2\\3 & 5 & 1\\3 & -7 & -6\end{matrix}\right] \right)}}{49} = \frac{2}{7}$$
$$x_{3} = - \frac{\operatorname{det}{\left(\left[\begin{matrix}1 & -4 & -3\\3 & 1 & 5\\3 & -5 & -7\end{matrix}\right] \right)}}{49} = \frac{72}{49}$$
Numerical answer [src]
x11 = 1.081632653061224
x21 = 0.2857142857142857
x31 = 1.469387755102041
x11 = 1.081632653061224
x21 = 0.2857142857142857
x31 = 1.469387755102041