Gaussian Elimination (Gauss-Jordan Elimination)
In a 2×2 system you already used the addition and subtraction method (elimination): you multiply one equation by a number and add it to another to eliminate a variable. What if there are three equations, or four, or a letter $k$ hiding in the coefficients? Gaussian elimination is that same idea, organized in a matrix, and it always works. By the end of this page you will be able to say, just by looking at the last row, how many solutions a system has and what the planes form geometrically.
Augmented matrix and row operations
A system can be written without the variables: just with its numbers. The table of coefficients, together with the column of constants, is called the augmented matrix.
$$\begin{cases} x + y + z = 6 \\ x - y + 2z = 5 \\ 2x + y - z = 1 \end{cases} \quad\longrightarrow\quad \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 1 & -1 & 2 & 5 \\ 2 & 1 & -1 & 1 \end{array}\right]$$Each row is an equation. The vertical bar separates the coefficients from the constants.
The goal is to reach an echelon form: each row starts with more zeros than the one before, like a staircase.
$$\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 2 & -1 & 1 \\ 0 & 0 & 4 & 12 \end{array}\right]$$The pivot (the first nonzero number in each row) is used to create zeros below it. Then you solve from the bottom up: back substitution.
Solve the following system of two equations in two unknowns using Gaussian elimination. Although you could use other methods from previous years, the objective is for…
Solve the following system of two equations in two unknowns using Gaussian elimination. Although you could use other methods from previous years, the objective is for you to practise transforming the coefficient matrix to obtain an echelon form:
$$\begin{cases} x + 2y = 8 \\ 3x - y = 3 \end{cases}$$To help you, we illustrate the process of "making a zero" below the first diagonal entry:
In Gaussian elimination, the final step is back substitution. Solve the following system, which is already in echelon (triangular) form: $$\begin{cases} x + y + z = 6 \\…
In Gaussian elimination, the final step is back substitution. Solve the following system, which is already in echelon (triangular) form:
$$\begin{cases} x + y + z = 6 \\ 2y + 3z = 11 \\ 4z = 12 \end{cases}$$Given the following augmented matrix $(A|B)$ associated with a system of equations, perform the necessary elementary operations to obtain a row echelon matrix and solve…
Given the following augmented matrix $(A|B)$ associated with a system of equations, perform the necessary elementary operations to obtain a row echelon matrix and solve the system:
$$(A|B) = \left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -1 & 1 \\ 1 & 0 & 2 & 5 \end{array} \right)$$Reducing a 3×3 system to echelon form
For a 3×3 system you always follow the same order:
-
Using the pivot in row 1, make zeros below it in column 1.
-
Using the pivot in row 2, make a zero below it in column 2.
-
Solve backward.
Obtain the solution to the following system of linear equations using Gaussian elimination, performing the necessary elementary row operations to make the matrix upper…
Obtain the solution to the following system of linear equations using Gaussian elimination, performing the necessary elementary row operations to make the matrix upper triangular:
$$\begin{cases} x + y + z = 2 \\ 2x + 3y + 5z = 11 \\ x - 5y + 6z = 29 \end{cases}$$Sometimes it is convenient to swap the order of the equations to simplify calculations (looking for "1" as a pivot). Rearrange and solve the following system using…
Sometimes it is convenient to swap the order of the equations to simplify calculations (looking for "1" as a pivot). Rearrange and solve the following system using Gaussian elimination:
$$\begin{cases} 3x - y + 2z = 7 \\ 2x + y + z = 6 \\ x + y + z = 4 \end{cases}$$Word problems
To set up the system: name the variables, translate each condition into an equation, and write the system in order, with the variables in the same order in every equation.
A high-performance sports center organizes a summer camp. They have hired a total of $50$ instructors across swimming, athletics, and cycling specialists. The number of…
A high-performance sports center organizes a summer camp. They have hired a total of $50$ instructors across swimming, athletics, and cycling specialists.
-
The number of swimming instructors is double that of athletics instructors.
-
If they were to hire $5$ more athletics instructors, their number would equal that of cycling instructors.
Use Gaussian elimination to find how many instructors there are in each specialty.
A technology company manufactures three models of graphics cards: GT, Pro, and Ultra. It is known that: The total cost of producing one unit of each model is $\$950…
A technology company manufactures three models of graphics cards: GT, Pro, and Ultra. It is known that:
-
The total cost of producing one unit of each model is $\$950$.
-
The cost of manufacturing two units of the GT model is equal to the sum of the costs of one unit of Pro and one unit of Ultra.
-
If three units of Ultra are manufactured, the cost exceeds by $\$100$ the cost of manufacturing one unit of each of the other two models together (GT and Pro).
Set up a system of equations and use Gaussian elimination to determine the production cost of each model.
Three friends, Alba, Bruno, and Carlos, are saving for an end-of-year trip that costs $\$1200…
Three friends, Alba, Bruno, and Carlos, are saving for an end-of-year trip that costs $\$1200$ per person.
-
Between the three of them, they have saved half of the money needed for the trip of all three.
-
Three times what Alba has minus what Carlos has is equal to what Bruno has.
-
If Alba gave $\$100$ to Carlos, both would have the same amount.
Set up the system and solve it using Gaussian elimination to find out how much each one has saved and how much they still need to be able to go on the trip.
Classifying the system with the last row
When you reduce the matrix, the last row tells the story:
Classify the following system according to its number of solutions after applying Gaussian elimination. State whether it is consistent with a unique solution, consistent…
Classify the following system according to its number of solutions after applying Gaussian elimination. State whether it is consistent with a unique solution, consistent with infinitely many solutions, or inconsistent, based on the last row obtained:
$$\begin{cases} x + 2y - z = 3 \\ 2x + 4y - 2z = 1 \\ x + y + z = 2 \end{cases}$$A system with infinitely many solutions (consistent undetermined) is one that has infinitely many solutions. Use Gaussian elimination to verify that the following system…
A system with infinitely many solutions (consistent undetermined) is one that has infinitely many solutions. Use Gaussian elimination to verify that the following system is of this type and write its general solution in terms of a parameter $\lambda$ (setting $z = \lambda$):
$$\begin{cases} x + y + z = 3 \\ 2x - y + z = 2 \\ x - 2y = -1 \end{cases}$$Solve the following system of linear equations using Gaussian elimination. If the system is consistent with infinitely many solutions, write the general solution in…
Solve the following system of linear equations using Gaussian elimination. If the system is consistent with infinitely many solutions, write the general solution in terms of a parameter $\lambda$:
$$\begin{cases} 2x - y + 3z = 5 \\ x + 2y - z = 0 \\ x - 3y + 4z = 5 \end{cases}$$Before starting, reflect on the choice of the "pivot" to make the calculations easier.
What the three planes form
Each equation $ax + by + cz = d$ is a plane in space, and solving the system means looking for the points that lie on all three planes at once. That is why the result of Gaussian elimination has a geometric reading.
| Result of Gaussian elimination | What the planes form |
|---|---|
| Unique solution (3 pivots) | The three planes meet at one point. |
| Infinitely many solutions, 1 parameter (2 pivots) | The three planes share a line (like the pages of an open book), or two of them are the same plane and the third cuts them in a line. |
| Infinitely many solutions, 2 parameters (1 pivot) | The three planes are the same plane. |
| Inconsistent | The three planes have no point in common. |
For inconsistent systems you have to tell which configuration it is. The trick is to look at the normal vectors, which are the coefficients $(a, b, c)$ of each equation:
-
If two normals are proportional, those two planes are parallel (or coincident, if the constant also keeps the proportion).
-
If no pair of normals is proportional, but the system is inconsistent, the planes intersect two at a time forming a triangular prism: three parallel lines and no common point.
Geometrically interpret the relative position of the three planes defined by the following equations, using Gaussian elimination to analyse the system: $$\pi_1: x + 2y -…
Geometrically interpret the relative position of the three planes defined by the following equations, using Gaussian elimination to analyse the system:
$$\pi_1: x + 2y - z = 3$$ $$\pi_2: 2x - y + z = 1$$ $$\pi_3: 5x + 5y - 2z = 10$$Do they intersect at a point, along a line, or do they have no common points? Justify your answer after transforming the augmented matrix.
Consider the system of equations: $\begin{cases} x + ay + z = a \\ ax + y + z = 1 \\ x + y + az = a^2 \end{cases}$ a) Discuss the system for the different real values of…
Consider the system of equations:
$\begin{cases} x + ay + z = a \\ ax + y + z = 1 \\ x + y + az = a^2 \end{cases}$
- a) Discuss the system for the different real values of $a$.
- b) If $a = 1$, describe the solution geometrically.
- c) If $a = -2$, show using Gaussian elimination that the system is inconsistent. What geometric configuration do the three planes form in this case? Justify your answer with the relative positions of the planes (for example, by studying their normal vectors) and use a sketch drawn by yourself to help.
Homogeneous systems
A system is homogeneous if all its constants are 0. It always has the trivial solution $(0, 0, 0)$, so it is never inconsistent. The question is whether it has other solutions: that happens when, after reduction, there are fewer pivots than variables (a row of zeros remains). Since the column of zeros does not change under the operations, it is enough to reduce the coefficient matrix.
Consider the following homogeneous system of equations: $$\begin{cases} x + 2y + 3z = 0 \\ 3x + y - z = 0 \\ 2x - y - 4z = 0 \end{cases}$$ a) Prove, by reducing the…
Consider the following homogeneous system of equations:
$$\begin{cases} x + 2y + 3z = 0 \\ 3x + y - z = 0 \\ 2x - y - 4z = 0 \end{cases}$$- a) Prove, by reducing the coefficient matrix to echelon form, that the system admits non-trivial solutions (other than $x=0, y=0, z=0$).
- b) Obtain the parametric solution of the system.
Consider the homogeneous system dependent on the parameter $m$: $\begin{cases} mx + y + z = 0 \\ x + my + z = 0 \\ 2x + y + mz = 0 \end{cases}$ a) Use Gaussian…
Consider the homogeneous system dependent on the parameter $m$:
$\begin{cases} mx + y + z = 0 \\ x + my + z = 0 \\ 2x + y + mz = 0 \end{cases}$
- a) Use Gaussian elimination to find the values of $m$ for which the system admits solutions other than the trivial one $(0,0,0)$.
- b) For the integer value of $m$ found in the previous section, solve the system and obtain the parametric expression of the solution.
- c) Give a particular solution other than the trivial one where the unknowns are integers.
Systems with a parameter
If there is a letter in the coefficients, you reduce the system the same way, treating it as a number. At the end a row appears that depends on the parameter, and you study for which values it becomes zero.
After partially applying Gaussian elimination to a system of three equations in three unknowns $(x, y, z)$, the following augmented matrix has been reached:…
After partially applying Gaussian elimination to a system of three equations in three unknowns $(x, y, z)$, the following augmented matrix has been reached:
$$\begin{pmatrix} 1 & -1 & 2 & | & 3 \\ 0 & 1 & -1 & | & 1 \\ 0 & 0 & m^2-4 & | & m-2 \end{pmatrix}$$Discuss the type of system (consistent with a unique solution, consistent with infinitely many solutions, or inconsistent) depending on the values of the parameter $m$. Is there any value of $m$ for which the system is inconsistent?
Given the system depending on the real parameter $k$: $$\begin{cases} x + y + z = 2 \\ 2x + 3y + kz = 5 \\ kx + y + z = 1 \end{cases}$$ a) Apply Gaussian elimination to…
Given the system depending on the real parameter $k$:
$$\begin{cases} x + y + z = 2 \\ 2x + 3y + kz = 5 \\ kx + y + z = 1 \end{cases}$$- a) Apply Gaussian elimination to obtain a row echelon matrix.
- b) Determine for which values of $k$ the system is consistent with a unique solution.
- c) Solve it for $k = 0$.
Consider the following system of linear equations depending on the real parameter $k$: $\begin{cases} kx + y + z = k^2 \\ x + ky + z = k \\ x + y + kz = 1 \end{cases}$…
Consider the following system of linear equations depending on the real parameter $k$:
$\begin{cases} kx + y + z = k^2 \\ x + ky + z = k \\ x + y + kz = 1 \end{cases}$
- a) Discuss the system using the Gaussian elimination method according to the different values of $k$.
- b) In the case where the system is consistent dependent (underdetermined), determine the general solution and find a particular solution such that the sum of its components is equal to 1.
- c) Is there any value of $k$ for which the system represents three planes intersecting in a line? Justify your answer.
A fintech company uses an algorithm to balance three investment portfolios. The capital flow between them is defined by the system:…
A fintech company uses an algorithm to balance three investment portfolios. The capital flow between them is defined by the system:
$\begin{cases} x + 2y + 3z = 2 \\ 2x + 5y + 4z = -1 \\ x + 3y + az = b \end{cases}$
- a) Apply Gaussian elimination to obtain a row echelon matrix and discuss the system according to the values of $a$ and $b$.
- b) Determine the values of $a$ and $b$ so that the portfolios do not have a common equilibrium point (inconsistent system).
- c) If $a = 1$ and $b = -3$, the system is consistent with infinitely many solutions. Find the solution that minimises the value of $x^2$.
More equations than variables
A system with more equations than variables is called overdetermined. Gaussian elimination works the same way: you reduce the augmented matrix even if it has more rows than columns. Each extra equation is one more condition, and it is easy for one to clash with the others, but not always.
Study the following system of 4 equations in 3 unknowns using Gaussian elimination:…
Study the following system of 4 equations in 3 unknowns using Gaussian elimination:
$\begin{cases} x + y + z = 2 \\ 2x + 3y + z = 3 \\ ax + 10y + 4z = 11 \\ 3x + 4y + 2z = a \end{cases}$
- a) Determine for which value of $a$ the system is consistent.
- b) For this value of $a$, solve the system and indicate whether the solution is unique.
- c) What relative position do the four planes defined by the equations occupy when the system is consistent?
In a smart power grid, the current intensities $I_1, I_2, I_3$ and $I_4$ at four nodes satisfy the following Kirchhoff's laws, scaled by a resistance factor $R$:…
In a smart power grid, the current intensities $I_1, I_2, I_3$ and $I_4$ at four nodes satisfy the following Kirchhoff's laws, scaled by a resistance factor $R$:
$\begin{cases} I_1 + I_2 - I_3 + I_4 = 0 \\ 2I_1 - I_2 + I_3 = 5 \\ I_1 + I_3 - 2I_4 = 1 \\ 3I_1 + I_4 = 6 \end{cases}$
- a) Solve the system using the Gauss–Jordan elimination method (achieving the maximum possible number of zeros in the matrix).
- b) Is the system consistent with a unique solution? Justify whether it is possible to remove one of the measurements without losing information about the currents.
Gauss-Jordan: zeros above and below
Gauss-Jordan elimination does not stop at echelon form: it keeps going until every pivot equals 1 and is the only nonzero number in its column (reduced row echelon form). That way the solution can be read directly, without back substitution.
Building a system with given conditions
Gaussian elimination also works in reverse: to build a system with a given behavior. Start from a known solution, write equations that it satisfies, and make sure one of them is a combination of the others.
We wish to construct a system of three equations in three unknowns that simultaneously satisfies: 1. It is consistent with infinitely many solutions. 2. One of its…
We wish to construct a system of three equations in three unknowns that simultaneously satisfies:
-
It is consistent with infinitely many solutions.
-
One of its solutions is $(1, 0, 2)$.
-
Upon applying Gaussian elimination, the last row of the echelon matrix is zero.
- a) Propose an original system satisfying these conditions.
- b) Explain step by step the process of reducing your proposed system to echelon form to show that it is indeed consistent with infinitely many solutions.
An aerospace engineering laboratory is designing a new alloy using three metals: Titanium ($x$), Aluminum ($y$), and Vanadium ($z$). The mass proportions must satisfy…
An aerospace engineering laboratory is designing a new alloy using three metals: Titanium ($x$), Aluminum ($y$), and Vanadium ($z$). The mass proportions must satisfy the following system, where $\alpha$ and $\beta$ are parameters depending on the smelting temperature:
$\begin{cases} x + y + z = \alpha \\ \alpha x + y + z = 1 \\ x + \alpha y + z = \beta \end{cases}$
- a) Discuss the consistency of the system depending on the values of $\alpha$ and $\beta$.
- b) If $\alpha = -1$, what value must $\beta$ have for the system to be consistent? Solve it in this case using Gaussian elimination.
- c) Interpret the results obtained if the system were inconsistent from the perspective of alloy manufacturing.
Back to the beginning: with three equations, four, or a letter $k$, you always reduce the augmented matrix, and the last row tells you whether there is one solution (a point), infinitely many (a line or a plane), or none (planes with no common point).