A fixed matrix determines two subspaces:
- the subspace generated by its columns;
- the subspace generated by its rows.
They describe which outputs the matrix can produce and which linear equations its rows generate.
- Which right-hand sides can occur in a system ?
- How much independent linear information is actually stored in the rows?
- How many genuinely independent directions remain after all redundancy is removed?
The answers are called the column space, the row space, and the rank of the matrix.
Column space: what outputs can the matrix produce?
Let be an matrix, and write its columns as
Definition
Column space
The column space of , written , is the span of the columns of :
It is a subspace of .
The most useful way to read this definition is through matrix multiplication. If , then
So every vector of the form is a linear combination of the columns. Conversely, every linear combination of the columns can be written as for some vector .
Theorem
Column space as an output set
For an matrix ,
Therefore a vector belongs to exactly when the system is consistent.
Row space: what linear information do the rows carry?
Write the rows of as , each a matrix. To regard their span as a subspace of the usual column-vector space , we take their transposes explicitly.
Definition
Row space
The row space of is
It is a subspace of .
Thus means for some , or, equivalently, : the row is a linear combination of the rows of . We may display rows horizontally while computing, but a row-space basis below consists of their transposes. This convention makes an actual equality of sets of column vectors.
The dimensions of the ambient spaces must be checked before comparing spaces. Columns of have entries, so ; transposed rows have entries, so . Applying the same definition to also gives . Even when , having the same ambient space does not force equality of the two spans. The distinction concerns their members, not merely their names.
Rank counts the independent directions
The dimension of the column space is called the column rank. The dimension of the row space is called the row rank. One of the central theorems of linear algebra says that these numbers are equal.
Definition
Rank
The rank of a matrix is the number of pivots in its RREF. The basis theorem proved below will establish the equivalent dimension formula:
When you row-reduce a matrix to RREF, the number of pivot columns is exactly the rank. So rank measures how many independent directions survive after all redundancy has been removed.
To find a basis for , use the pivot columns of the original matrix .
To find a basis for , use the transposes of the nonzero rows of the RREF of .
The pivot positions are read from the RREF, but the column-space basis vectors must be taken from the original matrix.
Worked example: read everything from one row reduction
Worked example
Column space, row space, and rank from a single matrix
Consider
Row-reducing gives
One explicit reduction is , followed by and . The third row becomes zero and the first two rows have their leading ones in columns one and two. This produces the displayed RREF rather than merely an echelon matrix with unexplained pivot positions.
There are two pivot columns, namely columns and .
Write the columns of as
Then a basis for the column space is
Indeed, the non-pivot columns are combinations of the pivot columns:
For the row space, we transpose the nonzero rows of :
So
Finally, if
then because
Equivalently, the system is consistent.
Static map for the worked example: pivot positions are read from the RREF, column-space basis vectors come from the original matrix, transposed nonzero RREF rows form a row-space basis, and both dimensions equal the rank.
Three results from one RREF
The following sequence revisits the same example. Distinguish the information read from the RREF from the column-space basis vectors taken from the original matrix.
Row reduction: what changes and what does not?
Row reduction preserves some of this structure while changing other parts.
Theorem
What invertible multiplication preserves
Let be a real matrix, an invertible matrix, and an invertible matrix. Then
In particular, row-equivalent matrices have the same row space. Their column spaces need not be equal.
Proof
Use the inverse for the reverse inclusion
If , write , so . Conversely, if , set . Then , giving the reverse inclusion. The first direction needs no inverse; the second uses it to produce a coefficient vector.
Now , and is invertible with inverse . Apply the just-proved result to get . A sequence of row operations is left multiplication by an invertible , so the row-equivalence assertion follows. Equivalently, every new row is a combination of old rows, and reversing the operations gives the other containment of their spans.
Left multiplication has a different effect on outputs: . Indeed, in both descriptions. This is an invertible image of the old column space, not necessarily the same subset of . If have the same number of rows, applying the same invertible gives if and only if : the forward direction applies to equal sets, and the reverse applies . Comparing two transformed spaces is different from claiming that either one is unchanged.
Why the basis rules and rank equality hold
Theorem
Pivot bases and the equality of ranks
Let be the RREF of a real matrix , with pivots in columns . The original columns form a basis of , and the transposes of the nonzero rows of form a basis of . Consequently,
Proof
Preserve coefficients and then inspect pivot coordinates
Write with invertible, and denote the columns of by . For every coefficient vector ,
The left side is zero exactly when the sum inside parentheses is zero: one direction multiplies by , the other by . Thus all homogeneous column relations, with their exact coefficients, are preserved in both directions. Relations involving only selected columns are covered by inserting zero coefficients in the remaining positions.
The pivot columns of have a single one in distinct pivot rows and zeros elsewhere, so they are independent. Every column is their combination with coefficients ; all rows below are zero. The preserved relations show that the corresponding original pivot columns span every . A zero combination of those original columns gives a zero combination of the pivot columns of , forcing every coefficient to vanish. This proves both spanning and independence for the column basis.
For the row basis, we already know . Deleting the zero rows leaves a spanning list of transposed nonzero rows. If their combination with coefficients is zero, inspect coordinate . In the RREF, that pivot column has one in row and zero in every other row, so this coordinate is exactly . Hence all coefficients are zero and the list is independent. Each basis has members, proving the dimension equalities. When , the matrix is zero, both spaces are the zero subspace in their respective ambient spaces, and both bases are empty.
This argument explains precisely why the reduction gives positions for the column basis but actual vectors for the row basis. It also yields by exchanging the two spaces. For an matrix the rank is at most , since the pivots occupy distinct rows and distinct columns. Rank is a number; no equality of row and column spaces is asserted by these equalities of numbers.
Equal dimensions do not identify the spaces
Worked example
Different spaces for one square matrix
Consider
Its first three columns are independent: their first three coordinates force all coefficients of a zero combination to vanish. The fourth column is the first plus half the second plus one third the third. Consequently, and its dimension is three. Both containment directions are explicit: every column has last coordinate zero, and any displayed vector is the combination of the first three columns with coefficients .
The nonzero transposed rows are , and . They are independent by their first three coordinates, and the remaining row is zero, so they form a basis of . Their general combination shows
Thus but it is not in . Conversely, does not satisfy the displayed row-space condition. The two spaces are distinct subspaces of the same , although both have dimension three. Scaling the second and third rows by and gives three pivots, agreeing with rank three.
Counterexample mode
Row reduction can move the column space
False claim. Row-equivalent matrices have the same column space.
Take
The operation is subtracting row one from row two, and adding it back supplies the inverse. Directly, whereas . The nonzero vector cannot equal : its first coordinate would force and its second would force . So the spaces differ. Yet both row spaces equal and both ranks are one. Even the redundant second-column relation is preserved: it is zero in both matrices.
Repaired statement. Row operations preserve row space, rank and the coefficients of column relations. The actual column space becomes ; a basis for the original column space must use original columns at the pivot positions. In this example the RREF pivot column is not even a member of the original column space, so it cannot be its basis.
Test membership by keeping the right-hand side
Worked example
A column space described by one equation
Let
Twice the first row plus sixteen times the second plus five times the third is zero. Hence every output satisfies . This proves one inclusion in the proposed description of ; a condition satisfied by every output need not alone prove it describes every output.
For the converse, suppose this equation holds. Use only the first two columns, with coefficients
Their combination is . The first two coordinates are , and the last is by the assumed equation. Thus , proving the other inclusion. We obtain
For , the condition gives ; indeed is six times the first column. For , it gives , so is inconsistent. One vector is accepted by an explicit coefficient choice, the other rejected by a necessary output equation.
More generally, if is an RREF with pivots, then is equivalent to . Its zero rows require the last coordinates of to vanish; its pivot equations impose no further condition on the right-hand side. Taking these last rows of as a matrix gives when . This describes the column space by equations instead of generators. For full row rank there are no such restrictions and . The right-hand side must undergo the same row operations as ; reducing only and leaving fixed would test a different system.
Common mistake
Common mistake
Do not use pivot columns of the RREF as a basis for the column space
Row reduction usually changes the column space. So while the pivot positions are read from the RREF, the actual basis vectors for must be taken from the corresponding columns of the original matrix.
Another common mistake is to say that column space and row space are equal because they have the same dimension. Equal dimension does not mean equal subspace; it only means they contain the same number of independent directions.
Quick checks
Checkpoint
If is a matrix, in which ambient space does live, and in which ambient space does live?
Count entries in a column and in a row separately.
Solution · Answer
is a subspace of , because each column has 4 entries. is a subspace of , because each row has 3 entries.
Checkpoint
If the RREF of a matrix has three pivot columns, what is the rank?
Recall how rank is read from RREF.
Solution · Answer
The rank is .
Exercises
Checkpoint
Let . Find the rank and a basis for the column space.
Row-reduce first, identify the pivot columns, and then go back to the original matrix.
Solution · Guided solution
Subtract the first and second rows from the third to obtain the RREF
There are exactly two pivots, in columns one and two, so the rank is two. The nonzero first two rows establish the lower bound as well as the zero third row establishing the upper bound.
Therefore a basis for the column space is
The third column is their sum, so it adds no new direction.
Read this first
This note depends especially on 2.3 Gaussian elimination and RREF, 3.3 Transpose, symmetric, and skew-symmetric matrices, and 6.5 Basis and dimension.