A2: Iterative methods for linear systems

Level: undergraduate (also an MSc refresher) · Language: Python · Status: pilot prerelease

Students should know: matrices, vectors and eigenvalues, and basic Python with NumPy arrays.

Students write one sweep of three classical methods for \(Ax = b\): Jacobi’s method, the Gauss–Seidel method and successive over-relaxation (SOR). Then they show with evidence that their code works: on a specified Poisson test problem, an observed average convergence factor is compared with the spectral radius of the method’s iteration matrix. They also study how the number of sweeps grows with the size of the system, how to choose the relaxation factor, when the methods fail, and why a small residual does not guarantee a small error. This turns the familiar “comparative study of Jacobi and Gauss–Seidel” into a proper verification study.

Download

Download unit A2 (version 0.1.0a2, 54 KB)

Version

0.1.0a2

File

verifiedmethods-linear-systems-0.1.0a2.zip

SHA-256 of the zip

1cd5938d47ff45859178965d8b1b03bd23c63d4eb362b104724031f83f26286e

Check-suite fingerprint

2d6eeeb51b2c2275c528c717d5a7561790c1608d875a888537c78829e8de1f5e

Release notes and original assets · Download manifest

Use this unit alongside or shortly after teaching the methods, or as a project refresher. A full brief is optional for a shorter course practical; agree the scope with your lecturer. See getting started.

The check-suite fingerprint identifies the checker. A supervisor confirms the results by rerunning the student’s code; the fingerprint alone does not authenticate a report. Keep the original ZIP and SHA-256 with the submission. Use the matching tag when reviewing work from a published release. The first tagged pilot remains available for work submitted with that version. See the verification report.

To confirm that the download is complete and unchanged, compare its SHA-256 with the value above: on Windows run certutil -hashfile <file> SHA256, on macOS shasum -a 256 <file>, on Linux sha256sum <file>.

Quick start

Unzip the file, open a terminal in the unzipped folder, and set up once (or reuse the environment from unit A1).

Windows (Command Prompt):

py -m venv .venv
.venv\Scripts\activate
python -m pip install -r requirements.txt

macOS and Linux:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

Then run python verify.py and open report/verification-report.html in a browser. The starter methods are deliberately unfinished: not implemented yet is the expected first result. Before a full submission, run python verify.py --strict. Tutorial section 0 explains each step, with help for common problems.

What students learn

After this unit a student can:

  • derive Jacobi’s method from the equations, and implement Jacobi, Gauss–Seidel and SOR sweeps that work for any size of system;

  • explain the iteration matrix, the convergence condition, and when its spectral radius describes the eventual error decay; measure an average convergence factor and recognize transient effects;

  • predict how the number of sweeps grows with the size of the system, and choose the relaxation factor for SOR;

  • recognise when the methods fail, and why the classical sufficient conditions are not the whole story;

  • explain the difference between the residual and the error, and choose a stopping tolerance.

What is in the unit

Tutorial

Nine short sections, from setting up Python to choosing a project brief

Project briefs

Comparing the methods properly; steady temperature in a heated plate; when the methods converge

For supervisors

Confirming a report, viva questions, a marking rubric, an AI-use statement

verify.py

Four gates and five reported results, written to an HTML report

Licence and citation

Code: BSD 3-Clause. Tutorial, briefs and supervisor material: CC BY 4.0. A DOI is planned for a stable release; for this pilot, cite as: Tiamiyu, A. T. (2026), verifiedmethods unit A2: iterative methods for linear systems, version 0.1.0a2, https://verifiedmethods.github.io.