Skip to content
CoreSource checked

Jacobi Method

Solves linear systems by repeatedly updating each variable from the previous iteration.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Intermediate
Family
Iterative Linear Solver
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Not ready
Visualization
Ready

Overview

The Jacobi Method computes a new value for every variable using only values from the prior iteration.

Core Concepts

numeric approximationmatrix operationresidual updateiterative linear solverconvergence checkerror control

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n^2)

Average

O(t n^2)

Worst

O(t n^2)

Space

O(n)

When to Use

  • Use Jacobi Method when you need to update all variables in parallel from old values.
  • Use it for sparse linear systems with inputs like linear system.
  • Use it when an approximate numeric result is acceptable and the input assumptions are satisfied.
  • Use it when the Iterative Linear Solver tradeoff is acceptable for the problem size.

When Not to Use

  • Avoid it when rounding error, ill-conditioning, or convergence failure would hide the real answer.
  • Avoid it when O(t n^2) worst-case behavior is too costly for the expected input size.
  • Avoid it when the required output is not approximate solution vector.

What It Does

  • Updates all variables in parallel from old values
  • Improves an approximate linear-system solution

Use Cases

  • Sparse linear systems
  • Parallel iterative solvers
  • Numerical PDEs

Inputs

  • Linear system
  • Initial guess
  • Stopping tolerance

Outputs

  • Approximate solution vector

Key Formulas (1)

Jacobi update

xi next = (bi − ∑(Aij · xj old for j ≠ i)) / Aii
x_i_next = (b_i - sum(A_ij * x_j_old for j != i)) / A_ii

Updates each variable from values from the previous iteration.

Pseudocode

  1. 1.Choose an initial solution vector
  2. 2.For each variable, compute a new value from old values
  3. 3.Store all new values separately
  4. 4.Replace the old vector after a full pass
  5. 5.Repeat until residual is small

Canonical Example

Input
equation = x^2 - 9 = 0 or matrix system Ax = b
Output
approximate numeric solution
Explanation
Jacobi Method: The method iteratively or algebraically approximates the requested mathematical result.

Implementation Notes

  • Keep the input contract explicit: Linear system; Initial guess; Stopping tolerance.
  • Use this step as the implementation spine: Choose an initial solution vector.
  • Then preserve the next state change: For each variable, compute a new value from old values.
  • Prefer trusted numeric libraries for matrix operations once the concept is validated.
  • Use small examples with known answers to verify the numeric update before scaling up.

Common Pitfalls

  • Jacobi is easy to parallelize but may converge slowly.
  • Ignoring singular or ill-conditioned inputs can produce unstable numeric results.
  • Stopping based only on iteration count instead of checking residual, tolerance, or error.
  • Returning approximate solution vector without handling empty, invalid, or boundary inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show all variables updating from the previous iteration at once.

Jacobi Method mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Choose an initial solution vector
parallel-linear-updates

Notes

Jacobi Method operates in O(t n^2) time and O(n) space within the Iterative Linear Solver family. Key governing relation: x_i_next = (b_i - sum(A_ij * x_j_old for j != i)) / A_ii. Often compared with Gauss-Seidel Method and Conjugate Gradient.

Sources (1)

What each reference supports for this entry.

Templates for the Solution of Linear Systems

Book

Netlib/SIAM reference for iterative linear solvers including Jacobi, Gauss-Seidel, and conjugate gradient.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toConjugate Gradient

Conjugate Gradient is usually faster for suitable positive definite systems.

Alternative toGauss-Seidel Method

Both are stationary iterative solvers with different update reuse.

Tags

Numerical MethodsLinear AlgebraIterative Solver