Four fundamental subspaces
Solving the linear system asks which input vector is mapped by the matrix to a specified output . When a matrix collapses space, as in the zero-determinant cases of determinants, two difficulties occur together: some targets cannot be reached at all, while reachable targets correspond to multiple distinct inputs. Organizing both solvability and non-uniqueness is the role of the four fundamental subspaces.
Keeping linear transformations and row-by-row dot products from matrix multiplication in view, we introduce the column space, row space, null space, and left null space in response to the questions of which outputs are reachable and which inputs map to zero, prove their pairwise orthogonality, and show how every solution to decomposes into a row-space component plus a null-space component.
After this page, you should be able to solve
- Determine whether has a solution for a given matrix and target by testing membership in the column space or orthogonality to the left null space.
- Use the null space to explain why distinct inputs such as and produce the same output, and write the complete solution set of as one particular solution plus a null-space vector.
- Decompose any input vector uniquely into a row space component and a null space component, and prove the orthogonal pairings among the four subspaces.
- Trace from the four-subspace diagram how maps the row space one-to-one onto the column space while mapping the entire null space to the zero vector.
Recall: matrices and linear transformations · Recall: the dot product
01What are we solving?
Recall what a matrix does in the linear-transformation page. We begin with a vector x, apply A, and get a new vector b. The equation Ax = b writes this process in one line. Here A is fixed. We will use the same matrix throughout the main explanation.
In the left picture, the dark arrow is the original x. Play the transformation to follow its endpoint to Ax. The right picture shows the output separately. Both pictures use the same coordinate scale; the right-hand axes are called b₁ and b₂ because we are reading the output there.
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
Start with an input
Read the output
The animation joins the starting and final positions to show the change. A itself is the rule giving the final position, not a claim that a vector physically travels along that path.
02What are the four spaces called?
The same matrix A sends inputs to outputs. Four sets of vectors appear in this process, and each has a name. The table describes what belongs to each set and gives its dimension. The following sections explain what each set tells us about the transformation.
Let count the rows of and count its columns. Inputs therefore have components and outputs have . A space’s dimension counts how many independent directions are needed to build all its vectors: a line through zero needs one, a plane needs two. We call the dimension of the column space the rank, written . In our example, the second column is twice the first, so every output lies on the line through ; every point of that line is reached by an input . Thus and . The table previews the four counts. We will derive the counts and , and the relations below, after constructing the spaces; they are not new rules to memorize now.
| Name | What it contains | Where it lives | Dimension |
|---|---|---|---|
| Row space | Each row of A is a vector in the input space. The row space is every linear combination of those rows. | ||
| Column space | Each column of A is a vector in the output space. The column space is every linear combination of those columns, so it is exactly the set of reachable outputs. | ||
| Null space | Every input x that A sends to zero: all solutions of Ax = 0. | ||
| Left null space | Every vector y in the output-side space that Aᵀ sends to zero: all solutions of Aᵀy = 0. Such a y need not be a reachable output Ax. Transposing Aᵀy = 0 gives yᵀA = 0, so yᵀ stands on the left of A; that is where the name comes from. |
How do these spaces relate to A itself? A sends every vector in the row space into the column space, and this mapping loses no information: different row-space vectors have different outputs. A sends every vector in the null space to zero. On the output side, Aᵀ sends every vector in the left null space to zero.
The two pairs are perpendicular. In the input space, every row-space vector is perpendicular to every null-space vector. In the output space, every column-space vector is perpendicular to every left-null-space vector. The right-angle marks in the diagram below show these two pairs.
The coloured regions name the four subspaces: Row(A) and Null(A) on the input side, Col(A) and Null(Aᵀ) on the output side. The shapes are only a diagram of the relations; in this example every subspace is a line.
03The column space: which outputs can we reach?
Before using the columns of A, return to ordinary coordinates. The vector (a, b) means a copies of (1, 0) plus b copies of (0, 1). These two basic vectors are the columns of the identity matrix I. Multiplying by I therefore leaves the vector unchanged.
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
The column vectors
Scale, then add
Change one coefficient at a time. The second arrow begins at the end of the first: following both arrows gives their sum. Negative coefficients reverse an arrow.
04The row space: what can we put in?
We have used columns to build the output. Now read the same multiplication one row at a time. Each output component is the dot product of one whole row with the whole input vector. A dot product multiplies corresponding components and adds the results.
For an m by n matrix, there are n numbers in each row. The input must also have n components for these dot products to make sense. There are m rows, so there are m output components. This gives A: ℝⁿ → ℝᵐ. Every vector in ℝⁿ is allowed as input; it does not have to be a combination of the rows.
The rows do span a subspace of the input space. We call it Row(A). In our example r₂ = 2r₁, so the row space is the gold line in the left picture. Try x = (1, 3): it is off that line, yet the multiplication still gives (7, 14). The full input space and the row space are therefore different things.
Input: every point of ℝ² is allowed
Output: two row dot products
The right picture has a wider numerical scale so its output fits. These are separate copies of ℝ². Row(A) and Col(A) happen to have the same direction here because our matrix is symmetric; that is not true of every matrix.
Some different inputs might give the same row dot products. Can a nonzero input even give zero in every row?
05The null space: which inputs become zero?
Zero certainly goes to zero under A. But is it the only input that does? Use the same matrix and try x = (2, −1). The first row gives 2 − 2 = 0, and the second gives 4 − 4 = 0. We have found a nonzero input which A sends to zero.
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
Input: c(2, −1)
Output: the column contributions cancel
The purple input can move along its whole line. On the right, the second contribution brings us back to the origin.
06The left null space: what happens on the output side?
Transpose a matrix by turning its columns into rows. We write the result as Aᵀ. If A has m rows and n columns, Aᵀ has n rows and m columns. It therefore takes an m-component input, which we will call y to keep it separate from our original x.
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
We now ask which y satisfy Aᵀy = 0. This defines Null(Aᵀ), a subspace on the output side of the original A. Our example happens to satisfy Aᵀ = A, so y = c(2, −1) works again. These are vectors in the output copy of ℝ², even though their coordinates match the earlier null vectors.
Transposing is not undoing the transformation. In particular, Aᵀ is not generally A⁻¹. We are forming a new matrix and asking a new zero-output question.
07How do the spaces fit together?
We have four sets of vectors now. Before putting them into one diagram, we need to explain their relations. Begin on the input side: why is every null-space vector perpendicular to every row-space vector?
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
Choose any xₙ in Null(A). The definition says Axₙ = 0. Reading the product by rows tells us that each rᵢ · xₙ is zero. Notice that rᵢ is dotted with the whole vector xₙ, not just one of its components. For two nonzero vectors, a zero dot product means they are perpendicular; the zero vector is orthogonal to every vector as well.
A vector in Row(A) is a linear combination of the rows. Dot that combination with xₙ and distribute the dot product. Every term is zero, so the whole result is zero. This proves the relation for the entire row space, not only for the rows we drew.
Conversely, if x is perpendicular to every row, every component of Ax is zero, so x belongs to Null(A). Therefore Null(A) is exactly the set of vectors perpendicular to Row(A). Applying the same argument to Aᵀ gives the corresponding relation on the output side.
The superscript ⊥ means the set of all vectors perpendicular to the named space, in the same input or output space.
08Why can different inputs agree?
Return to the input (1, 3), which gives (7, 14). We also found that (2, −1) gives zero. What happens if we add these two inputs before multiplying by A? Distribute A across the addition and keep each result visible.
The new input is (3, 2), and its output is unchanged. This part of the example works even though (1, 3) is not in Row(A). We call it x₀, a particular solution, rather than xᵣ. We will find the actual row-space solution next.
Choose a step when you are ready. The explanation will wait while you inspect the diagram.
Inputs with the same output
The output stays at (7, 14)
The dashed solution line is parallel to Null(A), but it does not pass through zero for this nonzero b. The solution set is therefore not itself a vector subspace. The right plot uses a larger numerical scale.
09Put the four spaces together
Read the left half as the input space and the right half as the output space. Gold and purple split the input; teal and rose split the output. The right-angle marks show the orthogonal pairs. The arrows through A show three results: xᵣ goes to b, xₙ goes to zero, and xᵣ + xₙ goes to that same b.
This is a diagram of relations, not a single coordinate plot. In our 2 by 2 example, all four subspaces are lines, so each has dimension 1. The coloured regions below stand for subspaces; their drawn width does not make them two-dimensional. Play to follow the three mappings together, or use the progress control to stop anywhere.
For an m by n real matrix, let r be the dimension of Col(A), called its rank. The table below lists the dimensions of all four spaces. Before using those counts, let us see why the correspondence we proved gives equal dimensions, and why the remaining dimensions can be subtracted.
Dimension counts how many vectors a basis needs. A basis must do two jobs: its combinations reach every vector in the space, and no vector in it can be made from the others. The second condition is called linear independence. Equivalently, a combination can equal zero only when every coefficient is zero.
Why does the correspondence through A preserve this count? Choose a basis of . Since every column-space output has a row-space input, it can be written as . Linearity moves the coefficients outside, so span . We still need to check that none of these new directions is redundant.
The vector inside the brackets is in . If A sends it to zero, it is also in . We proved that these perpendicular spaces share only zero, so the vector itself is zero. Since the u vectors were independent, every c must be zero. Their images therefore form a basis too. Both spaces have k basis vectors, so k equals the rank r.
Now join a basis of to a basis of . Together they reach every input because every input has the decomposition we constructed. They are also independent: if a row-space combination plus a null-space combination is zero, one is the negative of the other and belongs to both spaces. Both combinations must therefore be zero, forcing all coefficients to be zero. Their total number is the input dimension n. This gives . Repeat for the output space of dimension m to obtain the second count.
| Subspace | Definition | Lives in | Dimension |
|---|---|---|---|
| Row(A) | |||
| Null(A) | |||
| Col(A) | |||
| Null(Aᵀ) |
Try the original question once more
For our matrix, can b = (3, 6) be reached? What about (3, 5)? For the reachable one, find a particular solution and describe all solutions.
Read the worked answer
(3, 6) = 3(1, 2), so it belongs to Col(A). One input is (3, 0), because A(3, 0) = (3, 6). Every solution is (3, 0) + c(2, −1), where c is any real number. The unique row-space solution is (3/5, 6/5). The target (3, 5) is not a multiple of (1, 2), and 2 × 3 − 5 = 1 ≠ 0, so it has no solution.
