The Matrix Equation Ax = b
means: use the entries of as weights and combine the columns of . That's why , a vector equation and a linear system are really one problem written three ways.
What the symbols mean
- Matrix times vector
A combination of the columns of A, weighted by the entries of x.
Explanation
The matrix equation is simply a whole linear system packed into one short line: holds all the coefficients, holds all the unknowns, and holds all the right-hand sides. Multiplying a matrix by a vector is shorthand for the column combinations from the last lesson: take of the first column, of the second, and so on, and add them up. It's good because it lets you talk about a system with a thousand unknowns as easily as one with two. The formula above looks like a wall of brackets, but it's only three pieces: (the columns lined up side by side), the column of 's (the list of weights, one per column) and (what you get when you use those weights). Same idea as before, written more compactly; bear with the notation.
Three ways to say the same thing. Take a look at the system from the first lesson: , . You can write it as a vector equation, , or, packing the columns into a matrix, as
All three have the same solution, , and you solve all three the same way: row reduce the augmented matrix.
Computing : either combine columns (the meaning), or use the row-vector rule (the shortcut): entry is row of dotted with . The two always agree. The row rule just collects, for each entry, the pieces every column contributes to that entry.
When does have a solution for every ? Exactly when the columns of span , which happens exactly when has a pivot in every row. Think about why the pivots matter. If some row of the echelon form has no pivot, it's all zeros on the left, and you can pick a that leaves a nonzero number on the right of that row: nonzero, no solution. With a pivot in every row, that bad row can never show up.
A common mistake. It's tempting to think a pivot in every column is what guarantees a solution for every , because pivot columns are where the basic variables live. It isn't: a pivot in every column tells you that a solution, if there is one, is unique. It's a pivot in every row that rules out a nonzero row, and that's what makes every reachable.
Matrix multiplication is linear. and . That falls right out of the column picture: adding or scaling the lists of weights adds or scales the combinations. We'll lean on this a lot when we get to linear transformations later in this unit.
There's an animation further down that shows being built from the two columns as goes around a circle.
See it
Worked examples
Compute .
- 1
Use the entries as weights on the three columns: .
Practice
Type your answer and check it. Solve them all to complete the lesson.
Compute .
Compute .
Solve .
A matrix has a pivot in every row. Does have a solution for every in ?
If and , find .
A bakery's muffin batch uses cups of flour and cup of sugar; a cookie batch uses cups of flour and cups of sugar. With cups of flour and cups of sugar, how many batches of each use up everything exactly? Give muffins, then cookies.
The hardest one here. Get it, and you've got this lesson.
A matrix sends to and to . Find , row by row.
Where it's used
Every layer of a neural network computes (then a nonlinearity): billions of matrix–vector products power modern AI.