Now that we've established the concepts of vector spaces, span, and linear independence, let's look at two fundamental subspaces intrinsically linked to any given matrix A. These subspaces, the Column Space and the Null Space, provide deep insights into the behavior of the linear transformation defined by A and the structure of the data it might represent. Understanding them is significant for analyzing linear models, feature relationships, and the solvability of linear systems.
Consider an m×n matrix A. Its columns, a1,a2,...,an, are vectors in Rm.
The Column Space of A, denoted as Col(A), is the set of all possible linear combinations of the columns of A. In other words, it's the span of the columns: Col(A)=span{a1,a2,...,an} Since the span of any set of vectors forms a subspace, Col(A) is a subspace of Rm.
What does the column space represent? Recall that the matrix-vector product Ax can be written as a linear combination of the columns of A with weights given by the entries of x: Ax=x1a1+x2a2+...+xnan This means that the column space Col(A) is precisely the set of all possible outputs b that can be achieved by the transformation x↦Ax. If you think of A as defining a linear transformation T:Rn→Rm where T(x)=Ax, then Col(A) is the range of this transformation. It's the subspace in the output space Rm that the transformation can actually reach.
A system of linear equations Ax=b is consistent (i.e., has at least one solution) if and only if the vector b is in the column space of A. If b lies outside Col(A), then it's impossible to find weights x1,...,xn such that x1a1+...+xnan=b.
Finding a Basis for the Column Space A basis for the column space consists of a linearly independent set of columns that still span the entire column space. How do we find such a set? The pivot columns of the original matrix A form a basis for Col(A). To identify them, you typically row reduce A to its echelon form. The columns in the original matrix A that correspond to the pivot positions in the echelon form constitute a basis for Col(A).
The dimension of the column space, dim(Col(A)), is the number of vectors in its basis, which is equal to the number of pivot columns in A. This dimension has a special name: the rank of the matrix A. rank(A)=dim(Col(A)) The rank tells us the number of independent directions or dimensions spanned by the columns of A. In a machine learning context, if the columns represent features or transformed features, the rank indicates the effective dimensionality of that feature space. A rank less than the number of columns implies some linear dependence or redundancy among the features represented by the columns.
The Null Space of an m×n matrix A, denoted as Nul(A), is the set of all vectors x in Rn that are mapped to the zero vector in Rm by the transformation x↦Ax. Formally: Nul(A)={x∈Rn∣Ax=0} The null space consists of all solutions to the homogeneous system of linear equations Ax=0.
Is Nul(A) a subspace? Yes, it's a subspace of the input space Rn. We can verify this:
Geometrically, if A represents a transformation T:Rn→Rm, the null space Nul(A) is the set of all input vectors that get "squashed" or mapped onto the origin in the output space. This is also sometimes called the kernel of the transformation T.
Finding a Basis for the Null Space To find a basis for the null space, you need to find the general solution to the homogeneous equation Ax=0. This typically involves:
The dimension of the null space, dim(Nul(A)), is the number of vectors in its basis, which is equal to the number of free variables in the system Ax=0. This dimension is often called the nullity of the matrix A. nullity(A)=dim(Nul(A))
If the nullity is greater than zero, it means there are non-zero input vectors that map to the zero vector. In terms of the system Ax=b, if a solution xp exists (a particular solution), then any other solution can be written as x=xp+xh, where xh is any vector from the null space (Axh=0). A non-trivial null space implies that solutions to Ax=b, if they exist, are not unique.
There's a fundamental relationship connecting the dimension of the column space (rank) and the dimension of the null space (nullity) for any m×n matrix A. It's known as the Rank-Nullity Theorem: rank(A)+nullity(A)=n or dim(Col(A))+dim(Nul(A))=Number of columns of A
This theorem provides a powerful link between the input space (Rn) and the output space (Rm) of the transformation T(x)=Ax. It essentially states that the number of dimensions preserved by the transformation (the rank, dimension of the range) plus the number of dimensions collapsed to zero (the nullity, dimension of the kernel) must equal the total dimension of the input domain (n).
Consider what this implies:
Why are these subspaces important in practice?
By analyzing the column space, null space, and rank of matrices derived from datasets, we gain a deeper understanding of feature relationships, model capabilities, and potential issues like redundancy or non-uniqueness of solutions. These concepts form the bedrock for more advanced techniques explored later, including matrix decompositions like SVD.
© 2025 ApX Machine Learning