Linear Algebra 16 | Matrix Product
Based on The Bright Side of Mathematics's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Matrix multiplication AB is defined when A is m×n and B is n×k, producing an m×k matrix.
Briefing
Matrix multiplication is defined so that multiplying an m×n matrix A by an n×k matrix B produces an m×k matrix—each entry is an inner product between a row of A and a column of B. The key idea is that this operation generalizes the familiar matrix–vector product: instead of applying A to one vector, you apply it to many vectors at once by stacking those vectors as columns in a matrix.
Start with the matrix–vector product: if A is m×n and x is in R^n, then Ax lands in R^m. To extend this, pick k vectors b1,…,bk in R^n and place them as columns of a new matrix B. That makes B an n×k matrix. Multiplying A on the left by B applies A to each column separately, so the result is a matrix whose columns are Ab1,…,Abk. This immediately forces the “inner dimensions” rule: the number of columns of A must match the number of rows of B. When A is m×n and B is n×k, the product AB is well-defined and has shape m×k.
A second, equally important way to compute AB comes from the row picture. Label the rows of A as α1^T,…,αm^T. To find a specific entry of AB, choose a row αi^T from A and a column bj from B, then compute their inner product ⟨αi, bj⟩. That inner product becomes the (i,j)-entry of the product matrix. In other words, matrix multiplication is built from standard inner products, but arranged systematically so every row–column pairing contributes one number.
The transcript illustrates this with a concrete example. Let A be a 2×3 matrix with entries 1 2 3 / 4 5 6, and let B be a 3×2 matrix (so the dimensions match). The product AB is therefore 2×2. Using a grid-style scheme, each of the four entries is computed by taking the inner product of one row of A with one column of B. The example calculations produce the entries 4, 5, 10, and 11, yielding the final result
AB = [[4, 5], [10, 11]].
The takeaway is practical: computing a matrix product isn’t mysterious—each entry comes from an inner product, and the only real “gotcha” is making sure the matrices fit together dimensionally. With the definition and computation method in place, the next step is to study properties of this multiplication operation.
Cornell Notes
Matrix multiplication is defined for A∈R^{m×n} and B∈R^{n×k} by producing AB∈R^{m×k}. One viewpoint stacks k vectors b1,…,bk as the columns of B; then AB applies A to each column, so the j-th column of AB is Abj. Another viewpoint uses rows: if α1^T,…,αm^T are the rows of A, then the (i,j)-entry of AB is the inner product ⟨αi, bj⟩. This makes computation systematic: pick a row from A and a column from B, compute their standard inner product, and fill the resulting grid. The only requirement is that A’s column count equals B’s row count.
How does multiplying a matrix by another matrix generalize the matrix–vector product?
What dimension rule determines whether AB is defined?
How do you compute a specific entry of AB using the row/column method?
What does the “grid scheme” for matrix multiplication mean in practice?
In the worked example, why is AB a 2×2 matrix and how are the entries obtained?
Review Questions
- Given A∈R^{m×n} and B∈R^{n×k}, what is the shape of AB, and why must the inner dimensions match?
- Using the row/column definition, write the formula for the (i,j)-entry of AB in terms of a row of A and a column of B.
- For A 2×3 and B 3×2, how many inner products are needed to compute AB, and what determines each one?
Key Points
- 1
Matrix multiplication AB is defined when A is m×n and B is n×k, producing an m×k matrix.
- 2
The j-th column of AB equals A applied to the j-th column of B.
- 3
Each entry of AB is an inner product between a row of A and a column of B.
- 4
Computing AB is systematic: choose a row from A and a column from B, multiply componentwise, and sum.
- 5
A practical way to organize calculations is a grid/table where each cell corresponds to one row–column pairing.
- 6
The only common pitfall is mismatched dimensions: A’s column count must equal B’s row count.