Gaussian elimination method

The idea of the Gaussian elimination method is the following one. Given a system of equations, we use the rules of the previous level to create an equivalent echelon system so that we can proceed and solve it easily. The Gaussian method itself is the procedure of converting the system into an equivalent echelon system.

Let's have the system: $$$\left\{ \begin{array}{c} 3x+2y+z=1 \\ 5x+3y+4z=2 \\ x+y-z=1 \end{array} \right.$$$

The first step is writing the system in matricial form. See that in the matrix we take the coefficients and the constant terms. $$$\begin{pmatrix} 3 & 2 & 1 & |1 \\ 5 & 3 & 4 & |2 \\ 1 & 1 & -1 & |1 \end{pmatrix}$$$

Using the already well-known rules, we must obtain an echelon system, which will look as follows: $$$\begin{pmatrix} a_{11} & a_{12} & a_{13} & |b_1 \\ \fbox{} & a_{22} & a_{23} & |b_2 \\ \fbox{} & \fbox{} & a_{33} & |b_3 \end{pmatrix}$$$ Let's find it $$$\begin{pmatrix} 3 & 2 & 1 & |1 \\ 5 & 3 & 4 & |2 \\ 1 & 1 & -1 & |1 \end{pmatrix}\rightarrow (r3\leftrightarrow r1) \rightarrow \begin{pmatrix} 1 & 1 & -1 & |1 \\ 3 & 2 & 1 & |1 \\ 5 & 3 & 4 & |2 \end{pmatrix}\rightarrow \left\{ \begin{array}{c} r2-3r1 \\ r3-5r1 \end{array} \right.$$$ $$$\rightarrow \begin{pmatrix} 1 & 1 & -1 & | & 1 \\ 0 & -1 & 4 & | & -2 \\ 0 & -2 & 9 & | & -3 \end{pmatrix} \rightarrow r3-2r2 \rightarrow \begin{pmatrix} 1 & 1 & -1 & | & 1 \\ 0 & -1 & 4 & | & -2 \\ 0 & 0 & 1 & | & 1 \end{pmatrix}$$$ This system is already an echelon system and therefore we can solve it. So we obtained the following system: $$$\left\{ \begin{array}{c} x+y-z=1 \\ -y+4z=-2 \\ z=1 \end{array} \right.$$$ The solution is: $$$z=1 \\ y=6 \\ x=-4$$$ Therefore this is a compatible determinate system.

Now let's study the system $$$\left\{ \begin{array}{c} 2x-5y+4z+u-v=-3 \\ x-2y+z-u+v=5 \\ x-4y+6z+2+v=10 \end{array} \right.$$$

That we re-write as $$$\begin{pmatrix} 2 & -5 & 4 & 1 & -1 & | & -3 \\ 1 & -2 & 1 & -1 & 1 &| & 5 \\ 1 & -4 & 6 & 2 & 1 & | & 10 \end{pmatrix}$$$

We do the following steps $$$\begin{pmatrix} 2 & -5 & 4 & 1 & -1 & | & -3 \\ 1 & -2 & 1 & -1 & 1 &| & 5 \\ 1 & -4 & 6 & 2 & 1 & | & 10 \end{pmatrix} \rightarrow (r2\leftrightarrow r1) \rightarrow$$$ $$$\begin{pmatrix} 1 & -2 & 1 & -1 & 1 & | & 5 \\ 2 & -5 & 4 & 1 & -1 &| & -3 \\ 1 & -4 & 6 & 2 & 1 & | & 10 \end{pmatrix}\rightarrow \left\{ \begin{array}{c} r2-2r1 \\ r3-r1 \end{array} \right. \rightarrow$$$ $$$\begin{pmatrix} 1 & -2 & 1 & -1 & 1 & | & 5 \\ 2 & -5 & 4 & 1 & -1 &| & -3 \\ 1 & -4 & 6 & 2 & 1 & | & 10 \end{pmatrix} \rightarrow r3-2r2 \rightarrow$$$ $$$\rightarrow \begin{pmatrix} 1 & -2 & 1 & -1 & 1 & | & 5 \\ 0 & -1 & 2 & 3 & -3 &| & -13 \\ 0 & 0 & 1 & -3 & 6 & | & 31 \end{pmatrix}$$$

and obtain $$z-3u+6v=31$$.

In this case we need to give any value to $$u$$ and $$v$$ and then we find the corresponding values of $$z$$, $$y$$ and $$x$$, all of them according to $$u$$ and $$v$$. Therefore, this is an compatible indeterminate system.

Finally let's see an example of an indeterminate system $$$\left\{ \begin{array}{c} x+y-z=1 \\ 3x+2y+z=1 \\ 5x+3y+4z=2 \\ -2x-y+5z=6 \end{array} \right.$$$ That we re-write: $$$\begin{pmatrix} 1 & 1 & -1 & |1 \\ 3 & 2 & 1 & |1 \\ 5 & 3 & 4 & |2 \\ -2 & -1 & 5 & |6 \end{pmatrix}$$$ And the following steps are done: $$$\begin{pmatrix} 1 & 1 & -1 & |1 \\ 3 & 2 & 1 & |1 \\ 5 & 3 & 4 & |2 \\ -2 & -1 & 5 & |6 \end{pmatrix} \rightarrow \left\{ \begin{array}{c} r2-3r1 \\ r3-5r1 \\ r4+2r1 \end{array} \right. \rightarrow \begin{pmatrix} 1 & 1 & -1 & | & 1 \\ 0 & -1 & 4 & | & -2 \\ 0 & -2 & 9 & | & -3 \\ 0 & 1 & 3 & | & 8 \end{pmatrix} \rightarrow $$$ $$$\left\{ \begin{array}{c} r3-2r2 \\ r4+r2 \end{array} \right. \rightarrow \begin{pmatrix} 1 & 1 & -1 & | & 1 \\ 0 & -1 & 4 & | & -2 \\ 0 & 0 & 1 & | & 1 \\ 0 & 0 & 7 & | & 6 \end{pmatrix} \rightarrow r4-7r3 \rightarrow$$$ $$$ \begin{pmatrix} 1 & 1 & -1 & | & 1 \\ 0 & -1 & 4 & | & -2 \\ 0 & 0 & 1 & | & 1 \\ 0 & 0 & 0 & | & -1 \end{pmatrix}$$$

To see an incompatibility: $$0=-1$$.

This system is incompatible.

Homogeneous systems

If a system with $$m$$ equations and $$n$$ unknowns has all the constant terms equal to zero it is said that it is homogeneous.

It only admits the trivial solution $$$x_1=x_2=\ldots=x_n=0$$$

The necessary and sufficient condition so that a homogeneous system has solutions other than the trivial one is that the rank of the matrix of the coefficients is lower than the number of unknowns, or to say it in another way, that the determinant of the matrix of the coefficients is zero. Therefore, to solve an homogeneous system we will have to make it so that the determinant is not zero to ensure that its solution is not the trivial one.