The Matrix Equation Ax = b
Before The product Ax is a combination of the columns of A, so this lesson rests on span and on row reduction. Builds on: Vector Equations and the Span · Systems of Linear Equations and Row Reduction
Next The matrix equation is the language of the rest of the course: solution sets, independence, transformations, inverses, and subspaces. Leads to: Solution Sets of Linear Systems and Free Variables · Linear Independence · Linear Transformations and Their Matrices · Matrix Operations and Invertibility · Vector Spaces and Subspaces
The Matrix Equation $Ax = \mathbf{b}$
Before You Start: Prerequisite Check
Can you do these? (Click to reveal self-test)
Test yourself on these prerequisite skills:
Span test: How do you determine whether a vector $\mathbf{b}$ is in $\text{Span}\{\mathbf{v}_1, \mathbf{v}_2\}$?
Check
Row-reduce the augmented matrix $[\mathbf{v}_1 \; \mathbf{v}_2 \mid \mathbf{b}]$. If the system is consistent, $\mathbf{b}$ is in the span. If not, it is not.
Linear combination: Compute $3\begin{pmatrix}1\\0\\-1\end{pmatrix} + (-2)\begin{pmatrix}2\\1\\3\end{pmatrix}$.
Check
\[ \begin{pmatrix}3\\0\\-3\end{pmatrix} + \begin{pmatrix}-4\\-2\\-6\end{pmatrix} = \begin{pmatrix}-1\\-2\\-9\end{pmatrix} \]
Row reduction: What does a pivot in every row of a coefficient matrix tell you?
Check
If every row of the coefficient matrix contains a pivot, the system $A\mathbf{x} = \mathbf{b}$ is consistent for every right-hand side $\mathbf{b}$.
If you struggled: Review Vector Equations and Span and Systems and Row Reduction.
Try This First
Compute the matrix-vector product $A\mathbf{x}$ using the method you already know (row by row):
\[ A = \begin{pmatrix}2&1\\-1&3\end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix}2\\1\end{pmatrix} \]
Once you have the answer, recompute it a different way: $2$ times column 1 of $A$ plus $1$ times column 2 of $A$.
Do both methods give the same result?
Show Solution
Row-by-row: \[ A\mathbf{x} = \begin{pmatrix}2(2)+1(1) \\ -1(2)+3(1)\end{pmatrix} = \begin{pmatrix}5\\1\end{pmatrix} \]
Column combination: \[ 2\begin{pmatrix}2\\-1\end{pmatrix} + 1\begin{pmatrix}1\\3\end{pmatrix} = \begin{pmatrix}4\\-2\end{pmatrix} + \begin{pmatrix}1\\3\end{pmatrix} = \begin{pmatrix}5\\1\end{pmatrix} \]
Both give $\begin{pmatrix}5\\1\end{pmatrix}$.
The column view is the main idea of this section: $A\mathbf{x}$ is always a linear combination of the columns of $A$, with the entries of $\mathbf{x}$ as scalars. The row-by-row calculation gives the same numbers. The column view also shows the geometry.
Two Views of $Ax$
The matrix-vector product $A\mathbf{x}$ can be understood two ways, both of which are correct.
Row view: The $i$th entry of $A\mathbf{x}$ is the dot product of the $i$th row of $A$ with $\mathbf{x}$.
Column view: $A\mathbf{x}$ is a linear combination of the columns of $A$, with the entries of $\mathbf{x}$ as the scalars:
\[ A\mathbf{x} = x_1 \mathbf{a}_1 + x_2 \mathbf{a}_2 + \cdots + x_n \mathbf{a}_n \]
where $\mathbf{a}_1, \ldots, \mathbf{a}_n$ are the columns of $A$ and $x_1, \ldots, x_n$ are the entries of $\mathbf{x}$.
The column view unifies three problems that look different on the surface:
| Problem Form | Underlying Question |
|---|---|
| System: $a_{11}x_1 + \cdots = b_1$, etc. | Is there a solution? |
| Vector equation: $x_1\mathbf{a}_1 + \cdots = \mathbf{b}$ | Is $\mathbf{b}$ in the span? |
| Matrix equation: $A\mathbf{x} = \mathbf{b}$ | Is $\mathbf{b}$ in the column space of $A$? |
All three ask the same question. The matrix equation is the most compact notation.
Prerequisite Map
Quick Reference
| Property | Value |
|---|---|
| Course | MATH 231 |
| Difficulty | Intermediate |
| Time | ~30 minutes |
| Source | Lay, Linear Algebra and Its Applications, Section 1.4 |
Definition
If $A$ is an $m \times n$ matrix with columns $\mathbf{a}_1, \ldots, \mathbf{a}_n$ and $\mathbf{x} \in \mathbb{R}^n$, then:
\[ A\mathbf{x} = x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n \]
Requirement: The number of columns of $A$ must equal the number of entries of $\mathbf{x}$.
Key Concepts
The Column Combination Definition
When $A$ is $m \times n$ and $\mathbf{x} \in \mathbb{R}^n$, the product $A\mathbf{x}$ is defined by:
\[ A\mathbf{x} = \begin{pmatrix} | & | & & | \\ \mathbf{a}_1 & \mathbf{a}_2 & \cdots & \mathbf{a}_n \\ | & | & & | \end{pmatrix} \begin{pmatrix}x_1\\x_2\\\vdots\\x_n\end{pmatrix} = x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n \]
The result is a vector in $\mathbb{R}^m$.
Worked example:
Let $A = \begin{pmatrix}1&2\\-1&3\\0&1\end{pmatrix}$ and $\mathbf{x} = \begin{pmatrix}3\\-1\end{pmatrix}$.
\[ A\mathbf{x} = 3\begin{pmatrix}1\\-1\\0\end{pmatrix} + (-1)\begin{pmatrix}2\\3\\1\end{pmatrix} = \begin{pmatrix}3\\-3\\0\end{pmatrix} + \begin{pmatrix}-2\\-3\\-1\end{pmatrix} = \begin{pmatrix}1\\-6\\-1\end{pmatrix} \]
Verify via row view: Row 1: $1(3)+2(-1)=1$; Row 2: $-1(3)+3(-1)=-6$; Row 3: $0(3)+1(-1)=-1$. Agrees.
Source: Lay, Linear Algebra and Its Applications, Section 1.4: The Matrix Equation Ax = b.
The Column Space
The column space of $A$, written $\text{Col}(A)$, is the span of the columns of $A$:
\[ \text{Col}(A) = \text{Span}\{\mathbf{a}_1, \mathbf{a}_2, \ldots, \mathbf{a}_n\} \]
It is the set of all vectors of the form $A\mathbf{x}$: every target reachable by some choice of $\mathbf{x}$.
Key question: Is $\mathbf{b}$ in $\text{Col}(A)$? Equivalently, does $A\mathbf{x} = \mathbf{b}$ have a solution? These are the same question, and row reduction on $[A \mid \mathbf{b}]$ answers it.
The Existence Theorem
Theorem (Lay, Section 1.4): The following statements are equivalent for an $m \times n$ matrix $A$:
- For every $\mathbf{b}$ in $\mathbb{R}^m$, the equation $A\mathbf{x} = \mathbf{b}$ has a solution.
- Every $\mathbf{b}$ in $\mathbb{R}^m$ is a linear combination of the columns of $A$.
- The columns of $A$ span $\mathbb{R}^m$.
- $A$ has a pivot position in every row.
Consequence: If $A$ has any row without a pivot, then there exist right-hand sides $\mathbf{b}$ for which the equation $A\mathbf{x} = \mathbf{b}$ has no solution. That “impossible $\mathbf{b}$” is not in $\text{Col}(A)$.
Algebraic Properties of the Product
For an $m \times n$ matrix $A$ and vectors $\mathbf{u}, \mathbf{v} \in \mathbb{R}^n$ and scalar $c$:
\[ A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v}, \quad A(c\mathbf{u}) = c(A\mathbf{u}) \]
These properties follow from the column combination definition and will become central when linear transformations are studied.
Common Pitfalls
| Mistake | Why It Is Wrong | Correct Approach |
|---|---|---|
| Computing $A\mathbf{x}$ using only the row view without the column insight | The row view gives the numbers but misses the geometric meaning | Practice writing $A\mathbf{x}$ as a column combination to build geometric intuition |
| Concluding $A\mathbf{x} = \mathbf{b}$ is solvable for any $\mathbf{b}$ | Only guaranteed when $A$ has a pivot in every row | Row-reduce $A$ alone to count pivot rows |
| Attempting to “divide both sides by $A$” | Matrix division is not defined; only matrix inverses exist, and only for square invertible matrices | Row-reduce $[A \mid \mathbf{b}]$ to find solutions |
| Writing $\mathbf{x} A$ instead of $A\mathbf{x}$ | Matrix-vector products are not commutative; $\mathbf{x} A$ is often not even defined | Always write $A$ on the left and $\mathbf{x}$ on the right |
Why $A\mathbf{x} = \mathbf{b}$ May Have No Solution
Consider $A = \begin{pmatrix}1&2\\2&4\end{pmatrix}$ and $\mathbf{b} = \begin{pmatrix}1\\3\end{pmatrix}$.
Row-reduce $[A \mid \mathbf{b}]$:
$R_2 \to R_2 - 2R_1$: \[ \left[\begin{array}{rr|r}1&2&1\\0&0&1\end{array}\right] \]
Row 2 reads $0 = 1$: inconsistent. So $\mathbf{b} = \begin{pmatrix}1\\3\end{pmatrix}$ is not in $\text{Col}(A)$.
Why? Both columns of $A$ are multiples of $\begin{pmatrix}1\\2\end{pmatrix}$, so the column space is the line $\{t\begin{pmatrix}1\\2\end{pmatrix} \mid t \in \mathbb{R}\}$. The vector $\begin{pmatrix}1\\3\end{pmatrix}$ does not lie on this line.
Practice Problems
Compute $A\mathbf{x}$ using the column combination view.
\[ A = \begin{pmatrix}3&-1\\0&2\\-2&4\end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix}-1\\3\end{pmatrix} \]
Also verify your result using the row-by-row method.
Write the following system as a matrix equation $A\mathbf{x} = \mathbf{b}$. Identify $A$, $\mathbf{x}$, and $\mathbf{b}$ explicitly.
\[ \begin{cases} 2x_1 - x_2 + 4x_3 = 6 \\ x_1 + 3x_2 - x_3 = -2 \\ 5x_1 + 2x_3 = 0 \end{cases} \]
Is $\mathbf{b} = \begin{pmatrix}1\\1\\2\end{pmatrix}$ in $\text{Col}(A)$ where $A = \begin{pmatrix}1&1\\1&2\\0&1\end{pmatrix}$?
If yes, express $\mathbf{b}$ as a linear combination of the columns of $A$. If no, explain what the row reduction reveals.
Let $A = \begin{pmatrix}1&0&3\\2&1&-1\end{pmatrix}$.
(a) Row-reduce $A$ alone (not an augmented matrix). How many pivots does $A$ have?
(b) Does $A$ have a pivot in every row? What does this tell you about $A\mathbf{x} = \mathbf{b}$?
(c) Give a specific $\mathbf{b} \in \mathbb{R}^2$ and find one solution $\mathbf{x}$ to $A\mathbf{x} = \mathbf{b}$.
Let $A = \begin{pmatrix}1&-1\\2&-2\\-1&1\end{pmatrix}$.
(a) Row-reduce $[A \mid \mathbf{b}]$ with $\mathbf{b} = \begin{pmatrix}b_1\\b_2\\b_3\end{pmatrix}$ left as symbols. Determine the condition(s) on $b_1, b_2, b_3$ for $A\mathbf{x} = \mathbf{b}$ to be consistent.
(b) Describe $\text{Col}(A)$ geometrically.
Common Misconceptions
the row view of $A\mathbf{x}$ is the only or primary way to understand the product. The row-by-row dot product computes the right numbers, but it conceals the geometry. The column combination view reveals that $A\mathbf{x}$ is a vector in the column space of $A$, which is the central fact behind existence of solutions, the column space, and linear transformations. Both views are valid computations; the column view is the one that generalizes.
$A\mathbf{x} = \mathbf{b}$ is solved by computing $A^{-1}\mathbf{b}$. The formula $\mathbf{x} = A^{-1}\mathbf{b}$ applies only when $A$ is square and invertible. For rectangular matrices, or square matrices that are not invertible, there is no inverse to use. The general method is always row reduction of the augmented matrix $[A \mid \mathbf{b}]$.
$A\mathbf{x} = \mathbf{b}$ always has a solution. The system has a solution for a given $\mathbf{b}$ only when $\mathbf{b}$ lies in the column space of $A$. If $A$ has a row without a pivot, then some right-hand sides $\mathbf{b}$ will not be in the column space. A specific $\mathbf{b}$ is in the column space exactly when row-reducing $[A \mid \mathbf{b}]$ produces no contradiction row.
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Mental Model
The Projector Screen
Imagine each column of $A$ as a “dial” that controls a direction in $\mathbb{R}^m$. The vector $\mathbf{x}$ holds the settings for all the dials. The product $A\mathbf{x}$ is the result: a point in $\mathbb{R}^m$ obtained by combining the directions in the proportions given by $\mathbf{x}$.
The column space is the screen: the set of all points the projector can reach. If your target $\mathbf{b}$ falls on the screen, there exist settings $\mathbf{x}$ that project to it. If $\mathbf{b}$ is off the screen, no settings work.
Row reduction checks whether $\mathbf{b}$ is on the screen. The Existence Theorem tells you whether the screen covers all of $\mathbb{R}^m$ or only a subspace.
Connections
Looking ahead in MATH 231:
- Solution Sets and Free Variables: once you know a solution exists, the structure of all solutions is determined by the null space
- Linear Independence: whether the columns of $A$ are independent determines whether solutions are unique when they exist
- Linear Transformations: the map $\mathbf{x} \mapsto A\mathbf{x}$ is the canonical linear transformation; the column view makes this transparent
Real-world connections:
- In any data regression problem, fitting a model requires determining whether the target vector lies in the column space of the data matrix.
- Computer graphics uses matrix-vector products to transform coordinates; the column space determines which targets are reachable under a given transformation.
Source: Lay, Linear Algebra and Its Applications, Section 1.4: The Matrix Equation Ax = b.
Last updated: 2026-06-16
Watch and Read
- Lynch, MATH 231 lecture playlists (YouTube)Recorded MATH 231 lectures at EWU. Use them to see each topic worked through in a full class session.