Area 7 of the course is Computational Methods or Mechanics: each school teaches one. This unit and Unit 16 are Computational Methods; Units 17–18 are Mechanics. Unit 5 solves the same systems by Cramer’s rule and by matrices; this unit solves them by elimination and by iteration, the ways computers do.
Twice a year the TOP500 list ranks the fastest computers in the world, and it ranks them by one test: how fast each solves a system of linear equations, millions of equations in millions of unknowns. In November 2026 the fastest, LineShine at the National Supercomputing Centre in Shenzhen, China, did it at 2.198 × 10¹⁸ arithmetic operations a second. The rules say which method it must use: the elimination of 15.1. Unit 5’s Cramer’s rule gives the same answers, so why not that? How long would each take for just 30 equations in 30 unknowns? The answer is at the end of the unit.
What you need
A system of three linear equations in x, y, z is written by its augmented matrix, the coefficients with the right-hand sides after a bar; each row is one equation:
R₂ → R₂ − 2R₁ means “replace row 2 by row 2 minus twice row 1”, as in Grade 11, Unit 6. A system has exactly one solution, none, or infinitely many: Unit 5 tells which, by determinants and by row operations; its elementary row operations are the tools of 15.1.
15.1 Gauss elimination method
Some systems are easy. This one is solved from the bottom up:
The last equation gives z = 3; then the second, −3y + 3 = −3, gives y = 2; then the first, x = 6 − 2 − 3 = 1. Solving from the last equation up is back substitution. The system is easy because its coefficients make a triangle: each equation has one unknown fewer than the one above. Its matrix of coefficients is upper triangular (zeros below the diagonal).
Gauss elimination turns any system into this shape and then back-substitutes. It uses only the three elementary row operations of Unit 5, 5.4 (swap two rows; multiply a row by k ≠ 0; add a multiple of one row to another), which never change the solutions. Unit 5’s row-equivalent method goes on until the matrix is ; Gauss elimination stops at the triangle, which takes about a third fewer operations on a big system. The method:
- Pivot: the first row’s coefficient of x, . For each row below, the multiplier , and : x is gone from every row below the first.
- Do the same with the second row’s coefficient of y as the pivot: y is gone from the third row.
- The matrix is now upper triangular: back-substitute.
What the last row tells you
As in Unit 5, a last row says 0 = c: no solution if c ≠ 0, and if c = 0 it says nothing, two equations are left for three unknowns, and there are infinitely many. A nonzero last pivot means exactly one (the determinant is the product of the pivots, so it is not 0).
Gauss elimination brings a system’s augmented matrix to . The system has:
Pick an answer to see why.
15.2 Gauss–Seidel method
Elimination gives the exact answer in a fixed number of steps. Iteration does what Grade 11, Unit 20 did for one equation: guess, then improve the guess, again and again. Take a system whose diagonal coefficients are large:
Let each equation give its own unknown, the first x and the second y:
Start from x = y = 0. The first gives x = 1.4; put that new x into the second at once: . That is one iteration. The next uses y = 2.1: x = 0.98, then y = 1.995. The values close in on the solution, (1, 2).
This is the Gauss–Seidel method. For three equations a₁x + b₁y + c₁z = d₁, a₂x + b₂y + c₂z = d₂, a₃x + b₃y + c₃z = d₃:
each worked out with the newest values of the others: the x just found goes into y, and both into z. (The Jacobi method waits and uses only the last iteration’s values; it is slower.)
When it converges
A system is diagonally dominant if in every equation the diagonal coefficient (of x in the first, y in the second, z in the third) is larger in size than the other coefficients together: |a₁| > |b₁| + |c₁|, |b₂| > |a₂| + |c₂|, |c₃| > |a₃| + |b₃|. Then Gauss–Seidel always converges, from any start. Why, in short: each unknown is the right-hand side minus small parts of the others, divided by a big number, so an error in the others is shrunk at every step. The condition is sufficient, not necessary: some systems that are not dominant converge too, but then you can’t be sure in advance.
A system that is not dominant can often be made so by reordering its equations, as in the widget: x − 4y = −7 is the one with the big y, so it must give y.
Where iteration wins
Elimination fills in: a row with only five nonzero coefficients gets many more as other rows are subtracted from it. Engineers who work out the temperature through a wall, the stress in a dam or the flow of groundwater cut the region into a grid of points, and each point’s equation links it to its few neighbors only: for steady heat, each point’s temperature is the average of its neighbors’. A million points give a million equations with at most five nonzero coefficients each. Gauss–Seidel uses only those, and keeps no triangle of fill-in; this use of it for a grid is also called Liebmann’s method. The long question does a small one.
Back to the fastest computer
Cramer’s rule for n unknowns needs n + 1 determinants of size n × n. Expanded by cofactors, the way you expand a 3 × 3, an n × n determinant has terms, each a product of n numbers. Gauss elimination takes about operations.
| Unknowns n | Cramer, by cofactors: terms | Elimination: operations |
|---|---|---|
| 3 | 24 | 18 |
| 10 | about 4 × 10⁷ | about 670 |
| 30 | about 8.2 × 10³³ | 18,000 |
For 30 unknowns, LineShine, at 2.198 × 10¹⁸ operations a second and counting just one operation a term, would need about 3.7 × 10¹⁵ seconds for Cramer’s rule by cofactors: about 120 million years. Elimination’s 18,000 operations take any phone a fraction of a millisecond.
That race is unfair to Cramer, though: nobody finds a big determinant by cofactors. Elimination gives it too, as the product of the pivots (15.1), in about operations. Cramer’s rule done that way does elimination n + 1 times to get what one elimination gives: for 30 unknowns about 560,000 operations, still nothing for a phone, but 31 times the work. So the honest answer is: by cofactors, 120 million years; done sensibly, about n times slower than elimination. For the test’s millions of unknowns that is millions of times slower. The TOP500 rules require elimination, the method everyone uses. And when the system is huge and sparse, iteration beats both.
Exercise
Choose the correct option
In Gauss elimination, the augmented matrix is first brought to:
Pick an answer to see why.
In the Gauss–Seidel method, the value of y in an iteration is worked out from:
Pick an answer to see why.
To remove x from using the pivot row , the operation is:
Pick an answer to see why.
Which of these changes the solutions of a system?
Pick an answer to see why.
Which arrangement of the equations x + 6y = 13 and 5x − y = 3 is diagonally dominant, for Gauss–Seidel?
Pick an answer to see why.
Computers use partial pivoting in Gauss elimination mainly:
Pick an answer to see why.
Gauss–Seidel is used for 4x + y = 9, x + 3y = 5. Why can you be sure it converges?
Pick an answer to see why.
One Gauss–Seidel iteration from (0, 0) on 4x + y = 9, x + 3y = 5 gives:
Pick an answer to see why.
Elimination has left x + y − z = 2, 2y + z = 7, 3z = 9. Then x =:
Pick an answer to see why.
For which k does x + y − z = 1, 2x + 3y + z = 4, x + 2y + kz = 3 have infinitely many solutions?
Pick an answer to see why.
Gauss–Seidel on x − 4y = −7, 5x + y = 7 in that order (the first giving x), from (0, 0), gives:
Pick an answer to see why.
Short questions
Solve by Gauss elimination: 2x + y − z = 1, x − y + 2z = 5, 3x + 2y + z = 10. (5 marks)
Hint
Answer
Solve 2x + 6y = 14, 5x − y = 3 by the Gauss–Seidel method, starting from (0, 0), correct to two decimal places. Arrange the equations first, and say why. (3 marks)
Hint
Answer
Solve by Gauss–Seidel, correct to two decimal places, starting from (0, 0, 0): 5x − y + z = 4, 2x + 4y = 14, x + y + 5z = 14. (5 marks)
Hint
Answer
Long question
NEB’s grid gives this area no long question; this one joins the unit’s two methods for practice.
A thin metal plate is held with its top edge at 80 °C and its other three edges at 20 °C. Three points P₁, P₂, P₃ lie in a row across its middle, equally spaced; each has one of the edges or another point as each of its four neighbors: P₁ has the top, the bottom, the left edge and P₂; P₂ has the top, the bottom, P₁ and P₃; P₃ has the top, the bottom, P₂ and the right edge. In the steady state each point’s temperature is the average of its four neighbors’ (15.2).
- a.Show that the temperatures satisfy 4T₁ − T₂ = 120, −T₁ + 4T₂ − T₃ = 100, −T₂ + 4T₃ = 120. (2 marks)
- b.Solve them by Gauss–Seidel from (0, 0, 0), correct to one decimal place. (4 marks)
- c.Solve them exactly by Gauss elimination, and compare. (2 marks)
Hint
Answer
Project work
Printable PDFs
- Study notes 2 pages
- Worksheet 3 pages Answer key
- Harder practice questions 1 page Answer key
Practice every question in the book, and keep track of the ones you miss →
Where these facts come from
- The TOP500 list ranks by the LINPACK (HPL) benchmark, which solves “a dense system of linear equations” by an algorithm that “must conform to LU factorization with partial pivoting” with an operation count of : TOP500, “The LINPACK Benchmark”; LineShine, National Supercomputing Centre in Shenzhen, first on the November 2026 list at 2,198.40 PFlop/s (El Capitan, first in November 2025 at 1,809 PFlop/s, is now second): TOP500, November 2026, both read November 2026 (the opening; Back to the fastest computer).
- Elimination in the Nine Chapters (eighteen problems, parts from about 150 BC), the name “Gaussian elimination” from the 1950s, about operations, partial pivoting: Wikipedia, “Gaussian elimination”; Gauss’s 1823 letter to Gerling, Seidel’s publication of 1874, the name Liebmann method, convergence for strictly diagonally dominant systems and that it “may converge even if these conditions are not satisfied”: Wikipedia, “Gauss–Seidel method”, both read November 2026 (15.1, 15.2). Gauss’s letter of 26 December 1823 (“half asleep”; Gerling would hardly ever again eliminate directly), and that Seidel’s process is not quite Gauss’s: G. E. Forsythe, “Gauss to Gerling on relaxation”, Mathematical Tables and Other Aids to Computation 5 (1951), 255–258, AMS, read November 2026 through a search engine’s copy of the PDF, since the AMS site refused the download (the story).
- The circuit: Grade 12 Physics, Example 14.1. The plate’s temperatures (Question 4) are made up; the averaging rule is the finite-difference form of the steady heat equation.
- The unit’s items: CDC, Secondary Education Curriculum 2078, Mathematics, Grades 11–12, Grade 12, 7.1; the marks and the model question: CDC, Specification Grid 2078, Mathematics (Mat. 402), Grade 12, and its model paper, questions 11 and 19.
Found a mistake? Please tell us.
