<p><strong>行列の積</strong>は線形代数の基本演算で、データサイエンスにおけるデータ変換、機械学習における重み行列の計算、画像処理における変換行列など、あらゆる場面で使用される重要な操作です。</p><h4>行列の積の定義</h4><p>$(m \times n)$ 行列 $A$ と $(n \times p)$ 行列 $B$ の積 $AB$ は $(m \times p)$ 行列となり、その $(i,j)$ 成分は:</p><div class='formula'>$(AB)_{ij} = \sum_{k=1}^{n} A_{ik} B_{kj}
lt;/div><p class='step'>1. 行列の積の計算可能性の確認</p><p>行列 $A$:$2 \times 2$ 行列</p><p>行列 $B$:$2 \times 2$ 行列</p><p>$A$ の列数 = $B$ の行数 = 2 なので、積 $AB$ は計算可能で、結果は $2 \times 2$ 行列になります。</p><p class='step'>2. $(1,1)$ 成分の計算</p><div class='formula'>$(AB)_{11} = A_{11} \cdot B_{11} + A_{12} \cdot B_{21} = 2 \cdot 1 + 1 \cdot (-1) = 2 - 1 = 1
lt;/div><p class='step'>3. $(1,2)$ 成分の計算</p><div class='formula'>$(AB)_{12} = A_{11} \cdot B_{12} + A_{12} \cdot B_{22} = 2 \cdot 2 + 1 \cdot 3 = 4 + 3 = 7
lt;/div><p class='step'>4. $(2,1)$ 成分の計算</p><div class='formula'>$(AB)_{21} = A_{21} \cdot B_{11} + A_{22} \cdot B_{21} = 3 \cdot 1 + 4 \cdot (-1) = 3 - 4 = -1
lt;/div><p class='step'>5. $(2,2)$ 成分の計算</p><div class='formula'>$(AB)_{22} = A_{21} \cdot B_{12} + A_{22} \cdot B_{22} = 3 \cdot 2 + 4 \cdot 3 = 6 + 12 = 18
lt;/div><p class='step'>6. 結果の整理</p><div class='formula'>$AB = \begin{pmatrix} 1 & 7 \\ -1 & 18 \end{pmatrix}
lt;/div><p class='step'>7. 行と列の積の視覚的理解</p><p>行列の積は「行×列」の内積の組み合わせとして理解できます:</p><ul><li>$(1,1)$ 成分:$A$ の第1行と $B$ の第1列の内積</li><li>$(1,2)$ 成分:$A$ の第1行と $B$ の第2列の内積</li><li>$(2,1)$ 成分:$A$ の第2行と $B$ の第1列の内積</li><li>$(2,2)$ 成分:$A$ の第2行と $B$ の第2列の内積</li></ul><div class='key-point'><div class='key-point-title'>行列積の計算コツ</div><p><strong>計算順序</strong>:「行×列」の内積を意識して計算</p><p><strong>サイズ確認</strong>:$(m×n) × (n×p) = (m×p)$ の法則</p><p><strong>間違いやすいポイント</strong>:行列の積は非可換($AB ≠ BA$)</p></div>