Mister Exam

5x+2y-12z=3; x+y+4z=-5; 2х-6y-2z=-3

v

The graph:

from to

from to

The solution

You have entered [src]
5*x + 2*y - 12*z = 3
$$- 12 z + \left(5 x + 2 y\right) = 3$$
x + y + 4*z = -5
$$4 z + \left(x + y\right) = -5$$
2*x - 6*y - 2*z = -3
$$- 2 z + \left(2 x - 6 y\right) = -3$$
-2*z + 2*x - 6*y = -3
Rapid solution
$$x_{1} = - \frac{187}{113}$$
=
$$- \frac{187}{113}$$
=
-1.65486725663717

$$y_{1} = \frac{28}{113}$$
=
$$\frac{28}{113}$$
=
0.247787610619469

$$z_{1} = - \frac{203}{226}$$
=
$$- \frac{203}{226}$$
=
-0.898230088495575
Cramer's rule
$$- 12 z + \left(5 x + 2 y\right) = 3$$
$$4 z + \left(x + y\right) = -5$$
$$- 2 z + \left(2 x - 6 y\right) = -3$$

We give the system of equations to the canonical form
$$5 x + 2 y - 12 z = 3$$
$$x + y + 4 z = -5$$
$$2 x - 6 y - 2 z = -3$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}5 x_{1} + 2 x_{2} - 12 x_{3}\\x_{1} + x_{2} + 4 x_{3}\\2 x_{1} - 6 x_{2} - 2 x_{3}\end{matrix}\right] = \left[\begin{matrix}3\\-5\\-3\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}5 & 2 & -12\\1 & 1 & 4\\2 & -6 & -2\end{matrix}\right] \right)} = 226$$
, 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 & 2 & -12\\-5 & 1 & 4\\-3 & -6 & -2\end{matrix}\right] \right)}}{226} = - \frac{187}{113}$$
$$x_{2} = \frac{\operatorname{det}{\left(\left[\begin{matrix}5 & 3 & -12\\1 & -5 & 4\\2 & -3 & -2\end{matrix}\right] \right)}}{226} = \frac{28}{113}$$
$$x_{3} = \frac{\operatorname{det}{\left(\left[\begin{matrix}5 & 2 & 3\\1 & 1 & -5\\2 & -6 & -3\end{matrix}\right] \right)}}{226} = - \frac{203}{226}$$
Gaussian elimination
Given the system of equations
$$- 12 z + \left(5 x + 2 y\right) = 3$$
$$4 z + \left(x + y\right) = -5$$
$$- 2 z + \left(2 x - 6 y\right) = -3$$

We give the system of equations to the canonical form
$$5 x + 2 y - 12 z = 3$$
$$x + y + 4 z = -5$$
$$2 x - 6 y - 2 z = -3$$
Rewrite the system of linear equations as the matrix form
$$\left[\begin{matrix}5 & 2 & -12 & 3\\1 & 1 & 4 & -5\\2 & -6 & -2 & -3\end{matrix}\right]$$
In 1 -th column
$$\left[\begin{matrix}5\\1\\2\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}5 & 2 & -12 & 3\end{matrix}\right]$$
,
and subtract it from other lines:
From 2 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}1 - \frac{5}{5} & 1 - \frac{2}{5} & 4 - - \frac{12}{5} & -5 - \frac{3}{5}\end{matrix}\right] = \left[\begin{matrix}0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 2 & -12 & 3\\0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\\2 & -6 & -2 & -3\end{matrix}\right]$$
From 3 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}2 - \frac{2 \cdot 5}{5} & -6 - \frac{2 \cdot 2}{5} & -2 - - \frac{24}{5} & -3 - \frac{2 \cdot 3}{5}\end{matrix}\right] = \left[\begin{matrix}0 & - \frac{34}{5} & \frac{14}{5} & - \frac{21}{5}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 2 & -12 & 3\\0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\\0 & - \frac{34}{5} & \frac{14}{5} & - \frac{21}{5}\end{matrix}\right]$$
In 2 -th column
$$\left[\begin{matrix}2\\\frac{3}{5}\\- \frac{34}{5}\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 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\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{0 \cdot 10}{3} & 2 - \frac{3 \cdot 10}{3 \cdot 5} & - \frac{10 \cdot 32}{3 \cdot 5} - 12 & 3 - - \frac{56}{3}\end{matrix}\right] = \left[\begin{matrix}5 & 0 & - \frac{100}{3} & \frac{65}{3}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 0 & - \frac{100}{3} & \frac{65}{3}\\0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\\0 & - \frac{34}{5} & \frac{14}{5} & - \frac{21}{5}\end{matrix}\right]$$
From 3 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}- \frac{\left(-34\right) 0}{3} & - \frac{34}{5} - \frac{\left(-34\right) 3}{3 \cdot 5} & \frac{14}{5} - \frac{\left(-34\right) 32}{3 \cdot 5} & - \frac{\left(-34\right) \left(-1\right) 28}{3 \cdot 5} - \frac{21}{5}\end{matrix}\right] = \left[\begin{matrix}0 & 0 & \frac{226}{3} & - \frac{203}{3}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 0 & - \frac{100}{3} & \frac{65}{3}\\0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\\0 & 0 & \frac{226}{3} & - \frac{203}{3}\end{matrix}\right]$$
In 3 -th column
$$\left[\begin{matrix}- \frac{100}{3}\\\frac{32}{5}\\\frac{226}{3}\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 & \frac{226}{3} & - \frac{203}{3}\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(-50\right) 0}{113} & - \frac{\left(-50\right) 0}{113} & - \frac{100}{3} - \frac{\left(-50\right) 226}{3 \cdot 113} & \frac{65}{3} - - \frac{-10150}{339}\end{matrix}\right] = \left[\begin{matrix}5 & 0 & 0 & - \frac{935}{113}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 0 & 0 & - \frac{935}{113}\\0 & \frac{3}{5} & \frac{32}{5} & - \frac{28}{5}\\0 & 0 & \frac{226}{3} & - \frac{203}{3}\end{matrix}\right]$$
From 2 -th line. Let’s subtract it from this line:
$$\left[\begin{matrix}- \frac{0 \cdot 48}{565} & \frac{3}{5} - \frac{0 \cdot 48}{565} & \frac{32}{5} - \frac{48 \cdot 226}{3 \cdot 565} & - \frac{28}{5} - - \frac{3248}{565}\end{matrix}\right] = \left[\begin{matrix}0 & \frac{3}{5} & 0 & \frac{84}{565}\end{matrix}\right]$$
you get
$$\left[\begin{matrix}5 & 0 & 0 & - \frac{935}{113}\\0 & \frac{3}{5} & 0 & \frac{84}{565}\\0 & 0 & \frac{226}{3} & - \frac{203}{3}\end{matrix}\right]$$

It is almost ready, all we have to do is to find variables, solving the elementary equations:
$$5 x_{1} + \frac{935}{113} = 0$$
$$\frac{3 x_{2}}{5} - \frac{84}{565} = 0$$
$$\frac{226 x_{3}}{3} + \frac{203}{3} = 0$$
We get the answer:
$$x_{1} = - \frac{187}{113}$$
$$x_{2} = \frac{28}{113}$$
$$x_{3} = - \frac{203}{226}$$
Numerical answer [src]
x1 = -1.654867256637168
y1 = 0.247787610619469
z1 = -0.8982300884955752
x1 = -1.654867256637168
y1 = 0.247787610619469
z1 = -0.8982300884955752