Welcome to our next lesson. In our previous discussion, we established the crucial concept of linear independence, which provides a mathematical framework for identifying redundant features in a dataset. We saw that when feature vectors are linearly dependent, it can destabilize a model's parameters, making it difficult to interpret the individual contribution of each feature—a problem known as multicollinearity.
Today, we shift our perspective from the inputs of a transformation to its outputs. We will explore a fundamental question: if a matrix represents a model that transforms data, what is the complete set of all possible outcomes it can generate? Answering this will lead us to define the column space of a matrix, interpreting it as the universe of all possible outputs of a linear transformation. This concept is essential for understanding a model's capabilities and its inherent limitations.
The Reach of a Transformation
Let's begin by building a strong geometric intuition. We've seen that a matrix transforms vectors. A key insight is that this transformation has a "reach"—it can't necessarily land a vector anywhere in space. The set of all possible landing spots is a core property of the matrix.
The following video from 3Blue1Brown provides the best visual explanation of this idea. It connects the system of equations Ax = v to the geometric problem of finding which input vector x lands on an output vector v after the transformation A.
Inverse matrices, column space and null space | Chapter 7, Essence of linear algebra
This video, "Inverse matrices, column space and null space," visualizes the set of all possible outputs of a matrix transformation.
Watch the segment from 02:08 to 03:08, which frames the equation Ax = v as a search for an input vector x that lands on the output v. Next, pay close attention to the section from 08:06 to 09:28. This is the core of today's lesson. It visually demonstrates how a transformation can squish space down to a line or a plane and defines this set of all possible outputs as the column space. It also introduces the idea of rank as the number of dimensions in this output space, a topic we'll explore in detail next.
The video makes a critical connection that we need to solidify: the set of all possible outputs is the span of the columns of the matrix. Why is this true? Recall how matrix-vector multiplication works. The product Ax is a linear combination of the columns of A, with the components of x acting as the weights.

Since x can be any vector, its components can be any set of scalars. Therefore, the set of all possible outputs Ax is the set of all possible linear combinations of the columns of A. By definition, this is the span of the columns.
This leads us to the formal definition:
The column space of a matrix
Ais the set of all possible linear combinations of its column vectors. It is the span of the columns ofA.
To reinforce this, you can review the concepts in the written version of the 3Blue1Brown lesson.
3Blue1Brown - Inverse matrices, column space, and null space
This article recaps the video's main points in text form, which can be helpful for solidifying the definitions.
Focus on the section titled "Column Space." It provides a concise summary, defining the column space as the set of all possible outputs and directly linking it to the span of the matrix's columns. It also reiterates that rank is the dimensionality of this space.
The Machine Learning Connection: The Model's Universe
This concept of column space isn't just an abstract geometric idea; it is profoundly important for understanding what a machine learning model can and cannot do.
Consider a linear model. Your data matrix A has columns that represent your features (e.g., expression levels of different genes). Your model learns a set of weights x to produce a prediction b. The prediction is calculated as Ax = b.
From our definition, we know that any prediction b must be a linear combination of the feature columns. This means:
The column space of your feature matrix A is the space of all possible predictions your linear model can generate.
Your model is fundamentally constrained to this space. If the "true" signal you are trying to capture lies outside this space, your model can never predict it perfectly. Instead, the best it can do is find the closest point within its column space.

This idea is the foundation of linear regression and many other ML techniques. For your project on differentiating ALL and AML cancers, imagine your features are the expression levels of 100 specific genes. The column space of your data matrix represents every possible "cancer signal profile" that can be constructed as a weighted sum of those 100 gene expression patterns. If the true biological difference between ALL and AML involves a complex interaction that cannot be represented by such a linear combination, your model will have a "biological blind spot." It will make the best possible prediction within its constrained universe, but it will never capture the true underlying mechanism perfectly.
Column Space and the Solvability of Equations
This brings us to a practical implication: understanding the column space tells us when a system of equations Ax = b has a solution.
- If the target vector
bis inside the column space ofA, then by definition,bis a linear combination of the columns ofA. This means there exists some set of weights—a vectorx—that producesb. The system has a solution. - If
bis outside the column space ofA, then it's impossible to find a linear combination ofA's columns that equalsb. The systemAx = bhas no solution.
The following video provides a clear, algebraic walkthrough of this concept.
The Null Space & Column Space of a Matrix | Algebraically & Geometrically
This video by Dr. Trefor Bazett, "The Null Space & Column Space of a Matrix," offers a complementary, slightly more algebraic perspective on the column space.
Watch the introduction from the beginning, which illustrates the column space as the set of all "targets" of a transformation. Pay close attention to the formal definition from 01:08 to 03:33. It explicitly defines the column space as the set of all vectors b for which Ax = b has a solution, and then shows why this is equivalent to the span of the columns. Finally, watch the summary from 09:12 to 10:35, which contrasts the column space (output space) with the null space (input space), reinforcing where each concept "lives."
As Professor Gilbert Strang of MIT puts it, the fundamental insight is that the column space of A contains all vectors Ax. A system of equations is solvable precisely when the right-hand side b is in the column space. This simple but powerful idea is a cornerstone of linear algebra and its applications.
Conclusion
In this lesson, we have defined one of the most important concepts in linear algebra. We've seen that the column space provides a complete picture of the "reach" or "output universe" of a linear transformation. By connecting this geometric idea to its algebraic definition and its role in machine learning, we've unlocked a deeper understanding of how models work.
Key Takeaways:
- The column space of a matrix
Ais the set of all possible outputs of the transformationx -> Ax. - Geometrically, it is the subspace (e.g., a line or plane) that space is squished into by the transformation.
- Algebraically, the column space is the span of the columns of the matrix.
- The system of equations
Ax = bhas a solution if, and only if, the vectorblies within the column space ofA. - In machine learning, the column space of a feature matrix represents all possible predictions a linear model can make.
We've defined the column space, but we still have a lingering question: how do we measure its "size" or dimensionality? We've seen transformations that collapse space into a line (1D) and others that collapse it into a plane (2D). In our next lesson, we will formalize this by defining the rank of a matrix, which is simply the dimension of its column space. Rank will give us a precise number to quantify the expressive power of our data and models.