# 雅可比方法

雅可比方法（Jacobi method）是数值线性代数中一种求解线性方程组 \( A\mathbf{x} = \mathbf{b} \) 的迭代算法。在每一轮迭代中，逐个方程解出其对角线上的未知量，而其余未知量保持上一轮迭代的值不变，如此反复迭代直至收敛。该方法以卡尔·古斯塔夫·雅各布·雅可比（Carl Gustav Jacob Jacobi，1804–1851）命名，他于1845年在《天文学通报》（*Astronomische Nachrichten*）上描述了这一过程，用以求解最小二乘法中出现的线性方程组。<sup>[1](https://onlinelibrary.wiley.com/doi/10.1002/asna.18450222002)</sup><sup> • </sup><sup>[2](https://drum.lib.umd.edu/items/0b7510e0-459d-4c79-a71b-f47de27491f0)</sup>

| 关键事实 | 详情 |
|---|---|
| 更新规则 | \( x_i^{(k+1)} = \frac{1}{a_{ii}}\bigl(b_i - \sum_{j \neq i} a_{ij}\,x_j^{(k)}\bigr) \)，每个分量仅由旧值计算<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> |
| 迭代矩阵 | \( B_J = -D^{-1}(L+U) \)，其中 \( A = D + L + U \) 被拆分为对角部分、严格下三角部分和严格上三角部分<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> |
| 收敛判据 | 对任意初始猜测均收敛，当且仅当谱半径满足 \( \rho(B_J) < 1 \)<sup>[4](https://a-warded.org/open-book/university-numerical-analysis/lesson-47)</sup> |
| 实用保证 | \( A \) 严格对角占优（每行满足 \( \lvert a_{ii}\rvert > \sum_{j\neq i} \lvert a_{ij}\rvert \)）即可保证收敛<sup>[5](https://www.math.iit.edu/~fass/577_ch4_end.pdf)</sup> |
| 前提条件 | 所有对角元 \( a_{ii} \) 必须非零；若某个对角元为零，则需重新排列方程<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> |
| 并行性 | 全部 \( n \) 个分量可以独立、以任意顺序更新，因此该方法天然并行<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> |
| 模型问题收敛速率 | 对于二维泊松问题，谱半径为 \( \cos(\pi h) \approx 1 - \pi^2 h^2/2 \)，因此对于 \( N \) 个未知量，将误差缩小固定倍数所需的总工作量按 \( O(N^2) \) 增长<sup>[6](https://www.cs.cornell.edu/courses/cs6210/2025fa/lec/2025-11-10.html)</sup> |

## 迭代过程

一切定常迭代法都源自一个分裂 \( A = M - N \)，其中 \( M \) 可逆且求逆代价低廉。将 \( A\mathbf{x} = \mathbf{b} \) 改写为 \( M\mathbf{x} = N\mathbf{x} + \mathbf{b} \)，即得到不动点迭代 \( \mathbf{x}^{(k+1)} = B\mathbf{x}^{(k)} + \mathbf{c} \)，其迭代矩阵为 \( B = M^{-1}N \)，\( \mathbf{c} = M^{-1}\mathbf{b} \)。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> 雅可比方法取最廉价的选择，即 \( M = D \)，也就是 \( A \) 的对角部分，这样每一步只需除以对角元即可。

从分量角度看，第 \( i \) 个方程解出 \( x_i \)，而其余所有未知量保持第 \( k \) 次迭代的旧值不变。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> 由于新迭代值只依赖于旧迭代值，整个向量可以同时重新计算；在模板代码中，这相当于把新值写入另一个数组，每轮扫描后交换两个数组。<sup>[7](https://developer.nvidia.com/blog/benchmarking-cuda-aware-mpi/)</sup> 该方法要求对所有 \( i \) 都有 \( a_{ii} \neq 0 \)；若某个对角元为零，则重新排列方程使对角元非零。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup>

西方文献中出现的别名包括高斯–雅可比迭代、点雅可比迭代、逐次代换法以及同时位移法。<sup>[8](https://encyclopediaofmath.org/wiki/Jacobi_method)</sup>

## 收敛性

设 \( \mathbf{e}^{(k)} = \mathbf{x}^{(k)} - \mathbf{x}^* \) 为误差。从更新规则中减去不动点方程，得 \( \mathbf{e}^{(k+1)} = B\,\mathbf{e}^{(k)} \)，故 \( k \) 步之后的误差为 \( B^k \mathbf{e}^{(0)} \)。迭代对任意初始猜测都收敛到解，当且仅当 \( \rho(B) < 1 \)，其中谱半径 \( \rho(B) \) 为 \( B \) 的特征值绝对值的最大值；\( \rho(B) \) 越小，误差收缩越快。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup><sup> • </sup><sup>[4](https://a-warded.org/open-book/university-numerical-analysis/lesson-47)</sup>

**对角占优。** 计算 \( B_J \) 的特征值本身代价高昂，违背了迭代求解器的初衷，因此实践中使用更简单的充分条件。若 \( A \) 按行严格对角占优，即对每个 \( i \) 都有 \( \lvert a_{ii}\rvert > \sum_{j \neq i} \lvert a_{ij}\rvert \)，则雅可比迭代对任意初始猜测都收敛；证明只需取迭代矩阵的无穷范数，其行和恰好就是占优比。<sup>[5](https://www.math.iit.edu/~fass/577_ch4_end.pdf)</sup><sup> • </sup><sup>[4](https://a-warded.org/open-book/university-numerical-analysis/lesson-47)</sup> 直观地说，当每个对角元在其所在行中占主导时，每个变量更多地依赖于自身而非其他变量，因此用旧值替代其他未知量所引入的误差很小。<sup>[4](https://a-warded.org/open-book/university-numerical-analysis/lesson-47)</sup> 收敛性结果不限于严格占优：对于严格及不可约弱对角占优条件下的点雅可比迭代，已建立了充分必要条件，并给出了谱半径的界，由此可得到保证收敛的松弛参数范围。<sup>[9](https://epubs.siam.org/doi/pdf/10.1137/0710042)</sup>

## 与高斯–赛德尔方法的关系

高斯–赛德尔方法（Gauss–Seidel method）思路相同，但在同一轮扫描中立即用新计算出的值替换旧值；其分裂为 \( M = D + L \)，迭代矩阵为 \( B_{GS} = -(D+L)^{-1}U \)。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> 对于相容次序矩阵，两者的谱半径满足精确关系 \( \rho(B_{GS}) = [\rho(B_J)]^2 \)，因此高斯–赛德尔所需迭代次数约为雅可比的一半；一个对角元为4、非对角元为−1的三对角算例在容差 \( 10^{-12} \) 下，雅可比迭代42次，高斯–赛德尔迭代26次。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> 没有哪种方法保证一定胜出：可以找到高斯–赛德尔不收敛而雅可比方法收敛的矩阵，反之亦然，两者的相对速度也同样因问题而异。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup> 这种取舍是结构性的：雅可比方法因更新相互独立而天然并行，高斯–赛德尔则因每个分量都使用刚更新的值而本质上是串行的。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup>

## 模型泊松问题上的代价

标准测试用例是网格上的离散泊松方程，雅可比更新将每个内部点的值替换为其四个邻居的平均值加上源项。<sup>[10](https://people.eecs.berkeley.edu/~demmel/cs267-1995/lecture24/lecture24.html)</sup> 对于间距为 \( h \) 的 \( n \times n \) 网格，雅可比迭代矩阵的特征值为 \( \lambda_{i,j}(R) = -(\cos(\pi i h) + \cos(\pi j h))/2 \)，谱半径为 \( \rho(R) = \cos(\pi h) = 1 - \pi^2 h^2/2 + O(h^4) \)。<sup>[6](https://www.cs.cornell.edu/courses/cs6210/2025fa/lec/2025-11-10.html)</sup> 因此，将误差缩小至原来的 \( 1/e \) 所需的迭代次数按 \( \frac{2}{\pi^2}(n+1)^2 \) 增长，与未知量数目 \( N \) 成正比；由于每步代价为 \( O(N) \)，将误差缩小固定倍数所需的总时间按 \( O(N^2) \) 增长。<sup>[6](https://www.cs.cornell.edu/courses/cs6210/2025fa/lec/2025-11-10.html)</sup> 因此，随着问题规模增大，收敛会变慢，因为谱半径趋近于1；多重网格方法（multigrid methods）以常数次迭代将误差缩小固定倍数，避免了这种退化。<sup>[10](https://people.eecs.berkeley.edu/~demmel/cs267-1995/lecture24/lecture24.html)</sup>

## 现代应用

**作为预条件子和平滑子。** 在PETSc库中，雅可比方法以对角缩放预条件（PCJACOBI）的形式出现，其变体包括按对角元、按行 \( \ell_1 \) 范数、按行最大值或行和进行缩放，并将零对角元替换为1.0。<sup>[11](https://petsc.org/main/manualpages/PC/PCJACOBI.html)</sup> 此外还提供固定或可变块大小的块雅可比预条件子。<sup>[11](https://petsc.org/main/manualpages/PC/PCJACOBI.html)</sup> 作为独立求解器，雅可比方法速度较慢，但可以利用切比雪夫加速或共轭梯度加速过程大幅提速。<sup>[12](https://www.sciencedirect.com/science/article/pii/S0304020808712064)</sup> 在多重网格方法中，朴素雅可比方法的平滑性质较差，不适合以未加权形式作为松弛格式使用；加权（阻尼）雅可比迭代则被用作平滑子，衰减高频误差分量，而将光滑分量留给粗网格校正。<sup>[13](https://radar.brookes.ac.uk/radar/file/47a2ebd8-4aa9-415f-b8b9-c922764edd09/1/coco2014second.pdf)</sup><sup> • </sup><sup>[14](https://www.numerical-linear-algebra.com/essays/the-error-smoothing-cannot-reach/)</sup>

**在并行硬件上。** 由于每次更新只涉及一个小邻域，且唯一涉及的矩阵求逆是对角矩阵求逆，雅可比方法天然适合映射到GPU和分布式集群上。NVIDIA的CUDA感知MPI研究中，一个采用二维区域分解和晕圈交换的CUDA+MPI雅可比泊松方程求解器被用作实际基准测试，在一个四节点Tesla K20集群上从4个进程扩展到8个进程时几乎达到最优扩展性。<sup>[7](https://developer.nvidia.com/blog/benchmarking-cuda-aware-mpi/)</sup>

## 历史

雅可比的论文《论最小二乘法中出现的线性方程组的一种新解法》发表于《天文学通报》第22卷第20期，第297–306页，首次出版于1845年。<sup>[1](https://onlinelibrary.wiley.com/doi/10.1002/asna.18450222002)</sup> 据G. W. 斯图尔特的译文，雅可比在文中展示了如何利用旋转变换增强对称线性系统的对角占优性，然后用今天所谓的点雅可比方法求解；他指出同样的旋转变换也可用于求特征值，但将更完整的论述留给了1846年发表在《纯粹与应用数学杂志》（*Journal für die reine und angewandte Mathematik*）上的论文，该文现被普遍视为雅可比特征值方法的源头。<sup>[2](https://drum.lib.umd.edu/items/0b7510e0-459d-4c79-a71b-f47de27491f0)</sup> 此后，大型稀疏系统的迭代方法发展成一个庞大的家族，其中雅可比和高斯–赛德尔是经典的定常构件，为更先进的预条件Krylov方法奠定了基础。<sup>[3](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)</sup><sup> • </sup><sup>[15](https://www.sciencedirect.com/science/article/pii/0010465589901458)</sup>

## References

1. [C. G. J. Jacobi (1845). Ueber eine neue Auflösungsart der bei der Methode der kleinsten Quadrate vorkommenden lineären Gleichungen. Astronomische Nachrichten 22(20), 297–306.](https://onlinelibrary.wiley.com/doi/10.1002/asna.18450222002)
2. [C. G. J. Jacobi, translated by G. W. Stewart. On a New Way of Solving the Linear Equations that Arise in the Method of Least Squakes. University of Maryland DRUM.](https://drum.lib.umd.edu/items/0b7510e0-459d-4c79-a71b-f47de27491f0)
3. [Jacobi and Gauss–Seidel Iteration, Computational Physics lecture notes, Universität Bielefeld.](https://roesner.pages.ub.uni-bielefeld.de/lectures/computational-physics/semester/sose2026/lecture/04_linear_systems/02_jacobi_gauss_seidel.html)
4. [The Jacobi Method, Numerical Analysis, A-Warded.](https://a-warded.org/open-book/university-numerical-analysis/lesson-47)
5. [Numerical Analysis, chapter 4 (Illinois Institute of Technology course notes).](https://www.math.iit.edu/~fass/577_ch4_end.pdf)
6. [CS 6210: Matrix Computations, Cornell University, lecture of 2025-11-10.](https://www.cs.cornell.edu/courses/cs6210/2025fa/lec/2025-11-10.html)
7. [Jiri Kraus (2013). Benchmarking CUDA-Aware MPI. NVIDIA Technical Blog.](https://developer.nvidia.com/blog/benchmarking-cuda-aware-mpi/)
8. [Jacobi method, Encyclopedia of Mathematics.](https://encyclopediaofmath.org/wiki/Jacobi_method)
9. [K. R. James. Convergence of Matrix Iterations Subject to Diagonal Dominance. SIAM Journal on Numerical Analysis.](https://epubs.siam.org/doi/pdf/10.1137/0710042)
10. [J. Demmel (1995). CS267 Lecture 24: Jacobi's Method. UC Berkeley.](https://people.eecs.berkeley.edu/~demmel/cs267-1995/lecture24/lecture24.html)
11. [PCJACOBI, PETSc documentation.](https://petsc.org/main/manualpages/PC/PCJACOBI.html)
12. [Iterative Methods for Solving Large Sparse Systems of Linear Algebraic Equations, ScienceDirect.](https://www.sciencedirect.com/science/article/pii/S0304020808712064)
13. [Jacobi scheme is known to have poor smoothing, COCO 2014, Oxford Brookes repository.](https://radar.brookes.ac.uk/radar/file/47a2ebd8-4aa9-415f-b8b9-c922764edd09/1/coco2014second.pdf)
14. [The error smoothing cannot reach, Numerical Linear Algebra essays.](https://www.numerical-linear-algebra.com/essays/the-error-smoothing-cannot-reach/)
15. [A historical overview of iterative methods, Computer Physics Communications 53 (1989) 1–17.](https://www.sciencedirect.com/science/article/pii/0010465589901458)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Linear and multilinear algebra › Numerical linear algebra › Iterative methods for linear systems

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/jacobi-method

English original: https://www.edgepedia.org/jacobi-method
