Linear Algebra II HT23, Matrix multiplication
Flashcards
What are the three views of matrix multiplication?
- Dot product
- Column view
- Row view
$AB = C$. What is $c _ {ij}$ in terms of the rows and columns of $A$ and $B$?
\[c _ {ij} = \pmb a^\text{row} _ i \cdot \pmb b^\text{col} _ j\]
$AB = C$. What is $\pmb c^\text{col} _ j$ in terms of $A$ and $B$?
\[\pmb c _ j^\text{col} = A\pmb b _ j^\text{col}\]
\[\left(\begin{matrix} a _ {11} \& a _ {12} \& a _ {13} \\\\ a _ {21} \& a _ {22} \& a _ {23} \\\\ a _ {31} \& a _ {32} \& a _ {33} \end{matrix}\right)
\left(\begin{matrix} b _ {11} \& b _ {12} \\\\ b _ {21} \& b _ {22} \\\\ b _ {31} \& b _ {32} \end{matrix}\right)\]
Quick! What’s the 2nd column of the result going to look like?
\[b _ {12} \left(\begin{matrix} a _ {11} \\\\ a _ {21} \\\\ a _ {31} \end{matrix}\right) + b _ {22}\left(\begin{matrix} a _ {12} \\\\ a _ {22} \\\\ a _ {32} \end{matrix}\right) + b _ {32} \left(\begin{matrix} a _ {13} \\\\ a _ {23} \\\\ a _ {33} \end{matrix}\right)\]
$AB = C$. What is $\pmb c _ i^\text{row}$ in terms of $A$ and $B$?
\[\pmb c _ i^\text{row} = \pmb a^\text{row} _ i B\]
\[\left(\begin{matrix} a _ {11} \& a _ {12} \& a _ {13} \\\\ a _ {21} \& a _ {22} \& a _ {23} \\\\ a _ {31} \& a _ {32} \& a _ {33} \end{matrix}\right)
\left(\begin{matrix} b _ {11} \& b _ {12} \\\\ b _ {21} \& b _ {22} \\\\ b _ {31} \& b _ {32} \end{matrix}\right)\]
Quick! What’s the third row of the result going to look like?
\[a _ {31} \left(\begin{matrix} b _ {11} \& b _ {12} \end{matrix}\right) + a _ {32} \left(\begin{matrix} b _ {21} \& b _ {22} \end{matrix}\right) + a _ {33} \left(\begin{matrix} b _ {31} \& b _ {32} \end{matrix}\right)\]
Write $\mathbf c^T \mathbf w$ as a sum.
\[\sum^D _ {j = 0} c _ j w _ j\]
Write $\mathbf w^T \mathbf A \mathbf w$ as a sum.
\[\sum^D _ {i = 0} \sum^D _ {j = 0} w _ iw _ j A _ {ij}\]
Write $\mathbf{AB}$ as a sum, giving the expression for $c _ {ij}$.
\[c _ {ij} = \sum^N _ {k=1} a _ {ik} b _ {kj}\]