1. 特異値分解とは?
行列 A を
$$
A = U \Sigma V^{\top}
$$
という3つの部品に分ける分解のことです。
イメージでいうと:
- V … 入力ベクトルを「どの方向に見るか」を決める回転
- Σ … その方向にどれくらい「伸ばす/縮める」かを決める倍率(特異値)
- U … 伸ばした後に「最終的にどの方向に置き直すか」を決める回転
2. 各記号の役割
(1) Σ(シグマ)
伸び縮みの倍率だけが並んでいる行列。
対角成分に「特異値」という正の数が並びます。
この数字が「Aがどれくらい引き延ばすか」を表します。
例:
$$
\Sigma =
\begin{pmatrix}
3 & 0 & 0 \
0 & 1 & 0
\end{pmatrix}
$$
この場合、「ある方向には3倍、別の方向には1倍で変わらない」ことを意味します。
(2) V(ブイ)
入力側の座標軸をどう回すかを決める行列。
入力ベクトルを「特異値を測りやすい向き」に並べ替える役割があります。
イメージ:入力を「伸ばされる方向」と「そうでない方向」に合わせるための回転マップ。
(3) U(ユー)
出力側の座標軸をどう回すかを決める行列。
Σで伸ばされたベクトルを「最終的なAの出力の向き」に戻します。
イメージ:「伸ばした後、ゴールの方向に回す仕上げの変換」。
3. 特異値分解の例題
行列
$$
A =
\begin{pmatrix}
1 & 0 & 1 \\
-1 & 1 & 0
\end{pmatrix}
$$
を特異値分解して、
$$
A = U \Sigma V^{\top}
$$
の形にせよ。
手順
1. AA^T を計算
$$
A A^{\top} =
\begin{pmatrix}
1 & 0 & 1 \\
-1 & 1 & 0
\end{pmatrix}
\begin{pmatrix}
1 & -1 \\
0 & 1 \\
1 & 0\end{pmatrix}
=
\begin{pmatrix}
2 & -1 \\
-1 & 2
\end{pmatrix}
$$
2. 固有値を求める
$$
\det
\begin{pmatrix}
2-\lambda & -1 \\
-1 & 2-\lambda
\end{pmatrix}
= (2-\lambda)^2 – 1
= \lambda^2 – 4\lambda + 3
= 0
$$
したがって固有値は
$$
\lambda_1 = 3, \quad \lambda_2 = 1
$$
3. 特異値
特異値は固有値の平方根:
$$
\sigma_1 = \sqrt{3}, \quad \sigma_2 = 1
$$
よって
$$
\Sigma =
\begin{pmatrix}
\sqrt{3} & 0 & 0 \\
0 & 1 & 0
\end{pmatrix}
$$
U の計算
AA^T の固有ベクトルを求める。
- λ = 3 のとき
$$
u_1 = \frac{1}{\sqrt{2}}
\begin{pmatrix} 1 \ -1 \end{pmatrix}
$$ - λ = 1 のとき
$$
u_2 = \frac{1}{\sqrt{2}}
\begin{pmatrix} 1 \ 1 \end{pmatrix}
$$
したがって
$$
U =
\begin{pmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
-\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}
\end{pmatrix}
$$
V の計算
まず、特異値が √3 のとき:
$$
v_1 = \frac{1}{\sigma_1} A^{\top} u_1
= \frac{1}{\sqrt{6}}
\begin{pmatrix}
2 \ -1 \ 1
\end{pmatrix}
$$
次に、特異値が 1 のとき:
$$
v_2 = \frac{1}{\sigma_2} A^{\top} u_2
= \frac{1}{\sqrt{2}}
\begin{pmatrix}
0 \ 1 \ 1
\end{pmatrix}
$$
最後に、残り1列は直交補空間から求めると:
$$
v_3 = \frac{1}{\sqrt{3}}
\begin{pmatrix}
-1 \ -1 \ 1
\end{pmatrix}
$$
よって
$$
V =
\begin{pmatrix}
\frac{2}{\sqrt{6}} & 0 & -\frac{1}{\sqrt{3}} \\
-\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{3}} \\
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{3}}
\end{pmatrix}
$$
まとめ
- 特異値行列:
$$
\Sigma =
\begin{pmatrix}
\sqrt{3} & 0 & 0 \\
0 & 1 & 0
\end{pmatrix}
$$ - 左特異ベクトル行列:
$$
U =
\begin{pmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
-\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}
\end{pmatrix}
$$ - 右特異ベクトル行列:
$$
V =
\begin{pmatrix}
\frac{2}{\sqrt{6}} & 0 & -\frac{1}{\sqrt{3}} \\
-\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{3}} \\
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{3}}
\end{pmatrix}
$$
コメント