返回 Guide 目录

线性代数 / Linear Algebra

矩阵分解

Matrix Decomposition

本页结构

核心概念

  • 特征值、特征向量与对角化 Eigenvalues, eigenvectors and diagonalization
  • SVD 在压缩和因子结构中的作用 SVD as a basis for compression and factor structure
  • QR、LU、Cholesky 与投影矩阵 QR, LU, Cholesky and projection matrices

学习顺序

  1. 根据问题选择分解方法,而不是机械背诵。 Choose a decomposition based on the problem, not by memorized order.
  2. 把 SVD 和主方向、降维联系起来。 Relate SVD to principal directions and dimensionality reduction.
  3. 知道 Cholesky 分解何时要求正定性。 Know when Cholesky requires positive definiteness.

可对角矩阵

Diagonalizable Matrices

AA is diagonalizable if and only if it has linearly independent eigenvectors, or equivalently, if the geometric multiplicity and the algebraic multiplicity of all the eigenvalues agree. A special case of this is if AA has nn distinct eigenvalues. Suppose we have eigenvalues λ1,,λn\lambda_1, \dots, \lambda_n and corresponding eigenvectors v1,,vnv_1, \dots, v_n. Then

AA is diagonalizable if and only if it has linearly independent eigenvectors, or equivalently, if the geometric multiplicity and the algebraic multiplicity of all the eigenvalues agree. A special case of this is if AA has nn distinct eigenvalues. Suppose we have eigenvalues λ1,,λn\lambda_1, \dots, \lambda_n and corresponding eigenvectors v1,,vnv_1, \dots, v_n. Then

Intuitively, this says that we can find a basis consisting of the eigenvectors of AA. Useful for computing large powers of AA, as An=XDnX1A^n = XD^n X^{-1}. An important example is AA being real and symmetric implies AA is diagonalizable.

直观地说,我们可以找到一个由 AA 的特征向量组成的基。对于计算 AA 的大幂很有用,如 An=XDnX1A^n = XD^n X^{-1}。一个重要的例子是 AA 是实数且对称意味着 AA 是可对角化的。

奇异值分解

Singular Value Decomposition

SVD is powerful in low-rank approximations of matrices. Unlike eigenvalue decomposition, SVD uses two unique bases (left/right singular vectors). For orthogonal matrices U(m×m),V(n×n)U (m \times m), V (n \times n) and diagonal matrix Σ(m×n)\Sigma (m \times n) with nonnegative diagonal entries in nonincreasing order, we can write any m×nm \times n matrix AA as:

SVD 在矩阵的低阶近似方面非常强大。与特征值分解不同,SVD 使用两个唯一的基(左/右奇异向量)。对于正交矩阵 U(m×m),V(n×n)U (m \times m), V (n \times n) 和对角矩阵 Σ(m×n)\Sigma (m \times n) 具有非递增顺序的非负对角线条目,我们可以将任何 m×nm \times n 矩阵 AA 写为:

Intuitively, this says that we can express AA as a diagonal matrix with suitable choices of (orthogonal) bases.

直观上,这表明我们可以将 AA 表示为对角矩阵,并选择合适的(正交)基数。

二维码分解

QR Decomposition

For nonsingular AA, we can write A=QRA = QR, where QQ is orthogonal and RR is an upper triangular matrix with positive diagonal elements. QR decomposition assists in increasing the efficiency of solving Ax=bAx = b for nonsingular AA:

对于非奇异 AA,我们可以写成 A=QRA = QR,其中 QQ 是正交矩阵,RR 是具有正对角线元素的上三角矩阵。 QR 分解有助于提高求解非奇异 AAAx=bAx = b 的效率:

QR decomposition is very useful in efficiently solving large numerical systems and inversion of matrices. Furthermore, it is also used in least-squares when our data is not full rank.

QR 分解对于有效求解大型数值系统和矩阵求逆非常有用。此外,当我们的数据不是满秩时,它也可用于最小二乘法。

LU 和 Cholesky 分解

LU and Cholesky Decompositions

For nonsingular AA, we can write A=LUA = LU, where LL is a lower and UU is an upper triangular matrix. This decomposition assists in solving Ax=bAx = b as well as computing the determinant:

对于非奇异 AA,我们可以写成 A=LUA = LU,其中 LL 是下三角矩阵,UU 是上三角矩阵。此分解有助于求解 Ax=bAx = b 以及计算行列式:

If AA is symmetric positive definite, then AA can be expressed as A=RRA = R^\intercal R via Cholesky decomposition, where RR is an upper triangular matrix with positive diagonal entries. Cholesky decomposition is essentially LU decomposition with L=UL = U^\intercal. These decompositions are both useful for solving large linear systems.

如果 AA 是对称正定的,则​​ AA 可以通过 Cholesky 分解表示为 A=RRA = R^\intercal R,其中 RR 是对角线项为正的上三角矩阵。 Cholesky 分解本质上是采用 L=UL = U^\intercal 的 LU 分解。这些分解对于求解大型线性系统都很有用。

预测

Projections

Fix a vector vRnv \in \mathbb{R}^n. The projection of xRnx \in \mathbb{R}^n onto vv is given by

修复向量 vRnv \in \mathbb{R}^nxRnx \in \mathbb{R}^nvv 的投影由下式给出

More generally, if S=Span{v1,,vk}RnS = \text{Span}\{v_1, \dots, v_k\} \subseteq \mathbb{R}^n has orthogonal basis {v1,,vk}\{v_1, \dots, v_k\}, then the projection of xRnx \in \mathbb{R}^n onto SS is given by

More generally, if S=Span{v1,,vk}RnS = \text{Span}\{v_1, \dots, v_k\} \subseteq \mathbb{R}^n has orthogonal basis {v1,,vk}\{v_1, \dots, v_k\}, then the projection of xRnx \in \mathbb{R}^n onto SS is given by

The main property is that projS(x)S\text{proj}_S(x) \in S and xprojS(x)x - \text{proj}_S(x) is orthogonal to any sSs \in S. Linear Regression can be viewed as a projection of our observed data onto the subspace formed by the span of the collected data.

主要属性是 projS(x)S\text{proj}_S(x) \in SxprojS(x)x - \text{proj}_S(x) 与任何 sSs \in S 正交。线性回归可以看作是我们观察到的数据到由收集数据的跨度形成的子空间的投影。

补充讲解

特征向量解释方向

Eigenvectors explain directions

特征分解找出在线性变换下只被缩放的方向。在协方差矩阵中,这些方向对应主要风险轴。

Eigen-decomposition identifies directions that are only scaled by the transformation. In covariance matrices, these directions are principal risk axes.

SVD 是稳健默认工具

SVD is the robust default

SVD 可处理矩形矩阵和秩亏矩阵,因此常用于 PCA、最小二乘诊断和降维。

SVD works for rectangular and rank-deficient matrices, making it the preferred tool for PCA, least squares diagnostics, and dimensionality reduction.

因子模型也是分解

Factor models are decompositions

很多量化因子模型把收益拆成系统性部分和残差。矩阵分解让这种拆分的几何结构更清楚。

Many quant factor models decompose returns into systematic components and residuals. Matrix decompositions make the geometry of that split explicit.