第 20 章
行列式的三个应用:逆矩阵、Cramer 法则与体积
用代数余子式写出 A⁻¹ 的显式公式,由此得到 Cramer 法则;再把行列式解释为平行体体积与三角形面积。
Three Uses of Determinants: Inverse, Cramer's Rule, and Volume
Cofactors give an explicit formula for A⁻¹, which yields Cramer's rule; then the determinant is interpreted as the volume of a parallelepiped and the area of a triangle.
篇内目录
- Where this lecture sits
- Timeline
- Application 1: the inverse via cofactors
- What the formula reveals
- The general formula
- Why it holds
- A consequence: how perturbations change the inverse
- Application 2: Cramer's rule
- Starting from the inverse
- What is
- Why it is not practical
- Application 3: the determinant is a volume
- The statement
- Proof via the three defining properties
- The two-dimensional formula
- A triangle with arbitrary vertices
- Core review
- Common misconceptions
- Check your understanding
- How this connects
这一讲的位置
前两讲建立行列式的性质与公式,这一讲回答「它有什么用」。三个应用分别是:逆矩阵的显式表达、线性方程组的 Cramer 法则、以及行列式作为体积。
需要先说明:这三个公式主要是理论工具。真正计算时,消元法又快又稳,显式公式并不实用。它们的价值在于让你看到矩阵各部件之间的代数关系。
时间轴
| 时间 | 内容 |
|---|---|
| 0:00 | 第三讲:Cramer 法则、逆矩阵与体积 |
| 3:00 | 逆矩阵公式中的余子式与符号 |
| 6:09 | 2×2 逆矩阵的余子式写法 |
| 9:21 | 一般 阶:每一列都是余子式 |
| 12:22 | 一行乘以另一行的余子式为何为 0 |
| 15:23 | 沿第二行展开做验证 |
| 18:27 | 用公式写出 |
| 21:30 | 余子式乘以数等于某个行列式 |
| 24:36 | Cramer 法则及其证明 |
| 27:52 | 公式漂亮但不实用 |
| 30:53 | 行列式就是体积 |
| 33:58 | 单位立方体的体积为 1 |
| 37:07 | 从三条性质推出体积性质 |
| 40:21 | 一行提出因子与体积缩放 |
| 43:25 | 平行四边形的面积 |
| 46:37 | 三角形面积是平行四边形的一半 |
| 49:44 | 行列式的几何意义 |
应用一:逆矩阵的伴随矩阵公式
二阶情形给出的线索
观察右边的矩阵:
- 是 的代数余子式(划掉第 1 行第 1 列);
- 是 的代数余子式(位置 , 为奇数,带负号);
- 是 的代数余子式;
- 是 的代数余子式。
也就是说,右边是代数余子式矩阵的转置。
一般公式
设 是以 为元素的代数余子式矩阵,则
矩阵 也称为 的伴随矩阵(adjugate)。
为什么成立
要证明 ,只需证明
看左边的 元:它是 的第 行与 的第 列(即 的第 行)的内积:
这正是沿第 行的余子式展开,等于 。
再看 元,:它是 的第 行与第 行的余子式的内积。这个和等于「把 的第 行替换成第 行后」所得矩阵的行列式。该矩阵有两行相同,行列式为零。
于是对角线上全是 ,非对角线上全是零:
两边除以 (可逆时非零),即得公式。
一个推论:矩阵微扰如何影响逆
有了显式公式,就能回答「把 加 1, 怎么变」这类问题:分别看行列式与各个余子式如何变化即可。消元算法给不出这种结构性理解。
应用二:Cramer 法则
从逆矩阵公式出发
方程组 的解是 。代入上面的公式:
看第 个分量:
这个和可以读成「某个矩阵沿第 列的余子式展开」。
是什么
定义 为把 的第 列替换成 后得到的矩阵:
沿第 列展开 :
这里的余子式与 的完全相同,因为第 列被替换并不影响划掉第 列后的子矩阵。
于是得到 Cramer 法则:
为什么它不实用
Cramer 法则需要计算 个行列式。每个 阶行列式若用展开法,代价是 ;即便用消元,也是 ,而 个就是 。消元法一次就能得到全部解,代价 。
课堂上有一句很直白的评价:Cramer 法则「要算到天荒地老」。它的意义在于用字母做代数,而不是做数值计算。
应用三:行列式就是体积
陈述
以矩阵的各行(或各列)为棱,张成一个平行体。这个平行体的体积等于行列式的绝对值:
符号表示定向:交换两行相当于交换两条棱,体积不变,但手性翻转,所以行列式变号。
用三条性质证明
之前证明过:满足那三条性质的量唯一。所以只要验证「体积」也满足这三条,就必然是行列式。
- 单位矩阵:三条棱是坐标轴单位向量,张成单位立方体,体积为 1,与 一致。
- 正交矩阵: 的列是标准正交向量,仍然张成单位立方体,只是被旋转了,体积为 1。而 绝对值为 1,与体积一致。
- 某一行乘以 :把一条棱拉长 倍,体积乘以 ,对应性质 3A。
- 某一行拆成两项:这就是 3B。二维情形下,它说的是「平行四边形可以被一条对角线分成两个三角形,面积相加」。这是整讲唯一没有完整展开的证明,书中给了图示。
四条合起来,体积与行列式满足同一组定义性质,因此相等。
二维的具体公式
以 与 为邻边的平行四边形,面积为
取绝对值就是面积。三角形是平行四边形的一半:
与「底乘高」相比,这个公式只需要顶点坐标,不需要算长度、角度或高,也就不会出现根号。
任意三个顶点的三角形
设三个顶点为 ,则
把第二行、第三行分别减去第一行,前两列就变成相对于第一个顶点的坐标差,等价于把三角形平移到原点。这也说明:平移不改变面积。
核心回顾
- ,其中 是代数余子式矩阵。
- 证明的关键:对角线上是余子式展开,非对角线对应「两行相同」的零行列式。
- Cramer 法则:, 是把第 列换成 。
- 行列式的绝对值等于平行体体积,符号表示定向。
- 体积满足行列式的三条定义性质,因此两者相等。
- 顶点坐标给出的面积公式不需要长度与角度。
常见误区
- 把伴随矩阵写成 而不是 。转置是公式的一部分。
- 用 Cramer 法则做数值计算。它只适合推导与理论分析。
- 忘记体积取绝对值。行列式可以为负,体积不能。
- 把三角形面积公式漏掉 。
- 认为 的每个元素都是「同位置的余子式除以行列式」。实际是转置后的对应位置。
理解检验
1. 证明 的非对角元为零时,用到了哪条行列式性质?
参考答案:用到「两行相同则行列式为零」(性质 4)。 元()是 的第 行与第 行余子式的内积,它等于「把 的第 行换成第 行」所得矩阵沿第 列的余子式展开。该矩阵第 行与第 行相同,行列式为零,所以这个内积为零。注意替换的列不影响余子式,因为展开时第 列本来就被划掉。
2. 对 矩阵写出 Cramer 法则,并与直接求逆的结果对照。
参考答案:设 ,,方程 ,。Cramer 法则给出
直接求逆:
两个分量完全一致。
3. 为什么正交矩阵的行列式只能是 ?
参考答案:,两边取行列式并用 :
又由 ,得 ,所以 。几何上,正交矩阵只旋转或反射,不改变体积,所以体积倍率的绝对值是 1;符号区分是否翻转手性。
4. 一个平行体的体积是 5,把其中一条棱延长为原来的 3 倍,新体积是多少?
参考答案:。体积等于行列式的绝对值;把一条棱(一行)乘以 3,由 3A 行列式乘以 3,体积也乘以 3,即 。其余棱的方向不变,所以只是这一条边变长。
5. 用顶点坐标公式计算 构成的三角形面积。
参考答案:
这是直角边为 3 与 4 的直角三角形,与「底乘高的一半」一致。
与前后课程的关系
这一讲结束行列式部分。下一讲开始特征值与特征向量:把 看成「矩阵作用下方向不变的特殊向量」,并用 求特征值。行列式在这里再次成为关键工具。
Where this lecture sits
The previous two lectures built the properties and formulas of determinants. This one asks what they are good for: an explicit inverse, Cramer's rule for linear systems, and the determinant as volume.
One caveat comes first: these are primarily theoretical tools. For actual computation, elimination is faster and more stable. Their value is the algebraic relationships they expose.
Timeline
| Time | Topic |
|---|---|
| 0:00 | Third lecture: Cramer's rule, inverses, volume |
| 3:00 | Cofactors and signs in the inverse formula |
| 6:09 | The 2×2 inverse via cofactors |
| 9:21 | The case: each column is a cofactor column |
| 12:22 | Why a row times another row's cofactors is zero |
| 15:23 | Checking by expanding along the second row |
| 18:27 | Writing with the formula |
| 21:30 | Cofactors times numbers as determinants |
| 24:36 | Cramer's rule and its proof |
| 27:52 | Elegant but not practical |
| 30:53 | The determinant as a volume |
| 33:58 | The unit cube has volume 1 |
| 37:07 | Deriving volume properties from the axioms |
| 40:21 | Factoring a row scales the volume |
| 43:25 | The area of a parallelogram |
| 46:37 | A triangle is half a parallelogram |
| 49:44 | The geometric meaning of the determinant |
Application 1: the inverse via cofactors
What the formula reveals
Look at the matrix on the right:
- is the cofactor of (delete row 1, column 1);
- is the cofactor of (position , and is odd, so it carries a minus);
- is the cofactor of ;
- is the cofactor of .
The right-hand matrix is therefore the transpose of the cofactor matrix.
The general formula
Let be the cofactor matrix with entries . Then
The matrix is also called the adjugate of .
Why it holds
To show , it suffices to show
The entry on the left is the inner product of row of with column of , which is row of :
That is exactly the cofactor expansion along row , so it equals .
Now the entry with : it is the inner product of row of with the cofactors of row . This sum equals the determinant of the matrix obtained by replacing row of with row . That matrix has two equal rows, so its determinant is zero.
Hence every diagonal entry is and every off-diagonal entry is zero:
Dividing by the nonzero determinant gives the formula.
A consequence: how perturbations change the inverse
With an explicit formula you can answer questions like "what happens to if I add 1 to ": examine how the determinant and each cofactor change. Elimination gives no such structural answer.
Application 2: Cramer's rule
Starting from the inverse
The solution of is , so
The -th component is
That sum reads as a cofactor expansion of some matrix along column .
What is
Define as the matrix obtained by replacing column of with :
Expanding along column :
The cofactors are the same as those of , because replacing column does not affect the submatrix left after deleting column . Therefore Cramer's rule:
Why it is not practical
Cramer's rule needs determinants. Each costs by expansion, or by elimination, so the total is . Elimination produces the whole solution once, in .
The lecture's verdict is blunt: Cramer's rule is a disastrous way to compute. Its value is doing algebra with letters, not numerical work.
Application 3: the determinant is a volume
The statement
Take the rows (or columns) of the matrix as the edges of a parallelepiped. Its volume is the absolute value of the determinant:
The sign encodes orientation: exchanging two rows exchanges two edges, leaving the volume unchanged but flipping handedness, so the determinant changes sign.
Proof via the three defining properties
Earlier we proved that a quantity satisfying the three properties is unique. So it suffices to check that "volume" satisfies them too.
- Identity. The three edges are the coordinate unit vectors, spanning the unit cube. Volume 1 matches .
- Orthogonal matrix. The columns of are orthonormal, so they still span a unit cube, merely rotated, with volume 1. And The absolute value is 1, matching the volume.
- Scaling a row by . Stretching one edge by multiplies the volume by , matching property 3A.
- Splitting a row. This is 3B. In two dimensions it says a parallelogram splits along a diagonal into two triangles whose areas add. This is the one step the lecture only sketches; the book draws the figure.
All four hold, so the volume and the determinant satisfy the same defining properties and must be equal.
The two-dimensional formula
A parallelogram with adjacent edges and has area
The absolute value is the area. A triangle is half of it:
Compared with "base times height", this uses only vertex coordinates: no lengths, angles, or heights, and no square roots.
A triangle with arbitrary vertices
For vertices ,
Subtracting the first row from the second and third turns the first two columns into coordinate differences relative to the first vertex, which is the same as translating the triangle to the origin. Translation does not change area.
Core review
- , where is the cofactor matrix.
- The proof: diagonal entries are cofactor expansions; off-diagonal entries come from matrices with two equal rows.
- Cramer's rule: , with replacing column by .
- The absolute determinant is the volume; the sign is orientation.
- Volume satisfies the three defining properties, so it equals the determinant.
- Vertex coordinates give area without lengths or angles.
Common misconceptions
- Writing the adjugate as instead of . The transpose is part of the formula.
- Using Cramer's rule for numerical work. It is for derivations, not computation.
- Forgetting the absolute value for volume. Determinants can be negative; volumes cannot.
- Dropping the factor of in the triangle formula.
- Thinking each entry of is the same-position cofactor over the determinant. It is the transposed position.
Check your understanding
1. Which determinant property proves that the off-diagonal entries of vanish?
Reference answer: The property "two equal rows give determinant zero" (property 4). Entry with is the inner product of row of with the cofactors of row ; it equals the cofactor expansion along column of the matrix obtained by replacing row of with row . That matrix has two equal rows, so its determinant is zero and the inner product vanishes. Note that replacing a column does not change the cofactors, because column is deleted in the expansion anyway.
2. Write Cramer's rule for a system and compare it with direct inversion.
Reference answer: Let with and , . Cramer gives
Direct inversion gives
which matches component by component.
3. Why can an orthogonal matrix only have determinant ?
Reference answer: ; take determinants and use :
Since , we get , hence . Geometrically an orthogonal matrix only rotates or reflects, so it does not change volume; the magnitude of the volume factor is 1, and the sign records whether orientation is reversed.
4. A parallelepiped has volume 5. If one edge is tripled, what is the new volume?
Reference answer: . Volume is the absolute value of the determinant; multiplying one edge (one row) by 3 multiplies the determinant by 3 by property 3A, hence the volume by 3: . The other edges keep their directions, so only that edge grows.
5. Use the vertex formula to find the area of the triangle with vertices .
Reference answer:
This is the right triangle with legs and , matching "half base times height".
How this connects
This lecture ends the determinant chapter. The next begins eigenvalues and eigenvectors: special vectors whose direction is unchanged by the matrix, found by solving . The determinant returns as the key tool.