東京大学 情報理工学系研究科 コンピュータ科学専攻 2021年2月実施 問題4
Author
zephyr
Description
Let n n n and d d d (n < d n < d n < d ) be natural numbers and R \mathbb{R} R be the set of real numbers. Denote by ⊤ \top ⊤ the transposition operator of a vector and a matrix. Define the inner product of two column vectors x 1 , x 2 ∈ R d \mathbf{x_1}, \mathbf{x_2} \in \mathbb{R}^d x 1 , x 2 ∈ R d as x 1 ⊤ x 2 ∈ R \mathbf{x_1}^\top \mathbf{x_2} \in \mathbb{R} x 1 ⊤ x 2 ∈ R . Let w = ( w 1 , w 2 , … , w d ) ⊤ ∈ R d \mathbf{w} = (w_1, w_2, \ldots, w_d)^\top \in \mathbb{R}^d w = ( w 1 , w 2 , … , w d ) ⊤ ∈ R d be a d d d -dimensional column vector, X ∈ R n × d \mathbf{X} \in \mathbb{R}^{n \times d} X ∈ R n × d an n × d n \times d n × d matrix where X X ⊤ \mathbf{X} \mathbf{X}^\top X X ⊤ is invertible, and y ∈ R n \mathbf{y} \in \mathbb{R}^n y ∈ R n an n n n -dimensional column vector. Consider solving the following optimization problem by using the Lagrange multipliers method:
min w 1 2 ∥ w ∥ 2 subject to y = X w , \min_{\mathbf{w}} \frac{1}{2} \|\mathbf{w}\|^2 \quad \text{subject to} \quad \mathbf{y} = \mathbf{Xw}, w min 2 1 ∥ w ∥ 2 subject to y = Xw ,
where ∥ w ∥ = w 1 2 + w 2 2 + … + w d 2 \|\mathbf{w}\| = \sqrt{w_1^2 + w_2^2 + \ldots + w_d^2} ∥ w ∥ = w 1 2 + w 2 2 + … + w d 2 . The Lagrange function is given by
L ( w , μ ) = 1 2 ∥ w ∥ 2 + μ ⊤ ( y − X w ) , L(\mathbf{w}, \boldsymbol{\mu}) = \frac{1}{2} \|\mathbf{w}\|^2 + \boldsymbol{\mu}^\top (\mathbf{y} - \mathbf{Xw}), L ( w , μ ) = 2 1 ∥ w ∥ 2 + μ ⊤ ( y − Xw ) ,
where μ ∈ R n \boldsymbol{\mu} \in \mathbb{R}^n μ ∈ R n is the Lagrange multipliers.
Let λ 1 , λ 2 , … , λ n \lambda_1, \lambda_2, \ldots, \lambda_n λ 1 , λ 2 , … , λ n be positive real values. The sets of column vectors { u i ∈ R n } i = 1 n \{\mathbf{u_i} \in \mathbb{R}^n\}_{i=1}^{n} { u i ∈ R n } i = 1 n and { v j ∈ R d } j = 1 d \{\mathbf{v_j} \in \mathbb{R}^d\}_{j=1}^{d} { v j ∈ R d } j = 1 d form an orthonormal basis of R n \mathbb{R}^n R n and R d \mathbb{R}^d R d , respectively; that is, they are all unit vectors and orthogonal to each other. Suppose that the singular value decomposition of X \mathbf{X} X is
X = U Λ V ⊤ , \mathbf{X} = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top, X = UΛ V ⊤ ,
where U \mathbf{U} U is an n × n n \times n n × n matrix, Λ \mathbf{\Lambda} Λ is an n × d n \times d n × d matrix, and V \mathbf{V} V is a d × d d \times d d × d matrix given by
U = ( u 1 , u 2 , … , u n ) , Λ = ( λ 1 0 ⋯ 0 0 ⋯ 0 0 λ 2 ⋯ 0 0 0 ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 ⋯ λ n 0 ⋯ 0 ) , V ⊤ = ( v 1 ⊤ v 2 ⊤ ⋮ v d ⊤ ) . \mathbf{U} = (\mathbf{u_1}, \mathbf{u_2}, \ldots, \mathbf{u_n}), \quad \mathbf{\Lambda} = \begin{pmatrix}
\lambda_1 & 0 & \cdots & 0 & 0 & \cdots & 0 \\
0 & \lambda_2 & \cdots & 0 & 0 & & 0\\
\vdots & \vdots & \ddots & \vdots & \vdots & & \vdots \\
0 & 0 & \cdots & \lambda_n & 0 & \cdots & 0\\
\end{pmatrix}, \quad \mathbf{V}^\top = \begin{pmatrix}
\mathbf{v_1}^\top \\
\mathbf{v_2}^\top \\
\vdots \\
\mathbf{v_d}^\top \\
\end{pmatrix}. U = ( u 1 , u 2 , … , u n ) , Λ = λ 1 0 ⋮ 0 0 λ 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n 0 0 ⋮ 0 ⋯ ⋯ 0 0 ⋮ 0 , V ⊤ = v 1 ⊤ v 2 ⊤ ⋮ v d ⊤ .
Moreover, define
X − = V ( Λ − ) ⊤ U ⊤ , where Λ − = ( 1 λ 1 0 ⋯ 0 0 ⋯ 0 0 1 λ 2 ⋯ 0 0 0 ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 ⋯ 1 λ n 0 ⋯ 0 ) . \mathbf{X^-} = \mathbf{V} (\mathbf{\Lambda}^-)^{\top} \mathbf{U}^\top, \quad \text{where} \quad \mathbf{\Lambda}^- = \begin{pmatrix}
\frac{1}{\lambda_1} & 0 & \cdots & 0 & 0 & \cdots & 0 \\
0 & \frac{1}{\lambda_2} & \cdots & 0 & 0 & & 0\\
\vdots & \vdots & \ddots & \vdots & \vdots & & \vdots \\
0 & 0 & \cdots & \frac{1}{\lambda_n} & 0 & \cdots & 0\\
\end{pmatrix}. X − = V ( Λ − ) ⊤ U ⊤ , where Λ − = λ 1 1 0 ⋮ 0 0 λ 2 1 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n 1 0 0 ⋮ 0 ⋯ ⋯ 0 0 ⋮ 0 .
Answer the following questions. Describe not only an answer but also the derivation process.
(1) Express X X − X \mathbf{XX^-X} X X − X using only X \mathbf{X} X .
(2) Express X X ⊤ \mathbf{XX^\top} X X ⊤ using only U \mathbf{U} U and λ i \lambda_i λ i (i = 1 , … , n i = 1, \ldots, n i = 1 , … , n ).
(3) Suppose we wish to express the stationary points of L ( w , μ ) L(\mathbf{w}, \boldsymbol{\mu}) L ( w , μ ) in the form of w = A y \mathbf{w} = \mathbf{A} \mathbf{y} w = Ay and μ = B y \boldsymbol{\mu} = \mathbf{B} \mathbf{y} μ = By . Express the matrices A ∈ R d × n \mathbf{A} \in \mathbb{R}^{d \times n} A ∈ R d × n and B ∈ R n × n \mathbf{B} \in \mathbb{R}^{n \times n} B ∈ R n × n using only X \mathbf{X} X .
(4) Express A \mathbf{A} A in question (3) using only X − \mathbf{X^-} X − .
设 n n n 和 d d d (n < d n < d n < d ) 为自然数,R \mathbb{R} R 为实数集。记 ⊤ \top ⊤ 为向量和矩阵的转置算子。定义两个列向量 x 1 , x 2 ∈ R d \mathbf{x_1}, \mathbf{x_2} \in \mathbb{R}^d x 1 , x 2 ∈ R d 的内积为 x 1 ⊤ x 2 ∈ R \mathbf{x_1}^\top \mathbf{x_2} \in \mathbb{R} x 1 ⊤ x 2 ∈ R 。设 w = ( w 1 , w 2 , … , w d ) ⊤ ∈ R d \mathbf{w} = (w_1, w_2, \ldots, w_d)^\top \in \mathbb{R}^d w = ( w 1 , w 2 , … , w d ) ⊤ ∈ R d 为一个 d d d 维列向量,X ∈ R n × d \mathbf{X} \in \mathbb{R}^{n \times d} X ∈ R n × d 是一个 n × d n \times d n × d 矩阵,其中 X X ⊤ \mathbf{X} \mathbf{X}^\top X X ⊤ 可逆,y ∈ R n \mathbf{y} \in \mathbb{R}^n y ∈ R n 是一个 n n n 维列向量。考虑使用拉格朗日乘子法求解以下优化问题:
min w 1 2 ∥ w ∥ 2 subject to y = X w , \min_{\mathbf{w}} \frac{1}{2} \|\mathbf{w}\|^2 \quad \text{subject to} \quad \mathbf{y} = \mathbf{Xw}, w min 2 1 ∥ w ∥ 2 subject to y = Xw ,
其中 ∥ w ∥ = w 1 2 + w 2 2 + … + w d 2 \|\mathbf{w}\| = \sqrt{w_1^2 + w_2^2 + \ldots + w_d^2} ∥ w ∥ = w 1 2 + w 2 2 + … + w d 2 。拉格朗日函数为
L ( w , μ ) = 1 2 ∥ w ∥ 2 + μ ⊤ ( y − X w ) , L(\mathbf{w}, \boldsymbol{\mu}) = \frac{1}{2} \|\mathbf{w}\|^2 + \boldsymbol{\mu}^\top (\mathbf{y} - \mathbf{Xw}), L ( w , μ ) = 2 1 ∥ w ∥ 2 + μ ⊤ ( y − Xw ) ,
其中 μ ∈ R n \boldsymbol{\mu} \in \mathbb{R}^n μ ∈ R n 是拉格朗日乘子。
设 λ 1 , λ 2 , … , λ n \lambda_1, \lambda_2, \ldots, \lambda_n λ 1 , λ 2 , … , λ n 为正实数。列向量集合 { u i ∈ R n } i = 1 n \{\mathbf{u_i} \in \mathbb{R}^n\}_{i=1}^{n} { u i ∈ R n } i = 1 n 和 { v j ∈ R d } j = 1 d \{\mathbf{v_j} \in \mathbb{R}^d\}_{j=1}^{d} { v j ∈ R d } j = 1 d 分别构成 R n \mathbb{R}^n R n 和 R d \mathbb{R}^d R d 的正交基;即它们都是单位向量且彼此正交。假设 X \mathbf{X} X 的奇异值分解为
X = U Λ V ⊤ , \mathbf{X} = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top, X = UΛ V ⊤ ,
其中 U \mathbf{U} U 是一个 n × n n \times n n × n 矩阵,Λ \mathbf{\Lambda} Λ 是一个 n × d n \times d n × d 矩阵,V \mathbf{V} V 是一个 d × d d \times d d × d 矩阵,给出如下
U = ( u 1 , u 2 , … , u n ) , Λ = ( λ 1 0 ⋯ 0 0 ⋯ 0 0 λ 2 ⋯ 0 0 0 ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 ⋯ λ n 0 ⋯ 0 ) , V ⊤ = ( v 1 ⊤ v 2 ⊤ ⋮ v d ⊤ ) . \mathbf{U} = (\mathbf{u_1}, \mathbf{u_2}, \ldots, \mathbf{u_n}), \quad \mathbf{\Lambda} = \begin{pmatrix}
\lambda_1 & 0 & \cdots & 0 & 0 & \cdots & 0 \\
0 & \lambda_2 & \cdots & 0 & 0 & & 0\\
\vdots & \vdots & \ddots & \vdots & \vdots & & \vdots \\
0 & 0 & \cdots & \lambda_n & 0 & \cdots & 0\\
\end{pmatrix}, \quad \mathbf{V}^\top = \begin{pmatrix}
\mathbf{v_1}^\top \\
\mathbf{v_2}^\top \\
\vdots \\
\mathbf{v_d}^\top \\
\end{pmatrix}. U = ( u 1 , u 2 , … , u n ) , Λ = λ 1 0 ⋮ 0 0 λ 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n 0 0 ⋮ 0 ⋯ ⋯ 0 0 ⋮ 0 , V ⊤ = v 1 ⊤ v 2 ⊤ ⋮ v d ⊤ .
此外,定义
X − = V ( Λ − ) ⊤ U ⊤ , where Λ − = ( 1 λ 1 0 ⋯ 0 0 ⋯ 0 0 1 λ 2 ⋯ 0 0 0 ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 ⋯ 1 λ n 0 ⋯ 0 ) . \mathbf{X^-} = \mathbf{V} (\mathbf{\Lambda}^-)^{\top} \mathbf{U}^\top, \quad \text{where} \quad \mathbf{\Lambda}^- = \begin{pmatrix}
\frac{1}{\lambda_1} & 0 & \cdots & 0 & 0 & \cdots & 0 \\
0 & \frac{1}{\lambda_2} & \cdots & 0 & 0 & & 0\\
\vdots & \vdots & \ddots & \vdots & \vdots & & \vdots \\
0 & 0 & \cdots & \frac{1}{\lambda_n} & 0 & \cdots & 0\\
\end{pmatrix}. X − = V ( Λ − ) ⊤ U ⊤ , where Λ − = λ 1 1 0 ⋮ 0 0 λ 2 1 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n 1 0 0 ⋮ 0 ⋯ ⋯ 0 0 ⋮ 0 .
回答以下问题。描述答案的同时也要给出推导过程。
(1) 使用仅 X \mathbf{X} X 表示 X X − X \mathbf{XX^-X} X X − X 。
(2) 使用仅 U \mathbf{U} U 和 λ i \lambda_i λ i (i = 1 , … , n i = 1, \ldots, n i = 1 , … , n ) 表示 X X ⊤ \mathbf{XX^\top} X X ⊤ 。
(3) 假设我们希望用 w = A y \mathbf{w} = \mathbf{A} \mathbf{y} w = Ay 和 μ = B y \boldsymbol{\mu} = \mathbf{B} \mathbf{y} μ = By 表示 L ( w , μ ) L(\mathbf{w}, \boldsymbol{\mu}) L ( w , μ ) 的驻点。使用仅 X \mathbf{X} X 表示矩阵 A ∈ R d × n \mathbf{A} \in \mathbb{R}^{d \times n} A ∈ R d × n 和 B ∈ R n × n \mathbf{B} \in \mathbb{R}^{n \times n} B ∈ R n × n 。
(4) 使用仅 X − \mathbf{X^-} X − 表示问题 (3) 中的 A \mathbf{A} A 。
题目描述
设自然数 n < d n<d n < d ,
w ∈ R d \boldsymbol{w}\in\mathbb R^d w ∈ R d 、
X ∈ R n × d X\in\mathbb R^{n\times d} X ∈ R n × d 、
y ∈ R n \boldsymbol{y}\in\mathbb R^n y ∈ R n ,并假定 X X T XX^{\mathsf T} X X T 可逆。用拉格朗日乘子法求解
min w 1 2 ∥ w ∥ 2 满足 y = X w , \min_{\boldsymbol{w}}\frac12\|\boldsymbol{w}\|^2
\quad\text{满足}\quad
\boldsymbol{y}=X\boldsymbol{w}, w min 2 1 ∥ w ∥ 2 满足 y = X w ,
其拉格朗日函数为
L ( w , μ ) = 1 2 ∥ w ∥ 2 + μ T ( y − X w ) , μ ∈ R n . L(\boldsymbol{w},\boldsymbol{\mu})
=\frac12\|\boldsymbol{w}\|^2
+\boldsymbol{\mu}^{\mathsf T}
(\boldsymbol{y}-X\boldsymbol{w}),
\qquad
\boldsymbol{\mu}\in\mathbb R^n. L ( w , μ ) = 2 1 ∥ w ∥ 2 + μ T ( y − X w ) , μ ∈ R n .
设 X X X 的奇异值分解为
X = U Λ V T X=U\Lambda V^{\mathsf T} X = U Λ V T ,其中 U , V U,V U , V 的列分别构成
R n , R d \mathbb R^n,\mathbb R^d R n , R d 的标准正交基,
Λ ∈ R n × d \Lambda\in\mathbb R^{n\times d} Λ ∈ R n × d 的前 n n n 个对角元为正数
λ 1 , … , λ n \lambda_1,\ldots,\lambda_n λ 1 , … , λ n ,其余为零。将这些非零奇异值取倒数形成
Λ − \Lambda^- Λ − ,并定义
X − = V ( Λ − ) T U T . X^-=V(\Lambda^-)^{\mathsf T}U^{\mathsf T}. X − = V ( Λ − ) T U T .
各问除答案外还须给出推导。
(1)仅用 X X X 表示 X X − X XX^-X X X − X 。
(2)仅用 U U U 和 λ i ( i = 1 , … , n ) \lambda_i\ (i=1,\ldots,n) λ i ( i = 1 , … , n ) 表示
X X T XX^{\mathsf T} X X T 。
(3)将 L L L 的驻点写成
w = A y \boldsymbol{w}=A\boldsymbol{y} w = A y 、
μ = B y \boldsymbol{\mu}=B\boldsymbol{y} μ = B y ,仅用 X X X 表示
A ∈ R d × n A\in\mathbb R^{d\times n} A ∈ R d × n 与
B ∈ R n × n B\in\mathbb R^{n\times n} B ∈ R n × n 。
(4)仅用 X − X^- X − 表示第(3)问中的 A A A 。
Kai
(1)
Given:
X = U Λ V ⊤ , \mathbf{X} = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top, X = UΛ V ⊤ ,
X − = V Λ − U ⊤ , \mathbf{X^-} = \mathbf{V} \mathbf{\Lambda}^- \mathbf{U}^\top, X − = V Λ − U ⊤ ,
we can write:
X − = V ( Λ − ) U ⊤ , \mathbf{X^-} = \mathbf{V} (\mathbf{\Lambda}^-) \mathbf{U}^\top, X − = V ( Λ − ) U ⊤ ,
where
Λ − = ( 1 λ 1 0 ⋯ 0 0 ⋯ 0 0 1 λ 2 ⋯ 0 0 0 ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 ⋯ 1 λ n 0 ⋯ 0 ) . \mathbf{\Lambda}^- = \begin{pmatrix}
\frac{1}{\lambda_1} & 0 & \cdots & 0 & 0 & \cdots & 0 \\
0 & \frac{1}{\lambda_2} & \cdots & 0 & 0 & & 0\\
\vdots & \vdots & \ddots & \vdots & \vdots & & \vdots \\
0 & 0 & \cdots & \frac{1}{\lambda_n} & 0 & \cdots & 0\\
\end{pmatrix}. Λ − = λ 1 1 0 ⋮ 0 0 λ 2 1 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n 1 0 0 ⋮ 0 ⋯ ⋯ 0 0 ⋮ 0 .
To find X X − X \mathbf{XX^-X} X X − X :
X X − X = ( U Λ V ⊤ ) ( V Λ − U ⊤ ) ( U Λ V ⊤ ) . \mathbf{XX^-X} = (\mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top)(\mathbf{V} \mathbf{\Lambda}^- \mathbf{U}^\top)(\mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top). X X − X = ( UΛ V ⊤ ) ( V Λ − U ⊤ ) ( UΛ V ⊤ ) .
Notice:
V ⊤ V = I d , U ⊤ U = I n , \mathbf{V}^\top \mathbf{V} = \mathbf{I}_d, \quad \mathbf{U}^\top \mathbf{U} = \mathbf{I}_n, V ⊤ V = I d , U ⊤ U = I n ,
therefore:
X X − X = U Λ ( V ⊤ V ) ( Λ − ) U ⊤ U Λ V ⊤ = U Λ ( Λ − ) Λ V ⊤ = U Λ I n Λ V ⊤ = U Λ Λ V ⊤ = X . \mathbf{XX^-X} = \mathbf{U} \mathbf{\Lambda} (\mathbf{V}^\top \mathbf{V}) (\mathbf{\Lambda}^-) \mathbf{U}^\top \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top = \mathbf{U} \mathbf{\Lambda} (\mathbf{\Lambda}^-) \mathbf{\Lambda} \mathbf{V}^\top = \mathbf{U} \mathbf{\Lambda} \mathbf{I}_n \mathbf{\Lambda} \mathbf{V}^\top = \mathbf{U} \mathbf{\Lambda} \mathbf{\Lambda} \mathbf{V}^\top = \mathbf{X}. X X − X = UΛ ( V ⊤ V ) ( Λ − ) U ⊤ UΛ V ⊤ = UΛ ( Λ − ) Λ V ⊤ = UΛ I n Λ V ⊤ = UΛΛ V ⊤ = X .
Thus,
X X − X = X . \boxed{\mathbf{XX^-X} = \mathbf{X}}. X X − X = X .
(2)
Given:
X = U Λ V ⊤ , \mathbf{X} = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top, X = UΛ V ⊤ ,
we have:
X X ⊤ = ( U Λ V ⊤ ) ( V Λ ⊤ U ⊤ ) = U Λ Λ ⊤ U ⊤ . \mathbf{XX^\top} = (\mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top)(\mathbf{V} \mathbf{\Lambda}^\top \mathbf{U}^\top) = \mathbf{U} \mathbf{\Lambda} \mathbf{\Lambda}^\top \mathbf{U}^\top. X X ⊤ = ( UΛ V ⊤ ) ( V Λ ⊤ U ⊤ ) = UΛ Λ ⊤ U ⊤ .
Since Λ \mathbf{\Lambda} Λ is an n × d n \times d n × d matrix with singular values λ 1 , λ 2 , … , λ n \lambda_1, \lambda_2, \ldots, \lambda_n λ 1 , λ 2 , … , λ n on the diagonal, Λ Λ ⊤ \mathbf{\Lambda} \mathbf{\Lambda}^\top Λ Λ ⊤ is an n × n n \times n n × n diagonal matrix:
Λ Λ ⊤ = d i a g ( λ 1 2 , λ 2 2 , … , λ n 2 ) . \mathbf{\Lambda} \mathbf{\Lambda}^\top = \mathrm{diag}(\lambda_1^2, \lambda_2^2, \ldots, \lambda_n^2). Λ Λ ⊤ = diag ( λ 1 2 , λ 2 2 , … , λ n 2 ) .
Therefore,
X X ⊤ = U ( λ 1 2 0 ⋯ 0 0 λ 2 2 ⋯ 0 0 0 ⋱ 0 0 0 ⋯ λ n 2 ) U ⊤ . \mathbf{XX^\top} = \mathbf{U} \begin{pmatrix}
\lambda_1^2 & 0 & \cdots & 0 \\
0 & \lambda_2^2 & \cdots & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & \cdots & \lambda_n^2 \\
\end{pmatrix} \mathbf{U}^\top. X X ⊤ = U λ 1 2 0 0 0 0 λ 2 2 0 0 ⋯ ⋯ ⋱ ⋯ 0 0 0 λ n 2 U ⊤ .
Thus,
X X ⊤ = U d i a g ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤ . \boxed{\mathbf{XX^\top} = \mathbf{U} \mathrm{diag}(\lambda_1^2, \lambda_2^2, \ldots, \lambda_n^2) \mathbf{U}^\top}. X X ⊤ = U diag ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤ .
(3)
To solve the optimization problem using Lagrange multipliers:
L ( w , μ ) = 1 2 ∥ w ∥ 2 + μ ⊤ ( y − X w ) , L(\mathbf{w}, \boldsymbol{\mu}) = \frac{1}{2} \|\mathbf{w}\|^2 + \boldsymbol{\mu}^\top (\mathbf{y} - \mathbf{Xw}), L ( w , μ ) = 2 1 ∥ w ∥ 2 + μ ⊤ ( y − Xw ) ,
we need to find w \mathbf{w} w and μ \boldsymbol{\mu} μ such that:
∂ L ∂ w = 0 and ∂ L ∂ μ = 0. \frac{\partial L}{\partial \mathbf{w}} = 0 \quad \text{and} \quad \frac{\partial L}{\partial \boldsymbol{\mu}} = 0. ∂ w ∂ L = 0 and ∂ μ ∂ L = 0.
First, compute ∂ L ∂ w \frac{\partial L}{\partial \mathbf{w}} ∂ w ∂ L :
∂ L ∂ w = w − X ⊤ μ = 0 ⟹ w = X ⊤ μ . \frac{\partial L}{\partial \mathbf{w}} = \mathbf{w} - \mathbf{X}^\top \boldsymbol{\mu} = 0 \implies \mathbf{w} = \mathbf{X}^\top \boldsymbol{\mu}. ∂ w ∂ L = w − X ⊤ μ = 0 ⟹ w = X ⊤ μ .
Next, compute ∂ L ∂ μ \frac{\partial L}{\partial \boldsymbol{\mu}} ∂ μ ∂ L :
∂ L ∂ μ = y − X w = 0 ⟹ y = X w . \frac{\partial L}{\partial \boldsymbol{\mu}} = \mathbf{y} - \mathbf{Xw} = 0 \implies \mathbf{y} = \mathbf{Xw}. ∂ μ ∂ L = y − Xw = 0 ⟹ y = Xw .
Substituting w = X ⊤ μ \mathbf{w} = \mathbf{X}^\top \boldsymbol{\mu} w = X ⊤ μ into y = X w \mathbf{y} = \mathbf{Xw} y = Xw :
y = X ( X ⊤ μ ) ⟹ y = ( X X ⊤ ) μ . \mathbf{y} = \mathbf{X} (\mathbf{X}^\top \boldsymbol{\mu}) \implies \mathbf{y} = (\mathbf{X} \mathbf{X}^\top) \boldsymbol{\mu}. y = X ( X ⊤ μ ) ⟹ y = ( X X ⊤ ) μ .
Since X X ⊤ \mathbf{X} \mathbf{X}^\top X X ⊤ is invertible,
μ = ( X X ⊤ ) − 1 y . \boldsymbol{\mu} = (\mathbf{X} \mathbf{X}^\top)^{-1} \mathbf{y}. μ = ( X X ⊤ ) − 1 y .
Then,
w = X ⊤ μ = X ⊤ ( X X ⊤ ) − 1 y . \mathbf{w} = \mathbf{X}^\top \boldsymbol{\mu} = \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1} \mathbf{y}. w = X ⊤ μ = X ⊤ ( X X ⊤ ) − 1 y .
Therefore,
A = X ⊤ ( X X ⊤ ) − 1 , B = ( X X ⊤ ) − 1 . \mathbf{A} = \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1}, \quad \mathbf{B} = (\mathbf{X} \mathbf{X}^\top)^{-1}. A = X ⊤ ( X X ⊤ ) − 1 , B = ( X X ⊤ ) − 1 .
Thus,
w = X ⊤ ( X X ⊤ ) − 1 y , μ = ( X X ⊤ ) − 1 y . \boxed{\mathbf{w} = \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1} \mathbf{y}, \quad \boldsymbol{\mu} = (\mathbf{X} \mathbf{X}^\top)^{-1} \mathbf{y}}. w = X ⊤ ( X X ⊤ ) − 1 y , μ = ( X X ⊤ ) − 1 y .
(4)
From question 3, we have:
A = X ⊤ ( X X ⊤ ) − 1 . \mathbf{A} = \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1}. A = X ⊤ ( X X ⊤ ) − 1 .
Using X − \mathbf{X^-} X − :
X − = V Λ − U ⊤ , \mathbf{X^-} = \mathbf{V} \mathbf{\Lambda}^- \mathbf{U}^\top, X − = V Λ − U ⊤ ,
we know:
X X − = U Λ V ⊤ V Λ − U ⊤ = U Λ Λ − U ⊤ = U I n U ⊤ = I n , \mathbf{X} \mathbf{X}^- = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top \mathbf{V} \mathbf{\Lambda}^- \mathbf{U}^\top = \mathbf{U} \mathbf{\Lambda} \mathbf{\Lambda}^-\mathbf{U}^\top = \mathbf{U} \mathbf{I}_n \mathbf{U}^\top = \mathbf{I}_n, X X − = UΛ V ⊤ V Λ − U ⊤ = UΛ Λ − U ⊤ = U I n U ⊤ = I n ,
Therefore:
X ⊤ ( X X ⊤ ) − 1 = X − . \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1} = \mathbf{X^-}. X ⊤ ( X X ⊤ ) − 1 = X − .
Another way to see this is to use the given SVD of X \mathbf{X} X and X X ⊤ \mathbf{X}\mathbf{X}^\top X X ⊤ from Question 2:
X = U Λ V ⊤ , \mathbf{X} = \mathbf{U} \mathbf{\Lambda} \mathbf{V}^\top, X = UΛ V ⊤ ,
X X ⊤ = U d i a g ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤ \mathbf{X}\mathbf{X}^\top = \mathbf{U} \mathrm{diag}(\lambda_1^2, \lambda_2^2, \ldots, \lambda_n^2) \mathbf{U}^\top X X ⊤ = U diag ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤
Then,
A = X ⊤ ( X X ⊤ ) − 1 \mathbf{A} = \mathbf{X}^\top (\mathbf{X} \mathbf{X}^\top)^{-1} A = X ⊤ ( X X ⊤ ) − 1
= V Λ ⊤ U ⊤ ( U d i a g ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤ ) − 1 = \mathbf{V} \mathbf{\Lambda}^\top \mathbf{U}^\top (\mathbf{U} \mathrm{diag}(\lambda_1^2, \lambda_2^2, \ldots, \lambda_n^2) \mathbf{U}^\top)^{-1} = V Λ ⊤ U ⊤ ( U diag ( λ 1 2 , λ 2 2 , … , λ n 2 ) U ⊤ ) − 1
= V Λ ⊤ U ⊤ U d i a g ( λ 1 − 2 , λ 2 − 2 , … , λ n − 2 ) U ⊤ = \mathbf{V} \mathbf{\Lambda}^\top \mathbf{U}^\top \mathbf{U} \mathrm{diag}(\lambda_1^{-2}, \lambda_2^{-2}, \ldots, \lambda_n^{-2}) \mathbf{U}^\top = V Λ ⊤ U ⊤ U diag ( λ 1 − 2 , λ 2 − 2 , … , λ n − 2 ) U ⊤
= V Λ ⊤ d i a g ( λ 1 − 2 , λ 2 − 2 , … , λ n − 2 ) U ⊤ = \mathbf{V} \mathbf{\Lambda}^\top \mathrm{diag}(\lambda_1^{-2}, \lambda_2^{-2}, \ldots, \lambda_n^{-2}) \mathbf{U}^\top = V Λ ⊤ diag ( λ 1 − 2 , λ 2 − 2 , … , λ n − 2 ) U ⊤
= V ( λ 1 0 ⋯ 0 0 λ 2 ⋯ 0 0 0 ⋱ 0 0 0 ⋯ λ n 0 0 ⋯ 0 ⋮ ⋮ ⋮ 0 0 ⋯ 0 ) ( λ 1 − 2 0 ⋯ 0 0 λ 2 − 2 ⋯ 0 0 0 ⋱ 0 0 0 ⋯ λ n − 2 ) U ⊤ = \mathbf{V} \begin{pmatrix}
\lambda_1 & 0 & \cdots & 0 \\
0 & \lambda_2 & \cdots & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & \cdots & \lambda_n \\
0 & 0 & \cdots & 0 \\
\vdots & \vdots & & \vdots \\
0 & 0 & \cdots & 0
\end{pmatrix} \begin{pmatrix}
\lambda_1^{-2} & 0 & \cdots & 0 \\
0 & \lambda_2^{-2} & \cdots & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & \cdots & \lambda_n^{-2} \\
\end{pmatrix} \mathbf{U}^\top = V λ 1 0 0 0 0 ⋮ 0 0 λ 2 0 0 0 ⋮ 0 ⋯ ⋯ ⋱ ⋯ ⋯ ⋯ 0 0 0 λ n 0 ⋮ 0 λ 1 − 2 0 0 0 0 λ 2 − 2 0 0 ⋯ ⋯ ⋱ ⋯ 0 0 0 λ n − 2 U ⊤
= V ( λ 1 − 1 0 ⋯ 0 0 λ 2 − 1 ⋯ 0 0 0 ⋱ 0 0 0 ⋯ λ n − 1 0 0 ⋯ 0 ⋮ ⋮ ⋮ 0 0 ⋯ 0 ) U ⊤ = X − . = \mathbf{V} \begin{pmatrix}
\lambda_1^{-1} & 0 & \cdots & 0 \\
0 & \lambda_2^{-1} & \cdots & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & \cdots & \lambda_n^{-1} \\
0 & 0 & \cdots & 0 \\
\vdots & \vdots & & \vdots \\
0 & 0 & \cdots & 0
\end{pmatrix} \mathbf{U}^\top
= \mathbf{X^-}. = V λ 1 − 1 0 0 0 0 ⋮ 0 0 λ 2 − 1 0 0 0 ⋮ 0 ⋯ ⋯ ⋱ ⋯ ⋯ ⋯ 0 0 0 λ n − 1 0 ⋮ 0 U ⊤ = X − .
Thus,
A = X − . \boxed{\mathbf{A} = \mathbf{X^-}}. A = X − .
Knowledge
最优化 奇异值分解 线性代数 拉格朗日乘数法
难点思路
这道题目涉及多个知识点的综合运用,特别是拉格朗日乘数法和奇异值分解的结合使用。重点在于理解矩阵运算和变换的基本性质。
解题技巧和信息
拉格朗日乘数法:在求解带有约束的最优化问题时非常有用。
奇异值分解:帮助简化矩阵运算,特别是对于逆矩阵和伪逆矩阵的计算。
重点词汇
inner product 内积
transpose 转置
Lagrange multipliers 拉格朗日乘数
singular value decomposition 奇异值分解
orthonormal basis 正交归一基
参考资料
《线性代数及其应用》David C. Lay,第四章:奇异值分解
《最优化理论》Edwin K. P. Chong and Stanislaw H. Zak,第三章:拉格朗日乘数法