第 27 章

正定矩阵与极小值:四个判据与一个碗

正定矩阵把主元、行列式、特征值与二次型串在一起;它的几何意义是碗形曲面,分析意义是多元函数的严格极小点。

Positive Definite Matrices and Minima: Four Tests, One Bowl

Positive definiteness ties pivots, determinants, eigenvalues, and quadratic forms together; geometrically it is a bowl, and analytically it is the second-order condition for a strict minimum.

首发于 2009.05.07中 / EN
系统课程linear-algebrapositive-definiteoptimization
语言
字号
目录
篇内目录

这一讲为什么重要

正定矩阵不是一个新的计算技巧,而是整门课的汇合点。判断一个对称矩阵是否正定,可以用四套完全不同的语言:

  1. 特征值:全部大于零;
  2. 行列式:所有左上角顺序主子式都大于零;
  3. 主元:消元后所有主元大于零;
  4. 二次型:对任意非零向量 xx,都有 xTAx>0x^{\mathsf T}Ax>0。

这一讲的核心任务,是说明这四个判据为什么等价,以及它们共同描述的那个几何对象——一个开口向上的碗。

一句话总结: 正定矩阵是「二次型恒正」的矩阵,而主元、行列式、特征值都是同一件事的不同投影。

时间轴

时间内容
0:05正定矩阵与二次型:这一讲的主线
1:45二阶矩阵:从行列式与主元开始
5:28行列式为正但仍有例外情形需要检查
6:37半正定:出现零特征值
8:32二次型 xTAxx^{\mathsf T}Ax 的值
10:19配方:把二次型写成平方和
12:15不知道特征值也能判断正定性
16:49图像:碗形、鞍形与谷形
19:24二阶判据:a>0a>0 且 ac−b2>0ac-b^2>0
22:25等高线与主轴方向
24:16极值的必要条件:一阶导数为零
26:20二阶导矩阵(Hessian)
32:30主轴与特征值:同一组方向
35:24Hessian 与泰勒展开的二次项
39:22三阶例子:行列式与主元的计算
44:42碗形、鞍形与橄榄球形的判别
48:20三个不同特征值时的几何形状

从一个二阶例子开始

考虑对称矩阵

A=[266c].A=\begin{bmatrix}2 & 6\\ 6 & c\end{bmatrix}.

左上角一阶主子式是 2>02>0,所以只需要看二阶行列式:

det⁡A=2c−36.\det A = 2c-36.

三种临界状态

cc 的取值行列式特征值判定
c=18c=18000, 200,\,20半正定
c=7c=7−22-22一正一负不定
c=20c=2044两个正数正定

当 c=18c=18 时,第二行是第一行的 33 倍,矩阵秩为 11,只有一个主元 22。特征值由迹与行列式确定:λ1+λ2=20\lambda_1+\lambda_2=20,λ1λ2=0\lambda_1\lambda_2=0,所以是 00 与 2020。

当 c=7c=7 时,取 x=(1,−1)x=(1,-1):

xTAx=2−12+7=−3<0.x^{\mathsf T}Ax = 2-12+7=-3<0.

二次型在某个方向上取负值,矩阵不可能正定。图形上,这是鞍点:沿某些方向上升,沿另一些方向下降。

当 c=20c=20 时,行列式为 44,迹为 2222。两个特征值乘积为正、和为正,因此只能同为正。

二次型:正定性的定义

把 x=(x1,x2)x=(x_1,x_2) 代进去:

xTAx=[x1x2][abbc][x1x2]=ax12+2bx1x2+cx22.x^{\mathsf T}Ax = \begin{bmatrix}x_1 & x_2\end{bmatrix} \begin{bmatrix}a & b\\ b & c\end{bmatrix} \begin{bmatrix}x_1\\ x_2\end{bmatrix} = ax_1^2+2bx_1x_2+cx_2^2.

这是一个纯二次函数:没有常数项,没有一次项,也没有更高次项。矩阵的对角元给出平方项,非对角元成对出现,贡献交叉项。

定义:若对一切 x≠0x\neq 0 都有 xTAx>0x^{\mathsf T}Ax>0,则称 AA 正定。

配方法:把二次型写成平方和

对 c=20c=20 的例子:

2x2+12xy+20y2=2(x+3y)2+2y2.2x^2+12xy+20y^2 = 2(x+3y)^2+2y^2.

右边是两个平方的非负组合,所以恒大于等于零;只有 x+3y=0x+3y=0 且 y=0y=0,也就是 x=y=0x=y=0 时才取零。这正是正定。

如果 c=18c=18:

2x2+12xy+18y2=2(x+3y)2.2x^2+12xy+18y^2 = 2(x+3y)^2.

只剩下一个平方,沿直线 x=−3yx=-3y 全为零,所以只是半正定。

如果 c=7c=7:

2x2+12xy+7y2=2(x+3y)2−11y2.2x^2+12xy+7y^2 = 2(x+3y)^2-11y^2.

出现负系数,沿 y≠0y\neq 0、x=−3yx=-3y 的方向为负。

配方就是消元

上面的系数不是巧合:

  • 括号外的 22 是第一个主元;
  • 括号内的 33 是消元乘数;
  • 最后的 22 是第二个主元。

对 A=[26620]A=\begin{bmatrix}2&6\\6&20\end{bmatrix} 做消元:第二行减去第一行的 33 倍,得到 [2602]\begin{bmatrix}2&6\\0&2\end{bmatrix}。主元是 22 和 22,乘数是 33。

所以配方法就是高斯消元:主元变成平方项外的系数,乘数变成平方项内的系数。主元全为正,等价于二次型能写成系数全正的平方和。

这条联系可以推广到 nn 阶:正定   ⟺  \iff 存在分解 A=LDLTA=LDL^{\mathsf T} 且 DD 的对角元(主元)全正。

从微积分到矩阵:极小值的二阶条件

一元微积分里,x0x_0 是极小点需要两个条件:一阶导数为零,二阶导数为正。二阶导数描述曲率方向。

多元情形完全平行。设 f(x1,…,xn)f(x_1,\dots,x_n) 在原点附近光滑:

  1. 一阶条件:所有偏导数为零,即梯度为零;
  2. 二阶条件:海森矩阵(二阶偏导矩阵)正定。

海森矩阵是

H=[∂2f∂x12∂2f∂x1∂x2∂2f∂x2∂x1∂2f∂x22].H=\begin{bmatrix} \dfrac{\partial^2 f}{\partial x_1^2} & \dfrac{\partial^2 f}{\partial x_1\partial x_2}\\ \dfrac{\partial^2 f}{\partial x_2\partial x_1} & \dfrac{\partial^2 f}{\partial x_2^2} \end{bmatrix}.

它总是对称的,因为混合偏导与求导顺序无关:fxy=fyxf_{xy}=f_{yx}。

对 f(x,y)=2x2+12xy+20y2f(x,y)=2x^2+12xy+20y^2,海森矩阵正是 AA。一阶偏导在原点为零,海森矩阵正定,所以原点是严格极小点。

二维情形可以写成熟悉的形式:

fxx>0,fxxfyy−fxy2>0.f_{xx}>0,\qquad f_{xx}f_{yy}-f_{xy}^2>0.

第二个条件就是海森矩阵的行列式为正。它保证两个特征值同号,而 fxx>0f_{xx}>0 保证同为正。

几何图像

  • 正定:图形是开口向上的碗(椭圆抛物面),原点是唯一最低点。水平截面 xTAx=1x^{\mathsf T}Ax=1 是椭圆。
  • 不定:图形是鞍面,某些方向上升、某些方向下降。水平截面是双曲线。
  • 半正定:某个方向上平坦,碗底是一条线或一个平面,极值不唯一。

三阶例子:把结论推广

取

A=[2−10−12−10−12].A=\begin{bmatrix} 2 & -1 & 0\\ -1 & 2 & -1\\ 0 & -1 & 2 \end{bmatrix}.

顺序主子式

det⁡A1=2,det⁡A2=∣2−1−12∣=3,det⁡A3=4.\det A_1=2,\qquad \det A_2=\begin{vmatrix}2 & -1\\ -1 & 2\end{vmatrix}=3,\qquad \det A_3=4.

三个都为正,所以正定。

主元

消元后主元为

2,32,43.2,\qquad \frac{3}{2},\qquad \frac{4}{3}.

它们两两相乘分别给出顺序主子式:2⋅32=32\cdot\frac32=3,2⋅32⋅43=42\cdot\frac32\cdot\frac43=4。

特征值

不用真的解三次方程,也能知道三个特征值都为正;它们的精确值是

2−2,2,2+2.2-\sqrt2,\qquad 2,\qquad 2+\sqrt2.

检验:和为 66,等于迹;积为 2(4−2)=42(4-2)=4,等于行列式。

二次型与几何

xTAx=2x12+2x22+2x32−2x1x2−2x2x3.x^{\mathsf T}Ax =2x_1^2+2x_2^2+2x_3^2-2x_1x_2-2x_2x_3.

水平截面 xTAx=1x^{\mathsf T}Ax=1 是一个椭球,有三个主轴,方向由特征向量给出。

主轴定理

对对称矩阵,

A=QΛQT,A=Q\Lambda Q^{\mathsf T},

其中 QQ 的列是标准正交特征向量,Λ\Lambda 是特征值对角阵。这叫主轴定理,也是对称矩阵的对角化。

几何含义:

  • 特征向量给出椭球的主轴方向;
  • 特征值决定主轴的长度。

更精确地说,对水平集 xTAx=1x^{\mathsf T}Ax=1,沿第 ii 个特征向量方向的半轴长度为

1λi.\frac{1}{\sqrt{\lambda_i}}.

特征值越大,该方向越「陡」,椭球在该方向越短;反之亦然。

补充:课堂上说的是「长度由 1/λ1/\lambda 决定」,严格写出来应是半轴 1/λ1/\sqrt{\lambda}。推导方式是把 x=Qyx=Qy 代入,二次型化为 ∑λiyi2=1\sum\lambda_i y_i^2=1,于是 yiy_i 的最大值为 1/λi1/\sqrt{\lambda_i}。

常见误区

  1. 只看对角元。对角元全正不足以保证正定。[2667]\begin{bmatrix}2&6\\6&7\end{bmatrix} 的对角元都是正的,行列式却是负的。
  2. 半正定当成正定。行列式为零时,某个方向上的二次型为零,极小点不唯一。
  3. 忘记对称性。正定性只对对称矩阵定义;非对称矩阵的 xTAxx^{\mathsf T}Ax 只取决于其对称部分。
  4. 以为四个判据要分别验证。它们是等价的,任选一个最方便的计算路径即可。

本讲结论

  • 正定矩阵的四个判据——特征值、顺序主子式、主元、二次型——互相等价。
  • 配方法就是消元:主元在平方项外,乘数在平方项内。
  • 海森矩阵正定是多元函数严格极小的二阶条件,是一元情形「二阶导数为正」的推广。
  • 几何上,正定对应碗形与椭球,不定对应鞍面与双曲线。
  • 对称矩阵可以写成 A=QΛQTA=Q\Lambda Q^{\mathsf T},特征向量给方向,特征值给尺度。

理解检验

1. 为什么 [26618]\begin{bmatrix}2&6\\6&18\end{bmatrix} 只是半正定?它的零空间是什么?

参考答案:二阶行列式为 2⋅18−6⋅6=02\cdot18-6\cdot6=0,而一阶主子式 2>02>0,所以矩阵不满足「顺序主子式全正」,但二次型不会取负值。配方得 2x2+12xy+18y2=2(x+3y)22x^2+12xy+18y^2=2(x+3y)^2,对一切 x,yx,y 非负,且沿直线 x+3y=0x+3y=0 恒为零,因此只是半正定。零空间就是这条直线:解 2x+6y=02x+6y=0 得 x=−3yx=-3y,所以 N(A)=span⁡{(−3,1)T}N(A)=\operatorname{span}\{(-3,1)^T\}。矩阵秩为 11,特征值为 00 与 2020。

2. 不用算特征值,如何判断 [26620]\begin{bmatrix}2&6\\6&20\end{bmatrix} 的两个特征值都为正?

参考答案:检查顺序主子式。一阶是 2>02>0;二阶是 det⁡A=2⋅20−6⋅6=4>0\det A=2\cdot20-6\cdot6=4>0。两个顺序主子式都为正,矩阵正定,因此两个特征值都为正。也可以看主元:第一主元 22,第二主元 det⁡A/2=2\det A/2=2,都为正。两种判据都与「特征值全正」等价,不必解二次方程。

3. 配方法与消元中的主元、乘数如何一一对应?

参考答案:以 2x2+12xy+20y2=2(x+3y)2+2y22x^2+12xy+20y^2=2(x+3y)^2+2y^2 为例。括号外的系数 22 是第一个主元;括号内的 33 是消元乘数;最后一项的系数 22 是第二个主元。消元过程是:第二行减去第一行的 33 倍,得到 [2602]\begin{bmatrix}2&6\\0&2\end{bmatrix},主元正是 22 与 22。一般地,配方就是把 xTAxx^{\mathsf T}Ax 写成 ∑idi(线性式i)2\sum_i d_i(\text{线性式}_i)^2,其中 did_i 是第 ii 个主元,线性式里的系数是消元乘数。这正是 A=LDLTA=LDL^{\mathsf T} 分解。

4. 对 f(x,y)=x2+4xy+y2f(x,y)=x^2+4xy+y^2,原点是极小、极大还是鞍点?

参考答案:先看梯度,∇f=(2x+4y, 4x+2y)\nabla f=(2x+4y,\,4x+2y),在原点为零,所以原点是驻点。海森矩阵是

H=[2442].H=\begin{bmatrix}2&4\\4&2\end{bmatrix}.

一阶主子式 2>02>0,但行列式 4−16=−12<04-16=-12<0,所以 HH 不定。特征值为 66 与 −2-2,一正一负。沿方向 (1,1)(1,1) 二次型为 6>06>0,沿方向 (1,−1)(1,-1) 为 −2<0-2<0,因此原点是鞍点,不是极值点。

5. 水平集 xTAx=1x^{\mathsf T}Ax=1 的半轴长度为什么是 1/λ1/\sqrt{\lambda} 而不是 1/λ1/\lambda?

参考答案:令 x=Qyx=Qy,其中 QQ 的列是标准正交特征向量。因为 QTQ=IQ^{\mathsf T}Q=I,有

xTAx=yTQTAQ y=yTΛy=∑iλiyi2.x^{\mathsf T}Ax=y^{\mathsf T}Q^{\mathsf T}AQ\,y=y^{\mathsf T}\Lambda y=\sum_i\lambda_i y_i^2 .

水平集化为 ∑iλiyi2=1\sum_i\lambda_i y_i^2=1,这是 yy 坐标下的椭球,第 ii 个半轴满足 λiyi2=1\lambda_i y_i^2=1,即 ∣yi∣=1/λi|y_i|=1/\sqrt{\lambda_i}。又因为 QQ 是正交矩阵,变换 x=Qyx=Qy 保持长度,所以 xx 坐标下的半轴长度同样是 1/λi1/\sqrt{\lambda_i}。1/λ1/\lambda 量纲不对:二次型是长度的平方,特征值要开方才能对应长度。

与前后课程的关系

上一讲用特征值分解处理了对称矩阵;这一讲把对称、正定、二次型与极小值连成一体。下一讲先从正定矩阵的两个运算性质(逆与和)与最小二乘中的 ATAA^{\mathsf T}A 收尾,再转入相似矩阵与 Jordan 形。

Why this lecture is a hinge

Positive definiteness is not a new computational trick. It is where the whole course meets. For a symmetric matrix, four different languages answer the same question:

  1. Eigenvalues: all are positive.
  2. Determinants: every leading principal minor is positive.
  3. Pivots: every pivot after elimination is positive.
  4. Quadratic form: xTAx>0x^{\mathsf T}Ax>0 for every nonzero xx.

The lecture's job is to explain why these are equivalent, and what geometric object they describe: an upward-opening bowl.

One-sentence summary: A positive definite matrix is one whose quadratic form is always positive, and pivots, determinants, and eigenvalues are three projections of that single fact.

Timeline

TimeTopic
0:05Positive definite matrices and quadratic forms
1:452 by 2 matrices, determinants and pivots
5:28A positive determinant is not enough
6:37Positive semidefinite, where an eigenvalue is zero
8:32Values of the quadratic form xTAxx^{\mathsf T}Ax
10:19Completing squares into a sum of squares
12:15Deciding definiteness without eigenvalues
16:49The picture: a bowl, a saddle, a trough
19:24The 2 by 2 test: a>0a>0 and ac−b2>0ac-b^2>0
22:25Level curves and principal axes
24:16A necessary condition: first derivatives vanish
26:20The second derivative matrix, the Hessian
32:30Principal axes and eigenvalues are the same directions
35:24The Hessian and the quadratic Taylor term
39:22A 3 by 3 example: determinant and pivots
44:42Telling a bowl from a saddle and a football
48:20The shape when the three eigenvalues are distinct

A two-by-two example

Take the symmetric matrix

A=[266c].A=\begin{bmatrix}2 & 6\\ 6 & c\end{bmatrix}.

The first leading minor is 2>02>0, so only the full determinant matters:

det⁡A=2c−36.\det A = 2c-36.

Three regimes

ccDeterminantEigenvaluesVerdict
1818000, 200,\ 20positive semidefinite
77−22-22one positive, one negativeindefinite
202044both positivepositive definite

At c=18c=18 the second row is three times the first, the rank is one, and there is only one pivot, 22. The trace is 2020 and the determinant is 00, so the eigenvalues are 00 and 2020.

At c=7c=7, choose x=(1,−1)x=(1,-1):

xTAx=2−12+7=−3<0.x^{\mathsf T}Ax = 2-12+7=-3<0.

A quadratic form that goes negative in some direction rules out positive definiteness. Geometrically this is a saddle: rising along some directions, falling along others.

At c=20c=20, the determinant is 44 and the trace is 2222. A positive product and a positive sum force both eigenvalues positive.

The quadratic form is the definition

Write x=(x1,x2)x=(x_1,x_2):

xTAx=[x1x2][abbc][x1x2]=ax12+2bx1x2+cx22.x^{\mathsf T}Ax = \begin{bmatrix}x_1 & x_2\end{bmatrix} \begin{bmatrix}a & b\\ b & c\end{bmatrix} \begin{bmatrix}x_1\\ x_2\end{bmatrix} = ax_1^2+2bx_1x_2+cx_2^2.

This is purely quadratic: no constant, no linear terms, no higher powers. Diagonal entries produce the squares; off-diagonal entries appear in pairs and produce the cross term.

Definition: AA is positive definite if xTAx>0x^{\mathsf T}Ax>0 for every x≠0x\neq 0.

Completing the square

For c=20c=20:

2x2+12xy+20y2=2(x+3y)2+2y2.2x^2+12xy+20y^2 = 2(x+3y)^2+2y^2.

The right side is a sum of nonnegative squares, zero only when y=0y=0 and x=−3yx=-3y, that is, only at the origin. Hence positive definite.

For c=18c=18:

2x2+12xy+18y2=2(x+3y)2.2x^2+12xy+18y^2 = 2(x+3y)^2.

One square remains, and it vanishes along the whole line x=−3yx=-3y. That is positive semidefinite, not definite.

For c=7c=7:

2x2+12xy+7y2=2(x+3y)2−11y2.2x^2+12xy+7y^2 = 2(x+3y)^2-11y^2.

A negative coefficient appears, so the form is negative along y≠0y\neq 0, x=−3yx=-3y.

Completing the square is elimination

The coefficients are not accidental:

  • the outer 22 is the first pivot;
  • the inner 33 is the elimination multiplier;
  • the final 22 is the second pivot.

Eliminating on A=[26620]A=\begin{bmatrix}2&6\\6&20\end{bmatrix} means subtracting three times row one from row two, giving [2602]\begin{bmatrix}2&6\\0&2\end{bmatrix}. The pivots are 22 and 22; the multiplier is 33.

So completing the square is Gaussian elimination. Positive pivots mean the quadratic form can be written as a sum of squares with positive coefficients. In general, positive definiteness is equivalent to a factorization A=LDLTA=LDL^{\mathsf T} with every diagonal entry of DD positive.

From calculus to matrices: the second-order condition

In one-variable calculus, a minimum needs two conditions: the first derivative vanishes, and the second derivative is positive. The second derivative measures the curvature.

The multivariable statement is exactly parallel. For a smooth f(x1,…,xn)f(x_1,\dots,x_n):

  1. First order: every partial derivative vanishes; the gradient is zero.
  2. Second order: the Hessian matrix of second partials is positive definite.
H=[∂2f∂x12∂2f∂x1∂x2∂2f∂x2∂x1∂2f∂x22].H=\begin{bmatrix} \dfrac{\partial^2 f}{\partial x_1^2} & \dfrac{\partial^2 f}{\partial x_1\partial x_2}\\ \dfrac{\partial^2 f}{\partial x_2\partial x_1} & \dfrac{\partial^2 f}{\partial x_2^2} \end{bmatrix}.

It is always symmetric, because mixed partials do not depend on the order of differentiation: fxy=fyxf_{xy}=f_{yx}.

For f(x,y)=2x2+12xy+20y2f(x,y)=2x^2+12xy+20y^2, the Hessian is exactly AA. The gradient vanishes at the origin and the Hessian is positive definite, so the origin is a strict minimum.

In two variables this becomes the familiar test

fxx>0,fxxfyy−fxy2>0.f_{xx}>0,\qquad f_{xx}f_{yy}-f_{xy}^2>0.

The second inequality is the determinant of the Hessian. It forces the two eigenvalues to share a sign, and fxx>0f_{xx}>0 forces that sign to be positive.

The picture

  • Positive definite: an upward bowl (elliptic paraboloid) with a unique lowest point at the origin. The level set xTAx=1x^{\mathsf T}Ax=1 is an ellipse.
  • Indefinite: a saddle, rising in some directions and falling in others. The level set is a hyperbola.
  • Semidefinite: flat in some direction; the bottom is a line or plane, so the minimum is not unique.

A three-by-three example

A=[2−10−12−10−12].A=\begin{bmatrix} 2 & -1 & 0\\ -1 & 2 & -1\\ 0 & -1 & 2 \end{bmatrix}.

Leading minors

det⁡A1=2,det⁡A2=∣2−1−12∣=3,det⁡A3=4.\det A_1=2,\qquad \det A_2=\begin{vmatrix}2 & -1\\ -1 & 2\end{vmatrix}=3,\qquad \det A_3=4.

All positive, so the matrix is positive definite.

Pivots

Elimination gives

2,32,43.2,\qquad \frac{3}{2},\qquad \frac{4}{3}.

Their partial products reproduce the leading minors: 2⋅32=32\cdot\frac32=3 and 2⋅32⋅43=42\cdot\frac32\cdot\frac43=4.

Eigenvalues

No cubic equation is needed to know they are all positive, but their exact values are

2−2,2,2+2.2-\sqrt2,\qquad 2,\qquad 2+\sqrt2.

Check: the sum is 66, the trace; the product is 2(4−2)=42(4-2)=4, the determinant.

Quadratic form and geometry

xTAx=2x12+2x22+2x32−2x1x2−2x2x3.x^{\mathsf T}Ax =2x_1^2+2x_2^2+2x_3^2-2x_1x_2-2x_2x_3.

The level set xTAx=1x^{\mathsf T}Ax=1 is an ellipsoid with three principal axes, whose directions come from the eigenvectors.

The principal axis theorem

For a symmetric matrix,

A=QΛQT,A=Q\Lambda Q^{\mathsf T},

where the columns of QQ are orthonormal eigenvectors and Λ\Lambda is diagonal. This is the principal axis theorem, and it is diagonalization for symmetric matrices.

Geometrically:

  • eigenvectors give the directions of the ellipsoid's principal axes;
  • eigenvalues set their lengths.

More precisely, for the level set xTAx=1x^{\mathsf T}Ax=1, the semi-axis along the ii-th eigenvector has length

1λi.\frac{1}{\sqrt{\lambda_i}}.

A larger eigenvalue means a steeper direction, hence a shorter semi-axis.

Background: the lecture phrases this as "lengths, or half-lengths, or one over the eigenvalues". The exact statement follows by substituting x=Qyx=Qy, which turns the form into ∑λiyi2=1\sum\lambda_i y_i^2=1; the largest yiy_i is 1/λi1/\sqrt{\lambda_i}.

Common mistakes

  1. Checking only the diagonal. Positive diagonal entries do not imply positive definiteness: [2667]\begin{bmatrix}2&6\\6&7\end{bmatrix} has positive diagonal and negative determinant.
  2. Confusing semidefinite with definite. A zero determinant means the form vanishes along some direction, so the minimum is not unique.
  3. Forgetting symmetry. Positive definiteness is defined for symmetric matrices; the form xTAxx^{\mathsf T}Ax of a non-symmetric matrix depends only on its symmetric part.
  4. Treating the four tests as independent work. They are equivalent; use whichever is cheapest to compute.

Takeaways

  • The four tests — eigenvalues, leading minors, pivots, quadratic form — are equivalent.
  • Completing the square is elimination: pivots outside, multipliers inside.
  • A positive definite Hessian is the multivariable version of "second derivative positive", and it certifies a strict minimum.
  • Geometrically, positive definite means a bowl and an ellipsoid; indefinite means a saddle and a hyperbola.
  • Symmetric matrices factor as A=QΛQTA=Q\Lambda Q^{\mathsf T}; eigenvectors give directions, eigenvalues give scale.

Check your understanding

1. Why is [26618]\begin{bmatrix}2&6\\6&18\end{bmatrix} only semidefinite? What is its null space?

Reference answer: The 2×22\times2 determinant is 2⋅18−6⋅6=02\cdot18-6\cdot6=0, while the leading 1×11\times1 minor is 2>02>0, so the matrix fails "all leading minors positive" but never makes the quadratic form negative. Completing the square gives 2x2+12xy+18y2=2(x+3y)22x^2+12xy+18y^2=2(x+3y)^2, which is nonnegative everywhere and equals zero along the line x+3y=0x+3y=0; hence it is only semidefinite. The null space is that line: 2x+6y=02x+6y=0 gives x=−3yx=-3y, so N(A)=span⁡{(−3,1)T}N(A)=\operatorname{span}\{(-3,1)^T\}. The rank is 11 and the eigenvalues are 00 and 2020.

2. Without computing eigenvalues, how do you know both eigenvalues of [26620]\begin{bmatrix}2&6\\6&20\end{bmatrix} are positive?

Reference answer: Check the leading principal minors. The first is 2>02>0; the second is det⁡A=2⋅20−6⋅6=4>0\det A=2\cdot20-6\cdot6=4>0. Both are positive, so the matrix is positive definite and both eigenvalues are positive. Equivalently, the pivots are 22 and det⁡A/2=2\det A/2=2, both positive. Each criterion is equivalent to "all eigenvalues positive", so no quadratic formula is needed.

3. How do the pivots and multipliers of elimination correspond to the coefficients in the completed square?

Reference answer: Take 2x2+12xy+20y2=2(x+3y)2+2y22x^2+12xy+20y^2=2(x+3y)^2+2y^2. The coefficient outside the bracket, 22, is the first pivot; the 33 inside is the elimination multiplier; the final coefficient 22 is the second pivot. Elimination subtracts 33 times row 1 from row 2, producing [2602]\begin{bmatrix}2&6\\0&2\end{bmatrix}, whose pivots are exactly 22 and 22. In general, completing the square writes xTAx=∑idi(lineari)2x^{\mathsf T}Ax=\sum_i d_i(\text{linear}_i)^2, where did_i is the ii-th pivot and the coefficients of the linear forms are the multipliers — precisely the A=LDLTA=LDL^{\mathsf T} factorization.

4. For f(x,y)=x2+4xy+y2f(x,y)=x^2+4xy+y^2, is the origin a minimum, a maximum, or a saddle?

Reference answer: The gradient is ∇f=(2x+4y, 4x+2y)\nabla f=(2x+4y,\,4x+2y), which vanishes at the origin, so the origin is a critical point. The Hessian is

H=[2442].H=\begin{bmatrix}2&4\\4&2\end{bmatrix}.

Its leading minor 2>02>0, but its determinant 4−16=−12<04-16=-12<0, so HH is indefinite; the eigenvalues are 66 and −2-2. Along (1,1)(1,1) the quadratic form is 6>06>0, while along (1,−1)(1,-1) it is −2<0-2<0. The origin is therefore a saddle point, not an extremum.

5. Why is the semi-axis of xTAx=1x^{\mathsf T}Ax=1 equal to 1/λ1/\sqrt{\lambda} rather than 1/λ1/\lambda?

Reference answer: Set x=Qyx=Qy, where the columns of QQ are orthonormal eigenvectors. Since QTQ=IQ^{\mathsf T}Q=I,

xTAx=yTQTAQ y=yTΛy=∑iλiyi2.x^{\mathsf T}Ax=y^{\mathsf T}Q^{\mathsf T}AQ\,y=y^{\mathsf T}\Lambda y=\sum_i\lambda_i y_i^2 .

The level set becomes ∑iλiyi2=1\sum_i\lambda_i y_i^2=1, an ellipsoid in yy-coordinates whose ii-th semi-axis satisfies λiyi2=1\lambda_i y_i^2=1, i.e. ∣yi∣=1/λi|y_i|=1/\sqrt{\lambda_i}. Because QQ is orthogonal, x=Qyx=Qy preserves lengths, so the semi-axis in xx-coordinates has the same length 1/λi1/\sqrt{\lambda_i}. The expression 1/λ1/\lambda has the wrong dimension: the quadratic form is a squared length, so its eigenvalues must be square-rooted to yield a length.

How this connects to the course

The previous lecture diagonalized symmetric matrices. This one unifies symmetry, positive definiteness, quadratic forms, and minima. The next lecture first finishes positive definiteness with inverses, sums, and the least-squares matrix ATAA^{\mathsf T}A, then turns to similar matrices and Jordan form.

来源