Back to homeMathematics · 2nd Bach. Social Sciences · Change subject
Start for free
BAC2 ss · Mathematics
Systems of linear equations · Systems

Gaussian elimination

Gaussian elimination turns a system into an equivalent one that is much easier to solve: an echelon system, where each row has one more zero than the one before. Once you get there, the solution almost falls out by itself, working from the bottom up.

Before you start, make sure you know: Gaussian elimination (1st Bachillerato)
Before you start, make sure you know: Solution methods (1st Bachillerato)

Triangularising step by step

Augmented echelon matrix showing how the unknown z is solved from the last row. 111|2013|70023|69 z = 69/23 = 3
Practice★☆☆Not started
Solve the following system of linear equations using Gaussian elimination. Notice that the first unknown already has a coefficient of $1$, making it easier to use as a…

Solve the following system of linear equations using Gaussian elimination. Notice that the first unknown already has a coefficient of $1$, making it easier to use as a pivot:

$\begin{cases} x + y + z = 6 \\ x - y + 2z = 5 \\ x - y - z = -1 \end{cases}$

Solve
Practice★★☆Not started
Solve the following system of equations using the Gaussian elimination method: $$ \begin{cases} x + y + z = 2 \\ 2x + 3y + 5z = 11 \\ x - 5y + 6z = 29 \end{cases} $$ a)…

Solve the following system of equations using the Gaussian elimination method:

$$ \begin{cases} x + y + z = 2 \\ 2x + 3y + 5z = 11 \\ x - 5y + 6z = 29 \end{cases} $$
  1. a) Write the augmented matrix of the system and transform it, using row operations, into an echelon matrix.
  1. b) From the echelon matrix, classify the system (consistent determinate, consistent indeterminate, or inconsistent) and justify your answer.
  1. c) If the system is consistent, find its solution.
Solve

Choosing the pivot and operating on rows

Swapping equations to put a coefficient equal to 1 in the first row to act as the pivot. 3x − 2y + z = 10 x + y − z = 2 E₁ ↔ E₂ coefficient 1 in x: best pivot to start with
Practice★☆☆Not started
Given the following augmented matrix, which has already been partially transformed using Gaussian elimination, state which elementary row operation you would perform to…

Given the following augmented matrix, which has already been partially transformed using Gaussian elimination, state which elementary row operation you would perform to obtain a zero in the position marked with the orange circle and write down the new row $F_3$.

$\begin{pmatrix} 1 & 2 & -1 & | & 3 \\ 0 & 1 & 3 & | & 5 \\ 0 & 2 & 4 & | & 8 \end{pmatrix}$

R₁ R₂ R₃ 1 2 −1 3 0 1 3 5 0 2 4 8 Pivot Make 0 R₃ → ?
Solve
Practice★☆☆Not started
To solve the following system, the first step of the Gauss method is usually to make the coefficient of $x$ in the first equation equal to $1$ or $-1$. Which elementary…

To solve the following system, the first step of the Gauss method is usually to make the coefficient of $x$ in the first equation equal to $1$ or $-1$. Which elementary transformation would you perform first to make the calculation easier? Justify your answer.

$\begin{cases} 3x - 2y + z = 10 \\ x + y - z = 2 \\ 2x + 3y + 2z = 15 \end{cases}$

Solve

From the echelon matrix to the solution

Back substitution diagram for an echelon matrix, calculating z, y and x from the bottom up. 1−12|401−1|1003|6 ← substitute: x = 3 ← substitute: y = 3 ← last: z = 2
Practice★☆☆Not started
A student has applied Gaussian elimination to a system of 3 equations with 3 unknowns and reached the following echelon matrix:…

A student has applied Gaussian elimination to a system of 3 equations with 3 unknowns and reached the following echelon matrix:

$\begin{pmatrix} 1 & -1 & 2 & | & 4 \\ 0 & 1 & -1 & | & 1 \\ 0 & 0 & 3 & | & 6 \end{pmatrix}$

Finish solving the system by calculating the values of $x$, $y$ and $z$ using back substitution.

Solve

Homogeneous systems: the trivial solution always exists

Diagram highlighting that the trivial solution with all unknowns equal to zero is always a solution of a homogeneous system. x = y = z = 0 always a solution
Practice★☆☆Not started
Apply Gaussian elimination to solve the following homogeneous system. Remember that this type of system always has at least the trivial solution:…

Apply Gaussian elimination to solve the following homogeneous system. Remember that this type of system always has at least the trivial solution:

$\begin{cases} x + y + z = 0 \\ 2x - y + 3z = 0 \\ 3x + 4z = 0 \end{cases}$

Solve

Gaussian elimination with a parameter

When the system contains a letter, you triangularise in exactly the same way, but you must watch for which value of the parameter makes a pivot vanish: that value needs its own separate case.

Discussion of the types of solution of a system according to the value of the parameter k from the row 0 = k - 1. … 0 = k − 1 … k=1 → consistent, underdetermined k≠1 → inconsistent
Practice★★☆Not started
Apply Gaussian elimination to discuss and solve the following system of linear equations. If the system turns out to be consistent undetermined, write down the general…

Apply Gaussian elimination to discuss and solve the following system of linear equations. If the system turns out to be consistent undetermined, write down the general solution in terms of a parameter $\lambda$:

$$ \begin{cases} x - y + 2z = 4 \\ 2x + y - z = 2 \\ 4x - y + 3z = 10 \end{cases} $$
Solve
Practice★★★Not started
Consider the following system of equations depending on the real parameter $k$: $\begin{cases} kx + y + z = 1 \\ x + ky + z = k \\ x + y + kz = k^2 \end{cases}$ Use…

Consider the following system of equations depending on the real parameter $k$:

$\begin{cases} kx + y + z = 1 \\ x + ky + z = k \\ x + y + kz = k^2 \end{cases}$

Use Gaussian elimination to discuss the consistency of the system according to the different values of $k$. In the cases where the system is consistent and indeterminate, find the general solution.

Solve

Creating and checking an elimination algorithm

The algorithm must also work if the first candidate for the pivot is zero. Before dividing, look for a row below with a non-zero entry in that column and swap it in. If the whole remaining part of the column is zero, move on to the next column without increasing the number of pivots.

fila_pivote ← 0

para cada columna de coeficientes:

    buscar desde fila_pivote una fila con entrada no nula

    si no existe: continuar con la siguiente columna

    intercambiar esa fila con fila_pivote

    para cada fila inferior:

        factor ← entrada / pivote

        restar factor * fila_pivote a toda la fila (incluido B)

    fila_pivote ← fila_pivote + 1

examinar filas nulas y términos independientes

Choose between these outcomes after eliminating:

Classification of cases after reducing to echelon form: unique solution with n pivots, redundant row if 0 = 0 remains, or inconsistency if 0 = c appears with c non-zero. After reducing the augmented matrix to echelon form Pivots: nUnique solution* 0 = 0Redundant row 0 = c, c ≠ 0Inconsistent

*A unique solution if there are n pivots in the coefficients and no inconsistent row. With fewer than n pivots and no inconsistency there are free variables.

Modify the pseudocode so that each pivot becomes 1 and the entries above it are also cleared: you get Gauss-Jordan elimination. Run it by hand or program it, compare the number of operations, and check the three tests with a matrix calculation tool. Hand in the intermediate matrices and check the solutions in the original equations. With decimal data, preferably select the available pivot with the largest absolute value and state a tolerance for deciding what counts as approximately zero; exact ranks with parameters require separate algebraic cases.

Reviewing the process as a team

Rotate the tasks of design, execution, checking and explanation. Each member predicts the type of solution before calculating. If a discrepancy appears, find the first row that differs and rebuild the operation without blaming anyone's ability. When you get stuck, write down what you know, isolate a simple case and ask for a specific hint. Hand in one corrected mistake, the strategy that helped you overcome it and an alternative suggested by another member. Compare methods with arguments, not by who finishes first.

Summary

See all the exercises in this section