<p><strong>内積とベクトルの直交性</strong>は線形代数の重要な概念で、機械学習における特徴量の独立性、信号処理における直交変換、統計学における無相関変数の構成など、データサイエンスの多くの場面で応用されます。</p><h4>内積と直交性の定義</h4><p>2つのベクトル $\vec{u}$, $\vec{v}$ の内積は:</p><div class='formula'>$\vec{u} \cdot \vec{v} = \sum_{i} u_i v_i
lt;/div><p>直交条件:$\vec{u} \perp \vec{v} \Leftrightarrow \vec{u} \cdot \vec{v} = 0
lt;/p><p class='step'>1. 直交条件の設定</p><p>$\vec{u} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}$ と $\vec{v} = \begin{pmatrix} a \\ b \end{pmatrix}$ が直交するとき:</p><div class='formula'>$3a + 4b = 0
lt;/div><p>これより:$3a + 4b = 0 \Rightarrow b = -\frac{3a}{4}
lt;/p><p class='step'>2. 大きさの条件</p><p>$|\vec{v}| = 5$ の条件:</p><div class='formula'>$a^2 + b^2 = 25
lt;/div><p>$b = -\frac{3a}{4}$ を代入:</p><div class='formula'>$a^2 + \left(-\frac{3a}{4}\right)^2 = 25
lt;/div><div class='formula'>$a^2 + \frac{9a^2}{16} = 25
lt;/div><div class='formula'>$\frac{16a^2 + 9a^2}{16} = 25
lt;/div><div class='formula'>$a^2 = 16 \Rightarrow a = \pm 4
lt;/div><p class='step'>3. 対応する $b$ の値</p><p><strong>$a = 4$ の場合:</strong></p><div class='formula'>$b = -\frac{3 \cdot 4}{4} = -3
lt;/div><p>ベクトル:$\begin{pmatrix} 4 \\ -3 \end{pmatrix}
lt;/p><p><strong>$a = -4$ の場合:</strong></p><div class='formula'>$b = -\frac{3 \cdot (-4)}{4} = 3
lt;/div><p>ベクトル:$\begin{pmatrix} -4 \\ 3 \end{pmatrix}
lt;/p><p class='step'>4. 検算</p><p><strong>直交性の確認:</strong></p><ul><li>$\begin{pmatrix} 3 \\ 4 \end{pmatrix} \cdot \begin{pmatrix} 4 \\ -3 \end{pmatrix} = 3 \cdot 4 + 4 \cdot (-3) = 12 - 12 = 0$ ✓</li><li>$\begin{pmatrix} 3 \\ 4 \end{pmatrix} \cdot \begin{pmatrix} -4 \\ 3 \end{pmatrix} = 3 \cdot (-4) + 4 \cdot 3 = -12 + 12 = 0$ ✓</li></ul><p><strong>大きさの確認:</strong></p><ul><li>$\left|\begin{pmatrix} 4 \\ -3 \end{pmatrix}\right| = \sqrt{4^2 + (-3)^2} = \sqrt{16 + 9} = 5$ ✓</li><li>$\left|\begin{pmatrix} -4 \\ 3 \end{pmatrix}\right| = \sqrt{(-4)^2 + 3^2} = \sqrt{16 + 9} = 5$ ✓</li></ul><p class='step'>5. 幾何学的解釈</p><p>直交ベクトルは元のベクトルを90°回転させたものです:</p><ul><li>$\begin{pmatrix} 3 \\ 4 \end{pmatrix}$ を時計回りに90°回転:$\begin{pmatrix} 4 \\ -3 \end{pmatrix}
lt;/li><li>$\begin{pmatrix} 3 \\ 4 \end{pmatrix}$ を反時計回りに90°回転:$\begin{pmatrix} -4 \\ 3 \end{pmatrix}
lt;/li></ul><div class='key-point'><div class='key-point-title'>直交ベクトルの求め方</div><p><strong>直交条件</strong>:内積 = 0 の連立方程式を解く</p><p><strong>90°回転</strong>:$(a, b) → (b, -a)$ または $(a, b) → (-b, a)
lt;/p><p><strong>正規化</strong>:大きさ条件で係数を調整</p></div>