第 25 章
对称矩阵与正定性:谱定理和三个等价判据
对称矩阵的特征值必为实数、特征向量可正交,因此 A = QΛQᵀ;正定矩阵进一步要求特征值、主元、全部顺序主子式都为正。
Symmetric Matrices and Positive Definiteness: The Spectral Theorem and Three Tests
A symmetric matrix has real eigenvalues and can be orthogonally diagonalized, so A = QΛQᵀ; positive definiteness further requires positive eigenvalues, pivots, and every leading minor.
篇内目录
- Why symmetric matrices matter most
- The spectral theorem
- Expansion into projections
- Timeline
- Why the eigenvalues are real
- The complex generalization
- Pivots and eigenvalues have the same signs
- Positive definite matrices
- Definition
- Three equivalent tests
- A counterexample
- A positive example
- Where three threads meet
- Core review
- Common misconceptions
- Check your understanding
- How this connects
为什么对称矩阵最重要
对称矩阵满足
它有两个核心性质:
- 特征值全是实数;
- 特征向量可以选成两两正交。
严格地说,第二条应表述为「可以选成」。若特征值互不相同,每个特征空间是一维,这些直线自动正交;若特征值重复,对应的特征空间是一个平面或更高维子空间,在这个子空间内可以挑出一组正交基。单位矩阵是极端例子:每个向量都是特征向量,但依然可以选出标准正交基。
谱定理
把正交特征向量单位化,得到标准正交组 ,放进矩阵
则 ,即 。于是对角化写成
这就是谱定理(在力学中称主轴定理)。它说明:任何对称矩阵都可以通过一次正交换基变成对角形,且换基矩阵的逆就是它的转置。
按投影矩阵展开
把 按列乘行展开:
每一项 都是投影到 方向的投影矩阵(因为 是单位向量)。所以:
一句话总结: 对称矩阵是若干个互相垂直的投影矩阵按特征值加权的和。
时间轴
| 时间 | 内容 |
|---|---|
| 0:00 | 对称矩阵的主题:特征值为实数,特征向量两两正交 |
| 1:21 | 反例:旋转矩阵的特征值可以是复数 |
| 2:36 | 单位矩阵是极端情形,每个向量都是特征向量 |
| 5:45 | 特征向量矩阵可正交化, |
| 7:42 | 谱分解 |
| 9:00 | 证明对称矩阵的特征值必为实数 |
| 17:11 | 复特征向量的长度与内积 |
| 23:15 | 结论:对称矩阵总可以被正交矩阵对角化 |
| 25:23 | 谱定理的秩一形式 |
| 29:07 | 正定性的第一个判据:所有主元为正 |
| 35:31 | 正定矩阵的定义与例子 |
| 37:21 | 二阶情形:左上元为正且行列式为正 |
| 38:02 | 主元之积等于行列式 |
| 40:40 | 顺序主子式全为正(Sylvester 判据) |
| 42:50 | 半正定:特征值可以等于零 |
为什么特征值是实数
设 ,暂时允许 与 是复数。两边取共轭:
(这里 是实矩阵,所以 。)再转置:
利用对称性 :
两边右乘 :
另一方面,把原方程两边左乘 :
两式左边相同,所以右边相等:
关键一步:对于非零的复向量,
因此只能有 ,即 是实数。
复矩阵的正确推广
若 是复矩阵,转置时还必须取共轭。定义 Hermitian 转置
「好矩阵」的条件变成 (Hermitian 矩阵),此时同样有实特征值与正交特征向量。实对称矩阵只是它在实数域的特例。
主元与特征值的符号一致
这是对称矩阵独有的性质:正主元的个数等于正特征值的个数。
它不意味着主元等于特征值。例如二阶矩阵的主元是 与 ,而特征值是二次方程的根,通常是无理数。
这条性质的实际价值在于:求 50 阶矩阵的 50 个特征值在数值上既慢又不稳定,而消元求主元又快又稳。知道符号分布后,还可以把矩阵平移 ,再数一次主元,从而知道有多少特征值大于 7、多少小于 7。
主元乘积等于特征值乘积,因为两者都等于行列式。
正定矩阵
定义
正定矩阵是对称矩阵,且所有特征值都为正:
三个等价判据
| 判据 | 内容 |
|---|---|
| 特征值 | 全部 |
| 主元 | 全部主元 |
| 顺序主子式 | 从左上角开始的每个 行列式都 |
第三条中的「全部」不能省。只检查最大的行列式是不够的。
反例
行列式为 ,但特征值是 ,主元也是负的。它不满足正定性。问题出在一阶顺序主子式 。
正例
主元:
- 第一个主元是 ;
- 第二个主元由「主元乘积等于行列式」得到:,所以第二个主元是 。
两个主元都为正,因此特征值都为正。验证:
特征值为
两个都是正数。
补充: 正定矩阵在微分方程与优化中对应「能量函数向上弯曲」的情形:二次型 对所有非零 为正,因此平衡点是稳定的极小点。
三条主线的汇合
这一讲把课程前中后三段连起来:
- 第一周:消元与主元;
- 中段:行列式与顺序主子式;
- 当前:特征值与符号。
对对称矩阵,这三组信息是等价的:主元全正 所有顺序主子式为正 所有特征值为正。
核心回顾
- 对称矩阵:实特征值,可正交对角化,。
- 谱定理的另一形式:,即投影矩阵的加权和。
- 实对称矩阵特征值为实的证明,核心是 。
- 复矩阵的对应概念是 Hermitian 矩阵与酉矩阵。
- 对称矩阵中,正主元个数等于正特征值个数。
- 正定 特征值全正 主元全正 全部顺序主子式为正。
常见误区
- 以为特征向量「天然」正交。正确说法是「可以选成」正交,重复特征值时要主动选。
- 把 写成 。顺序与 一致。
- 用行列式为正判断正定。必须检查全部顺序主子式。
- 认为主元等于特征值。只有符号个数相同。
- 在复数情形仍用转置而不是 Hermitian 转置。
理解检验
1. 为什么对称矩阵的复特征值不可能出现?
参考答案:设 ,,先允许 与 取复数。由 且 实,得 ,转置后利用 得到 。右乘 得 ;另一方面原方程左乘 得 。两式相减:。而非零复向量满足 ,所以必须 ,即 为实数。关键在于 恒正,这与实向量情形下 是同一个事实。
2. 写出 的主元,并判断是否正定。
参考答案:第一个主元是 。,由「主元乘积等于行列式」得第二个主元 。两个主元 都为正,因此 正定。也可以直接验证顺序主子式:一阶为 ,二阶为 。特征值可由 求得为 与 ,都为正,与判据一致。
3. 谱定理的投影矩阵形式中,每一项的系数是什么?
参考答案:系数是相应的特征值。,其中 是投影到单位特征向量 方向的投影矩阵(秩 1、对称、幂等),它的系数正是与之配对的 。所以对称矩阵等于「一组互相正交的投影矩阵按特征值加权求和」。
4. 一个 对称矩阵的主元是 ,它有几个正特征值?
参考答案:两个。对称矩阵中正主元的个数等于正特征值的个数,这里正主元是 和 ,所以恰有两个正特征值、一个负特征值。注意只能确定符号的个数,不能断言特征值等于 ;只有乘积关系 成立。
5. 举一个行列式为正但不是正定的矩阵。
参考答案:。,但特征值为 和 ,都小于零,所以不正定。问题出在一阶顺序主子式 ——正定要求全部顺序主子式为正,只检查最大的行列式会误判。另例: 的行列式为 ,特征值为 ,同样不正定。
与前后课程的关系
上一讲用 Markov 矩阵展示了「特殊矩阵给出特殊特征值」。这一讲把对称矩阵的结论系统化,并引出正定性。下一讲处理复数:Hermitian 矩阵、酉矩阵与傅里叶矩阵,其中傅里叶矩阵的快速分解(FFT)会把「矩阵分解」推向计算效率。
Why symmetric matrices matter most
A symmetric matrix satisfies
Two facts follow:
- All eigenvalues are real.
- Eigenvectors can be chosen mutually orthogonal.
Strictly, the second should read "can be chosen". With distinct eigenvalues each eigenspace is a line, and those lines are automatically perpendicular. With a repeated eigenvalue the eigenspace is a plane or larger, and an orthogonal basis can be selected inside it. The identity is the extreme case: every vector is an eigenvector, yet an orthonormal basis still exists.
The spectral theorem
Normalize the orthogonal eigenvectors to unit length and put them in
Then , so , and diagonalization becomes
This is the spectral theorem (the principal axis theorem in mechanics). Any symmetric matrix becomes diagonal under a change of basis by an orthogonal matrix, whose inverse is its transpose.
Expansion into projections
Multiply out by columns times rows:
Each is the projection onto the line through , since is a unit vector. Therefore:
One-sentence summary: A symmetric matrix is a weighted sum of mutually perpendicular projection matrices, with the eigenvalues as weights.
Timeline
| Time | Topic |
|---|---|
| 0:00 | The theme: symmetric matrices have real eigenvalues and orthogonal eigenvectors |
| 1:21 | A counterexample: rotation matrices can have complex eigenvalues |
| 2:36 | The identity is the extreme case where every vector is an eigenvector |
| 5:45 | Eigenvectors can be chosen orthonormal, so |
| 7:42 | Spectral decomposition |
| 9:00 | Proving that eigenvalues of a symmetric matrix are real |
| 17:11 | Length and inner product for complex eigenvectors |
| 23:15 | Conclusion: every symmetric matrix is orthogonally diagonalizable |
| 25:23 | The rank-one form of the spectral theorem |
| 29:07 | First test for positive definiteness: all pivots positive |
| 35:31 | Definition of a positive definite matrix, with examples |
| 37:21 | The 2 by 2 case: leading entry and determinant both positive |
| 38:02 | The product of the pivots equals the determinant |
| 40:40 | All leading principal minors positive |
| 42:50 | Positive semidefinite: eigenvalues allowed to be zero |
Why the eigenvalues are real
Let , temporarily allowing and to be complex. Conjugate both sides:
(Here is real, so .) Transpose:
Using symmetry :
Multiply on the right by :
On the other hand, multiply the original equation on the left by :
The left sides agree, so the right sides do too:
The key step: for a nonzero complex vector,
Hence , which means is real.
The complex generalization
For a complex matrix, transposition must be paired with conjugation. Define the Hermitian transpose
The "good matrix" condition becomes (a Hermitian matrix), which again gives real eigenvalues and orthogonal eigenvectors. Real symmetric matrices are the special case over the reals.
Pivots and eigenvalues have the same signs
This is special to symmetric matrices: the number of positive pivots equals the number of positive eigenvalues.
It does not say pivots equal eigenvalues. For a matrix the pivots are and , while the eigenvalues are roots of a quadratic and usually irrational.
The practical value: finding fifty eigenvalues of a matrix numerically is slow and unstable, while elimination for pivots is fast and stable. Knowing the sign counts, you can also shift by , count pivots again, and learn how many eigenvalues lie above and below 7.
The pivot product equals the eigenvalue product because both equal the determinant.
Positive definite matrices
Definition
A positive definite matrix is symmetric with all eigenvalues positive:
Three equivalent tests
| Test | Statement |
|---|---|
| Eigenvalues | Every |
| Pivots | Every pivot is |
| Leading minors | Every determinant from the top-left corner is |
The word "every" in the third test cannot be dropped. Checking only the full determinant is not enough.
A counterexample
Its determinant is , but its eigenvalues are and its pivots are negative. It is not positive definite. The failure is visible in the first leading minor, .
A positive example
The pivots:
- the first pivot is ;
- the second follows from "pivot product equals determinant": , so the second pivot is .
Both pivots are positive, so both eigenvalues are positive. Check:
so
and both are positive.
Background: In differential equations and optimization, positive definiteness corresponds to an energy function that curves upward: the quadratic form is positive for every nonzero , so the equilibrium is a stable minimum.
Where three threads meet
This lecture ties together the course's three stages:
- Week one: elimination and pivots;
- Middle: determinants and leading minors;
- Now: eigenvalues and signs.
For symmetric matrices these three descriptions are equivalent: all pivots positive all leading minors positive all eigenvalues positive.
Core review
- Symmetric matrices have real eigenvalues and orthogonal eigenvectors, giving .
- The spectral theorem also reads , a weighted sum of projections.
- The proof of real eigenvalues rests on .
- The complex analogues are Hermitian matrices and unitary matrices.
- For symmetric matrices, positive pivot count equals positive eigenvalue count.
- Positive definite positive eigenvalues positive pivots all leading minors positive.
Common misconceptions
- Thinking eigenvectors are automatically orthogonal. They can be chosen orthogonal; repeats require a choice.
- Writing . The order matches .
- Using a positive determinant to conclude positive definiteness. Every leading minor must be checked.
- Equating pivots with eigenvalues. Only the sign counts match.
- Using the plain transpose instead of the Hermitian transpose in the complex case.
Check your understanding
1. Why can a symmetric matrix not have a genuinely complex eigenvalue?
Reference answer: Let with , allowing complex and . Since and is real, ; transposing and using gives . Right-multiplying by yields . Left-multiplying the original equation by yields . Subtracting, . But for a nonzero complex vector , so and is real. The decisive point is that is strictly positive, the complex analogue of .
2. Find the pivots of and decide whether it is positive definite.
Reference answer: The first pivot is . Since and the product of pivots equals the determinant, the second pivot is . Both pivots are positive, so is positive definite. The leading principal minors confirm it: and . The eigenvalues solve , giving and , both positive.
3. In the projection form of the spectral theorem, what is the coefficient of each projection?
Reference answer: The corresponding eigenvalue. , where is the rank-one orthogonal projection onto the unit eigenvector ; its coefficient is exactly the eigenvalue paired with it. A symmetric matrix is therefore a weighted sum of mutually orthogonal projections.
4. A symmetric matrix has pivots . How many positive eigenvalues does it have?
Reference answer: Two. For a symmetric matrix the number of positive pivots equals the number of positive eigenvalues; here the positive pivots are and , so there are two positive eigenvalues and one negative one. Only the sign count is determined — the eigenvalues are not equal to — although the product relation does hold.
5. Give a matrix with positive determinant that is not positive definite.
Reference answer: has , but its eigenvalues are and , both negative, so it is not positive definite. The failure shows in the leading minor : positive definiteness requires all leading principal minors to be positive, so checking only the full determinant is not enough. Another example is , with determinant and eigenvalues .
How this connects
The previous lecture used Markov matrices to show that special matrices have special eigenvalues. This one systematizes the symmetric case and introduces positive definiteness. The next lecture handles complex numbers: Hermitian matrices, unitary matrices, and the Fourier matrix, whose fast factorization (the FFT) turns matrix decomposition into computational speed.