A Matrix Equation Is More Than Just a Set of Equations: Understanding Its Geometry
But there is a more interesting way to approach it.
Instead of asking only:
How do I solve this matrix equation?
We should also ask:
- What do the columns of the matrix represent?
- What space do these columns span?
- Can the given vector be represented as a combination of these columns?
- Where does the solution lie geometrically?
These questions take us beyond calculations and help us understand the geometry behind linear algebra.
This perspective is central to Gilbert Strang’s Introduction to Linear Algebra, where the matrix equation is connected to the fundamental ideas of column space, linear combinations, and linear transformations.
Let’s understand this step by step.
1. Start with a Matrix Equation
Consider the familiar matrix equation:
Ax = b
Here:
- A is a matrix.
- x is an unknown vector.
- b is a known vector.
For example, consider:
A = ⎡ 1 2 ⎤
⎣ 3 1 ⎦
x = ⎡ x₁ ⎤
⎣ x₂ ⎦
b = ⎡ 5 ⎤
⎣ 7 ⎦
Our matrix equation becomes:
⎡ 1 2 ⎤ ⎡ x₁ ⎤ ⎡ 5 ⎤
⎣ 3 1 ⎦ ⎣ x₂ ⎦ = ⎣ 7 ⎦
Multiplying the matrices gives two equations:
x₁ + 2x₂ = 5
3x₁ + x₂ = 7
Solving these equations:
x₁ = 1.8
x₂ = 1.6
Therefore:
x = ⎡ 1.8 ⎤
⎣ 1.6 ⎦
We have found the solution.
But what does this solution actually mean?
To understand that, we need to look at the columns of A.
2. Look at the Columns of the Matrix
We can rewrite the matrix equation by separating the columns of A.
Let:
a₁ = ⎡ 1 ⎤ a₂ = ⎡ 2 ⎤
⎣ 3 ⎦ ⎣ 1 ⎦
Then:
Ax = b
can be expressed as:
x₁a₁ + x₂a₂ = b
Substituting the values:
1.8 ⎡ 1 ⎤ + 1.6 ⎡ 2 ⎤ = ⎡ 5 ⎤
⎣ 3 ⎦ ⎣ 1 ⎦ ⎣ 7 ⎦
Or:
⎡ 1.8 ⎤ + ⎡ 3.2 ⎤ = ⎡ 5 ⎤
⎣ 5.4 ⎦ ⎣ 1.6 ⎦ ⎣ 7 ⎦
Notice something important.
The vector b is constructed by combining the columns of A using the coefficients in x.
This is the first important geometric interpretation of a matrix equation:
Solving Ax = b means finding a combination of the columns of A that produces the vector b.
The unknown vector x tells us how much of each column we need.
3. What Does It Mean for Columns to Span a Space?
Now consider all possible combinations of the two columns.
We can write:
x₁a₁ + x₂a₂
Here, x₁ and x₂ can take any real values.
As these coefficients change, the resulting vector changes.
The collection of all possible combinations forms a space called the Column Space of A.
It is written as:
C(A) = Span{a₁, a₂}
In general:
C(A) = {Ax | x ∈ ℝⁿ}
The column space contains every vector that can be generated by multiplying A with some vector x.
In our example, the two columns are linearly independent. Therefore, they span the entire two-dimensional plane, ℝ².
This means every vector in ℝ² can be represented as a linear combination of these two columns.
Consequently, our equation Ax = b has a solution for every possible b in ℝ².
This leads to an important observation:
The columns of a matrix determine which vectors can be reached through matrix multiplication.
4. What If the Columns Do Not Span the Entire Space?
Now consider a different matrix:
A = ⎡ 1 2 ⎤
⎣ 2 4 ⎦
Its columns are:
a₁ = ⎡ 1 ⎤ a₂ = ⎡ 2 ⎤
⎣ 2 ⎦ ⎣ 4 ⎦
Notice that:
a₂ = 2a₁
The second column is simply twice the first column.
Therefore, the two columns do not span the entire two-dimensional plane.
They span only a line.
In other words:
C(A) = Span{⎡ 1 ⎤}
⎣ 2 ⎦
Now suppose we want to solve:
Ax = b
where:
b = ⎡ 3 ⎤
⎣ 6 ⎦
Since:
b = 3a₁
a solution exists.
For example:
x₁ = 3, x₂ = 0
But what if:
b = ⎡ 3 ⎤
⎣ 5 ⎦
Can we find coefficients x₁ and x₂ that generate this vector?
No.
Every possible combination of the two columns must lie on the line y = 2x.
But the vector (3, 5) does not lie on that line.
Therefore:
Ax = b has no solution.
The important point is that the equation does not fail because we have not found the correct values of x.
It fails because the target vector b lies outside the column space of A.
This is a fundamental geometric insight.
5. Visualizing the Geometry
Think of the columns of a matrix as directions that we can combine.
- If two independent columns exist in ℝ², they span the entire plane.
- If the columns are multiples of each other, they span a line.
- If all columns are zero, they span only the origin.
The position of b determines whether a solution exists.
If b lies inside the column space, a solution exists.
If b lies outside the column space, no exact solution exists.
This is why understanding column space is more important than simply memorizing how to solve a matrix equation.
6. What Happens When There Is No Exact Solution?
In practical applications, we frequently encounter systems where no exact solution exists.
For example, consider a dataset with more observations than unknown parameters.
We may have:
Ax = b
where A contains the observed features, x represents the unknown model parameters, and b contains the target values.
Because real-world data is often noisy, there may be no parameter vector x that satisfies every equation exactly.
Does this mean we cannot find a useful solution?
Not necessarily.
We can find the vector Ax that comes closest to b.
This leads us to the idea of Least Squares.
Instead of requiring:
Ax = b
we seek:
Ax ≈ b
The objective is to minimize the squared error:
Minimize ‖Ax − b‖²
Geometrically, we are looking for the point in the column space of A that is closest to b.
This point is the orthogonal projection of b onto the column space.
If the columns of A are linearly independent, the least-squares solution satisfies:
AᵀAx̂ = Aᵀb
These are called the Normal Equations.
The corresponding geometric condition is:
Aᵀ(b − Ax̂) = 0
This means the residual vector (b − Ax̂) is perpendicular to every column of A.
In simple terms, we cannot reduce the error further by moving the projected point in any direction within the column space.
This is the geometric foundation of Linear Regression.
7. Connecting These Ideas to Machine Learning
The geometric interpretation of matrix equations appears throughout Machine Learning and Deep Learning.
Let’s look at a few examples.
Linear Regression
We solve for model parameters that best approximate the target values.
The least-squares solution finds the closest point in the column space of the feature matrix.
Feature Representation
Each column of a feature matrix represents a feature across observations.
The column space describes the combinations of features that the model can represent.
Principal Component Analysis (PCA)
PCA identifies important directions in the data and projects observations onto a lower-dimensional subspace.
Neural Networks
A linear layer transforms an input vector through a weight matrix:
y = Wx + b
The columns of W describe the directions along which the input representation can be combined to produce outputs, with the precise interpretation depending on the matrix dimensions and whether vectors are represented as rows or columns.
Dimensionality Reduction
When data is projected onto a lower-dimensional subspace, we deliberately restrict the space in which its representations can lie.
These applications demonstrate that linear algebra is not simply about manipulating numbers. It provides a geometric language for understanding how Machine Learning models represent and transform data.
8. The Bigger Picture
Let’s summarize the important ideas.
- A matrix equation Ax = b asks whether b can be constructed from the columns of A.
- A linear combination determines how the columns are combined.
- The column space contains all possible outputs of Ax.
- The span describes the space generated by the columns.
- Linear independence determines whether columns introduce new directions.
- If b lies outside the column space, no exact solution exists.
- Least Squares finds the closest point in the column space when an exact solution is unavailable.
These ideas are interconnected.
Understanding one makes the others easier to understand.
Final Thought
The next time you encounter a matrix equation, don’t just ask how to solve it.
Ask what its columns represent, what space they span, and where the solution lies geometrically.
Because a matrix equation is not merely a collection of algebraic operations.
It is a way of understanding how vectors combine, how spaces are formed, and how transformations operate.
That is when linear algebra starts becoming geometry.
If you enjoyed this article, clap 👏 and follow for more articles that connect the fundamentals of mathematics with Machine Learning and Deep Learning.
Learning mathematics one concept at a time.


