Get AI summaries of any video or article — Sign up free
Linear Algebra 16 | Matrix Product thumbnail

Linear Algebra 16 | Matrix Product

4 min read

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.

TL;DR

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?

If A is m×n and x is in R^n, then Ax is in R^m. For k vectors b1,…,bk in R^n, place them as columns of a matrix B = [b1 … bk], which makes B an n×k matrix. Then AB is an m×k matrix whose columns are Ab1, …, Abk—so A acts on each vector column separately.

What dimension rule determines whether AB is defined?

If A is m×n and B is n×k, the inner dimensions match (n). That matching is required because each entry of AB pairs a row of A (length n) with a column of B (also length n) for an inner product. If A’s number of columns doesn’t equal B’s number of rows, the product isn’t defined.

How do you compute a specific entry of AB using the row/column method?

Let α1^T,…,αm^T be the rows of A and let bj be the j-th column of B. The (i,j)-entry of AB equals the inner product ⟨αi, bj⟩. Concretely, you choose row i from A and column j from B, multiply corresponding components, and sum.

What does the “grid scheme” for matrix multiplication mean in practice?

For an m×k result, you can draw a table with m rows and k columns. Each cell corresponds to one row–column pairing: pick a row from A and a column from B, compute their inner product, and write it into the intersection cell. In the example, a 2×3 matrix times a 3×2 matrix yields a 2×2 grid with four inner-product computations.

In the worked example, why is AB a 2×2 matrix and how are the entries obtained?

A is 2×3 and B is 3×2, so the product has shape 2×2 (m×k). The four entries come from inner products of each of the two rows of A with each of the two columns of B. The computed results in the transcript are 4, 5, 10, and 11, arranged as [[4,5],[10,11]].

Review Questions

  1. Given A∈R^{m×n} and B∈R^{n×k}, what is the shape of AB, and why must the inner dimensions match?
  2. 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.
  3. 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. 1

    Matrix multiplication AB is defined when A is m×n and B is n×k, producing an m×k matrix.

  2. 2

    The j-th column of AB equals A applied to the j-th column of B.

  3. 3

    Each entry of AB is an inner product between a row of A and a column of B.

  4. 4

    Computing AB is systematic: choose a row from A and a column from B, multiply componentwise, and sum.

  5. 5

    A practical way to organize calculations is a grid/table where each cell corresponds to one row–column pairing.

  6. 6

    The only common pitfall is mismatched dimensions: A’s column count must equal B’s row count.

Highlights

AB’s shape is forced by dimensions: (m×n)(n×k) = m×k.
The (i,j)-entry of AB is ⟨row_i(A), column_j(B)⟩, so every number comes from a standard inner product.
Stacking vectors as columns turns the matrix–vector product into a matrix–matrix product.
A grid-style layout turns matrix multiplication into a finite set of row–column inner products.
In the example, a 2×3 matrix times a 3×2 matrix yields a 2×2 result with entries 4, 5, 10, and 11.

Topics

  • Matrix Product
  • Inner Dimensions
  • Row-Column Inner Products
  • Matrix–Vector Generalization
  • Computing AB