多変量解析

主成分分析、因子分析、判別分析、クラスター分析など統計検定準1級レベルの多変量統計手法を学習します。

特異値分解に関する計算問題 レベル1

以下の$2 \times 3$行列$\mathbf{A}$の特異値分解を行う。$\mathbf{A} = \begin{pmatrix} 3 & 2 & 2 \\ -1 & 0 & 2 \end{pmatrix}$第1特異値$\sigma_1$を求めよ。小数第2位まで求めること。

解説
解答と解説を表示
<h4>特異値分解(SVD)の計算</h4><p>特異値分解は任意の実行列を$\mathbf{A} = \mathbf{U}\mathbf{\Sigma}\mathbf{V}^T$の形に分解する重要な行列分解手法です。データ分析、主成分分析、機械学習など様々な分野で活用されています。</p><h4>特異値分解の理論的基盤</h4><p class='step'><strong>Step 1: 特異値分解の定義</strong></p><p>任意の$m \times n$実行列$\mathbf{A}$は以下のように分解できます:</p><div class='formula'>$\mathbf{A} = \mathbf{U}\mathbf{\Sigma}\mathbf{V}^T
lt;/div><p>ここで:</p><ul><li>$\mathbf{U}$:$m \times m$直交行列(左特異ベクトル)</li><li>$\mathbf{\Sigma}$:$m \times n$対角行列(特異値)</li><li>$\mathbf{V}$:$n \times n$直交行列(右特異ベクトル)</li></ul><p class='step'><strong>Step 2: 与えられた行列の確認</strong></p><p>行列$\mathbf{A}$:</p><div class='formula'>$\mathbf{A} = \begin{pmatrix} 3 & 2 & 2 \\ -1 & 0 & 2 \end{pmatrix}
lt;/div><p>この行列は$2 \times 3$なので、最大で2個の特異値を持ちます。</p><p class='step'><strong>Step 3: $\mathbf{A}^T\mathbf{A}$の計算</strong></p><p>特異値は$\mathbf{A}^T\mathbf{A}$の固有値の平方根として求められます。</p><div class='formula'>$\mathbf{A}^T = \begin{pmatrix} 3 & -1 \\ 2 & 0 \\ 2 & 2 \end{pmatrix}
lt;/div><div class='formula'>$\mathbf{A}^T\mathbf{A} = \begin{pmatrix} 3 & -1 \\ 2 & 0 \\ 2 & 2 \end{pmatrix} \begin{pmatrix} 3 & 2 & 2 \\ -1 & 0 & 2 \end{pmatrix}
lt;/div><p><strong>要素ごとの計算:</strong></p><ul><li>$(1,1)$要素:$3 \times 3 + (-1) \times (-1) = 9 + 1 = 10
lt;/li><li>$(1,2)$要素:$3 \times 2 + (-1) \times 0 = 6
lt;/li><li>$(1,3)$要素:$3 \times 2 + (-1) \times 2 = 6 - 2 = 4
lt;/li><li>$(2,1)$要素:$2 \times 3 + 0 \times (-1) = 6
lt;/li><li>$(2,2)$要素:$2 \times 2 + 0 \times 0 = 4
lt;/li><li>$(2,3)$要素:$2 \times 2 + 0 \times 2 = 4
lt;/li><li>$(3,1)$要素:$2 \times 3 + 2 \times (-1) = 6 - 2 = 4
lt;/li><li>$(3,2)$要素:$2 \times 2 + 2 \times 0 = 4
lt;/li><li>$(3,3)$要素:$2 \times 2 + 2 \times 2 = 4 + 4 = 8
lt;/li></ul><div class='formula'>$\mathbf{A}^T\mathbf{A} = \begin{pmatrix} 10 & 6 & 4 \\ 6 & 4 & 4 \\ 4 & 4 & 8 \end{pmatrix}
lt;/div><p class='step'><strong>Step 4: $\mathbf{A}\mathbf{A}^T$の計算(効率的な方法)</strong></p><p>$2 \times 2$行列の固有値計算の方が簡単なので、$\mathbf{A}\mathbf{A}^T$を計算します:</p><div class='formula'>$\mathbf{A}\mathbf{A}^T = \begin{pmatrix} 3 & 2 & 2 \\ -1 & 0 & 2 \end{pmatrix} \begin{pmatrix} 3 & -1 \\ 2 & 0 \\ 2 & 2 \end{pmatrix}
lt;/div><p><strong>要素ごとの計算:</strong></p><ul><li>$(1,1)$要素:$3^2 + 2^2 + 2^2 = 9 + 4 + 4 = 17
lt;/li><li>$(1,2)$要素:$3 \times (-1) + 2 \times 0 + 2 \times 2 = -3 + 0 + 4 = 1
lt;/li><li>$(2,1)$要素:$(-1) \times 3 + 0 \times 2 + 2 \times 2 = -3 + 0 + 4 = 1
lt;/li><li>$(2,2)$要素:$(-1)^2 + 0^2 + 2^2 = 1 + 0 + 4 = 5
lt;/li></ul><div class='formula'>$\mathbf{A}\mathbf{A}^T = \begin{pmatrix} 17 & 1 \\ 1 & 5 \end{pmatrix}
lt;/div><p class='step'><strong>Step 5: 固有値の計算</strong></p><p>$2 \times 2$行列の固有値を求めるため、特性方程式を立てます:</p><div class='formula'>$\det(\mathbf{A}\mathbf{A}^T - \lambda \mathbf{I}) = 0
lt;/div><div class='formula'>$\det\begin{pmatrix} 17-\lambda & 1 \\ 1 & 5-\lambda \end{pmatrix} = 0
lt;/div><div class='formula'>$(17-\lambda)(5-\lambda) - 1 \times 1 = 0
lt;/div><div class='formula'>$85 - 17\lambda - 5\lambda + \lambda^2 - 1 = 0
lt;/div><div class='formula'>$\lambda^2 - 22\lambda + 84 = 0
lt;/div><p class='step'><strong>Step 6: 2次方程式の解</strong></p><p>2次方程式$\lambda^2 - 22\lambda + 84 = 0$を解きます:</p><div class='formula'>$\lambda = \frac{22 \pm \sqrt{22^2 - 4 \times 1 \times 84}}{2 \times 1}
lt;/div><div class='formula'>$= \frac{22 \pm \sqrt{484 - 336}}{2}
lt;/div><div class='formula'>$= \frac{22 \pm \sqrt{148}}{2}
lt;/div><div class='formula'>$= \frac{22 \pm 2\sqrt{37}}{2}
lt;/div><div class='formula'>$= 11 \pm \sqrt{37}
lt;/div><p><strong>$\sqrt{37}$の計算:</strong></p><p>$6^2 = 36$, $6.1^2 = 37.21$なので、$\sqrt{37} \approx 6.08
lt;/p><p><strong>固有値:</strong></p><ul><li>$\lambda_1 = 11 + \sqrt{37} \approx 11 + 6.08 = 17.08
lt;/li><li>$\lambda_2 = 11 - \sqrt{37} \approx 11 - 6.08 = 4.92
lt;/li></ul><p class='step'><strong>Step 7: 特異値の計算</strong></p><p>特異値は固有値の平方根:</p><div class='formula'>$\sigma_1 = \sqrt{\lambda_1} = \sqrt{17.08} \approx 4.13
lt;/div><div class='formula'>$\sigma_2 = \sqrt{\lambda_2} = \sqrt{4.92} \approx 2.22
lt;/div><p><strong>より正確な計算:</strong></p><div class='formula'>$\sigma_1 = \sqrt{11 + \sqrt{37}}
lt;/div><p>$\sqrt{37} = 6.083$とすると:</p><div class='formula'>$\sigma_1 = \sqrt{11 + 6.083} = \sqrt{17.083} = 4.12
lt;/div><div class='key-point'><div class='key-point-title'>特異値分解の性質</div><ul><li><strong>特異値の順序</strong>:$\sigma_1 \geq \sigma_2 \geq \cdots \geq 0
lt;/li><li><strong>フロベニウスノルム</strong>:$\|\mathbf{A}\|_F^2 = \sum_i \sigma_i^2
lt;/li><li><strong>作用素ノルム</strong>:$\|\mathbf{A}\|_2 = \sigma_1
lt;/li><li><strong>ランク</strong>:$\text{rank}(\mathbf{A})$は非零特異値の個数</li></ul></div><p class='step'><strong>Step 8: 検証計算</strong></p><p><strong>フロベニウスノルム:</strong></p><div class='formula'>$\|\mathbf{A}\|_F^2 = 3^2 + 2^2 + 2^2 + (-1)^2 + 0^2 + 2^2 = 9 + 4 + 4 + 1 + 0 + 4 = 22
lt;/div><p><strong>特異値による確認:</strong></p><div class='formula'>$\sigma_1^2 + \sigma_2^2 = 17.08 + 4.92 = 22.00$ ✓</div><p class='step'><strong>Step 9: 幾何学的解釈</strong></p><p>第1特異値$\sigma_1 = 4.12$は:</p><ul><li>行列$\mathbf{A}$の最大の「伸縮係数」</li><li>任意の単位ベクトルに$\mathbf{A}$を作用させたときの最大出力長</li><li>データの主要な変動方向の強度</li></ul><h4>特異値分解の応用</h4><p class='step'><strong>Step 10: 実用的応用</strong></p><ul><li><strong>主成分分析</strong>:データ行列の特異値分解</li><li><strong>画像圧縮</strong>:低ランク近似による圧縮</li><li><strong>推薦システム</strong>:協調フィルタリング</li><li><strong>自然言語処理</strong>:潜在的意味解析</li><li><strong>信号処理</strong>:ノイズ除去、特徴抽出</li></ul><p><strong>低ランク近似:</strong></p><p>第1特異値のみを用いた近似:</p><div class='formula'>$\mathbf{A}_1 = \sigma_1 \mathbf{u}_1 \mathbf{v}_1^T
lt;/div><p>これは$\mathbf{A}$の最良のランク1近似となります。</p><div class='key-point'><h4>計算結果のまとめ</h4><table class='table table-bordered'><tr><th>項目</th><th>値</th><th>意味</th></tr><tr><td><strong>第1特異値</strong></td><td>$\sigma_1 = 4.12
lt;/td><td>最大の伸縮係数</td></tr><tr><td><strong>第2特異値</strong></td><td>$\sigma_2 = 2.22
lt;/td><td>2番目の伸縮係数</td></tr><tr><td><strong>条件数</strong></td><td>$\kappa = \sigma_1/\sigma_2 = 1.86
lt;/td><td>数値的安定性</td></tr><tr><td><strong>行列のランク</strong></td><td>2</td><td>線形独立な行・列の数</td></tr></table></div><p>したがって、第1特異値は$\sigma_1 = 4.12$です。</p>
問題 1/10
カテゴリ一覧に戻る