LINEAR-ALGEBRA Β· Unit 3 Β· Video 1 Β· Interactive Practice

5 Ways to Think About Matrix Multiplication

IKey Formulas

Method Formula Key Insight
Entry way Cij=βˆ‘k=1naik bkjC_{ij} = \sum_{k=1}^{n} a_{ik}\, b_{kj} Dot product of row ii of AA with column jj of BB
Column way colj(C)=Aβ‹…colj(B)\text{col}_j(C) = A \cdot \text{col}_j(B) Each column of CC is a linear combination of AA's columns
Row way rowi(C)=rowi(A)β‹…B\text{row}_i(C) = \text{row}_i(A) \cdot B Each row of CC is a linear combination of BB's rows
Col Γ— Row AB=βˆ‘k=1ncolk(A)β€…β€Šrowk(B)AB = \sum_{k=1}^{n} \text{col}_k(A)\;\text{row}_k(B) Sum of nn rank-one outer products

IIVisualization 1 β€” The Entry Way

Each entry CijC_{ij} is a single number: the dot product of row ii of AA with column jj of BB.

IIIVisualization 2 β€” The Column Way

Each column of CC is a linear combination of AA's columns, weighted by a column of BB.

IVVisualization 3 β€” The Row Way

Symmetrically, each row of CC is a linear combination of BB's rows, weighted by a row of AA.

VVisualization 4 β€” Column Γ— Row

ABAB equals a sum of nn rank-one outer products β€” one for each index of the shared dimension.

πŸ’‘ Each term is rank one β€” every column is a multiple of one vector, every row a multiple of another. This decomposition underlies matrix rank and low-rank approximation.

VIQuiz Questions

Question 1

Consider a 2Γ—32 \times 3 matrix DD with row 1 =[3,β€…β€Šβˆ’1,β€…β€Š2]= [3,\; -1,\; 2] and a 3Γ—23 \times 2 matrix EE with column 2 =[4,β€…β€Š0,β€…β€Šβˆ’1]T= [4,\; 0,\; -1]^T.

Using the entry way, compute (DE)1,2(DE)_{1,2}.

βœ… Correct! The dot product gives 12+0βˆ’2=1012 + 0 - 2 = 10.

❌ Not quite. Multiply corresponding entries and watch the signs carefully.

Show solution

Solution:

(DE)1,2(DE)_{1,2} is the dot product of row 1 of DD with column 2 of EE:

(DE)1,2=3β‹…4+(βˆ’1)β‹…0+2β‹…(βˆ’1)=12+0βˆ’2=10(DE)_{1,2} = 3 \cdot 4 + (-1) \cdot 0 + 2 \cdot (-1) = 12 + 0 - 2 = 10

The answer is 10.

Question 2

In the column way of thinking about C=ABC = AB, every column of CC is a linear combination of which set of vectors?

βœ… Correct! Each column of CC lives in the column space of AA.

❌ Not quite. Think about what Aβ‹…colj(B)A \cdot \text{col}_j(B) produces β€” which vectors of AA get scaled and added?

Show solution

Solution:

Column jj of CC equals Aβ‹…colj(B)A \cdot \text{col}_j(B), which expands to:

colj(C)=b1j col1(A)+b2j col2(A)+β‹―+bnj coln(A)\text{col}_j(C) = b_{1j}\,\text{col}_1(A) + b_{2j}\,\text{col}_2(A) + \cdots + b_{nj}\,\text{col}_n(A)

So every column of CC is a linear combination of the columns of AA, with weights coming from column jj of BB.

This is why ColΒ space(C)βŠ†ColΒ space(A)\text{Col space}(C) \subseteq \text{Col space}(A).

Question 3

The outer product of a nonzero column vector u\mathbf{u} (mΓ—1m \times 1) and a nonzero row vector vT\mathbf{v}^T (1Γ—p1 \times p) produces an mΓ—pm \times p matrix. What is the rank of this matrix?

βœ… Correct! An outer product of two nonzero vectors always has rank 1.

❌ Not quite. How many linearly independent columns does the outer product matrix have?

Show solution

Solution:

The outer product uvT\mathbf{u}\mathbf{v}^T produces a matrix where:

  • Every column is a scalar multiple of u\mathbf{u}
  • Every row is a scalar multiple of vT\mathbf{v}^T

Since all columns point in the same direction, the column space is one-dimensional. Therefore the rank is 1.

These rank-1 matrices are the simplest non-zero matrices β€” and every matrix product ABAB decomposes into a sum of them.

Question 4

True or False: For C=ABC = AB where AA is mΓ—nm \times n and BB is nΓ—pn \times p, the product CC can always be written as the sum of exactly nn rank-one matrices (one for each index in the shared dimension).

βœ… Correct! The column Γ— row decomposition always produces exactly nn rank-one terms.

❌ Not quite. Recall the col Γ— row decomposition β€” how many column-row pairs are there?

Show solution

Solution:

True. The column Γ— row decomposition gives:

AB=βˆ‘k=1ncolk(A)β€…β€Šrowk(B)AB = \sum_{k=1}^{n} \text{col}_k(A)\;\text{row}_k(B)

Each term colk(A)β€…β€Šrowk(B)\text{col}_k(A)\;\text{row}_k(B) is an outer product β€” a rank-one (or zero) matrix. There are exactly nn such terms, where nn is the shared inner dimension.

Note: individual terms may be the zero matrix (if a column of AA or row of BB is zero), but the decomposition still has nn terms. The actual rank of CC may be less than nn.

Solved: 0 / 4