Five ways to multiply matrices — entry by entry, column at a time, row at a time, columns times rows, and by blocks — all doing the same multiplications, all giving the same answer. Then the inverse of a square matrix. When it fails to exist (some combination of the columns gives zero), and when it does, how Gauss-Jordan finds it by solving n systems at once.
Strang has been multiplying matrices for two lectures already, but it’s “certainly time to discuss the rules.” The interesting part, he says, is the many ways you can do it — they all give the same answer, and they’re all important.
Start with the way everyone learns first. Suppose A times B gives C. The entry of C in row i, column j — always row number first, then column number — is written cij. To make it concrete, take c34: it comes from row 3 of A dotted with column 4 of B. Walk along the row and down the column, multiplying and accumulating:
c34=a31b14+a32b24+⋯=k=1∑na3kbk4
The first entry of row 3 is a31; the first entry at the top of column 4 is b14; the running index k marches together along the row and down the column. Most of the course uses whole vectors, Strang admits — he very seldom gets down to individual entries — “but here we’d better do it.”
When is the multiplication even allowed? Let A be m×n (m rows, n columns). The number of rows of B — the entries we meet coming down a column — has to match the n entries going across a row of A. So B must be n×p, and the result C is m×p: it inherits its m rows from A and its p columns from B. That’s mp little numbers, each one a row-times-column dot product.
Second and third ways: whole columns, whole rows
Now the same calculation seen with whole columns. Strang builds on what we already know: how to multiply a matrix by one column. So think of B as p columns “just resting next to each other.” Then
A[b1b2⋯bp]=[Ab1Ab2⋯Abp]
A times the first column of B is the first column of C — none of the other columns enter that part of the answer. And what does that tell us? Since A times a vector is a combination of the columns of A:
The third way is that row statement: a row of A multiplies all of B and produces a row of the product, taking a combination of the rows of B as it goes. In the answer C, you can see where the pieces come from — its columns come from the columns of A, its rows come from the rows of B.
Fourth way: columns times rows
A row times a column gave a number. So what’s left? A column times a row. A column of A is m×1; a row of B is 1×p. The inner sizes match — they have length one — so the product is legal, and it’s not petite at all: it’s a full m×p matrix.
The fourth way, then: AB is a sum of (columns of A) times (rows of B) — first column times first row, plus second column times second row, and so on. His example:
The second piece is all zeros, so we’re back to the special matrix above.
Fifth way: blocks
One more, useful enough that Strang won’t skip it: block multiplication. Cut A and B into blocks whose sizes match properly — say both are 20×20, chopped into four 10×10 blocks:
The top-left block of the answer is A1B1+A2B3 — block rows times block columns, exactly as if the blocks were numbers. “Nobody, I think, not even Gauss could see instantly that it works,” but check it through and all five ways are doing the same multiplications, just organized differently.
Inverses: when a matrix has none
On to the second topic. Take a square matrix A. It may or may not have an inverse — and whether it does is “the most important question you can ask about the matrix.”
Strang hates to be negative, but the singular case comes first. His example:
A=[1236]
Why is there no inverse? Several ways to see it. If you know determinants (which you’re not supposed to yet), it’s zero. Better, think columns: if A times some matrix gave I, the columns of I would be combinations of the columns of A. But both columns of A lie on the same line — every combination stays on that line, and (1,0) is not on it. No way to reach the identity.
Then the reason Strang likes best. A matrix has no inverse exactly when there is a nonzero vector x with Ax=0. Here, take x=(3,−1): three of column one minus one of column two is the zero column. (Picking x=0 is no achievement — that always works. It’s the nonzero solution that matters.)
Gauss-Jordan: finding the inverse
Back to the positive side. Change the 6 to a 7 — “seven is a lucky number” —
A=[1237]
Determinant fans see it isn’t zero; column fans see two columns pointing in different directions, so combinations reach anything. Now find A−1=[abcd]: four numbers, from AA−1=I. Read that equation by columns. The first column satisfies
A[ab]=[10],A[cd]=[01]
In general: A times column j of A−1 equals column j of the identity. Finding the inverse means solving n systems with the same matrix A and the columns of I as right-hand sides. We’re back to Gauss — and this is where Jordan comes in. Jordan’s idea, as Strang tells it: solve them all together. Instead of tacking on one extra column as the augmented matrix, tack on the whole identity:
Why the identity turns into the inverse
The mechanics are one thing; why did A−1 show up? Every elimination step is multiplication by an elimination matrix E — that’s what last lecture established. Here there were just two: one that subtracted 2× row 1 from row 2, one that subtracted 3× row 2 from row 1. Call their product — the overall elimination matrix — E. Then the whole process is
E[A∣I]=[EA∣EI]=[I∣E]
Start with the double-length matrix [A∣I], eliminate until the first half is down to I, and the second half must be A−1. That’s Gauss-Jordan: solving n equations at once, with the n columns of the inverse coming up together.
Problems
Practice all five multiplications and the Gauss-Jordan mechanics — the lecture’s methods are everything you need.
Problem 3.1Entry formula & column way
Let
A=[1324],B=[5210].
Compute the entry c21 of C=AB from the summation formula, then find all of C column by column (A times each column of B).
By columns:A[52]=5[13]+2[24]=[923] and A[10]=[13].
So C=[92313] — and the (2,1) entry agrees: 23.
Problem 3.2Column times row
Compute the column-times-row product
125[24]
and describe its row space and its column space, in the lecture’s language.
Show solution
125[24]=24104820
Every row is a multiple of (2,4), so the row space is the line through (2,4). Every column is a multiple of (1,2,5), so the column space is the line through (1,2,5). A minimal matrix: all its rows on one line, all its columns on another.
Problem 3.3Recognizing the singular case
Show that
A=[2346]
has no inverse, by finding a nonzero vector x with Ax=0 and running the lecture’s argument.
Show solution
Column two is twice column one, so take x=[2−1]: then 2[23]−1[46]=[00], and x=0.
Now suppose A−1 existed. Multiply Ax=0 on the left by A−1: the left side is A−1Ax=x, the right side is A−10=0. So x=0 — but x=(2,−1) is not zero. Contradiction: no A−1 exists. (Column picture: both columns lie on one line, so no combination reaches (1,0), and the identity is unreachable.)
Problem 3.4Gauss-Jordan by hand
Use Gauss-Jordan elimination on the long matrix [A∣I] to invert