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 3.6.1
(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 3.6.2
(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 3.6.3
(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 3.6.4
(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.
Basis-selection rule
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 3.6.5
(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 map above summarises 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 3.6.6
(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 3.6.7
(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.
A second proof using rank factorization
A matrix has columns in one vector space and rows in another. It is therefore not obvious from the definitions why the dimensions of their spans must agree. A rank factorization makes the connection concrete: choose independent output columns and express every output column in that basis. The coordinate matrix records the same amount of independent information as the chosen columns. We will prove the equality without assuming it at the outset.
Constructing the factorization
Let be an matrix over a field , and suppose its column space has dimension . Select columns of forming a basis of that space, and place them in the matrix . Every column of has a unique coordinate vector with . Assemble these coordinate vectors as columns of an matrix . By construction,
The columns of are independent. Moreover, if the selected columns occur at positions , then the corresponding columns of are , in that order. Thus the rows of are independent: a linear relation between them, inspected in those selected columns, has every coefficient equal to zero. In particular the row rank of is .
When , every column of is zero, so is zero and both row and column ranks are zero. The remaining argument treats ; the empty factorization also works with suitable empty-matrix conventions. We need no inner product, positivity or real-number assumption.
Why a left inverse exists
We need a way to recover the coordinates from an output in the column space. Because the columns of are independent, extend them to a basis of . Define a linear map by sending to and every to zero; linearity on a basis defines this map uniquely. Its matrix satisfies .
This is a left inverse of , but need not be a right inverse: acts on , and can only be the identity if the selected columns span all of . The extension is a proof of existence, not a claim that there is only one such . Different choices of the extra basis vectors can lead to different left inverses, all agreeing on the column space.
Compare the row spaces
From , each row of is a linear combination of the rows of , with coefficients from the corresponding row of . Hence . Multiplying the factorization by gives , so each row of is a linear combination of the rows of . Thus the reverse inclusion also holds:
The rows of are independent, so the common row space has dimension . By definition was the dimension of the column space of . Consequently row rank equals column rank for every finite matrix over a field. The proof is not circular: independence of the rows of came from its identity columns, not from the theorem we are proving.
The factorization also explains the image. Every output lies in the span of the selected columns; conversely those columns are already outputs of standard basis vectors. The matrix translates an input into coordinates for the output in that basis. Its kernel equals : one inclusion is immediate from , and for the other apply to to get . Rank–nullity then counts input directions producing zero, while the row-space argument counts independent output coordinates.
The choice of basis columns need not be unique. A different choice changes and , but the number and the two spaces being described do not change. This is useful in calculations: choose a convenient basis, then check the resulting factorization by multiplication.
A warning about dependent columns
The full-column-rank hypothesis for a left inverse cannot be omitted. For , the nonzero vector has . If for some , then , a contradiction. A product can still be written with this , but it is not the independent-column rank factorization above, and multiplying by a nonexistent left inverse cannot establish the reverse row-space inclusion.
U1 — Find the factors and verify both spaces
Let . Construct a rank factorization and bases for its row and column spaces.
Solution. The first two columns and are independent, since their first two coordinates force both coefficients to vanish. The third column is . Therefore
Take ; then and . The columns of form a column-space basis, and the two rows of form a row-space basis. Both ranks are 2. Directly, the third row of is the sum of the first two, providing a second check.
U2 — A parameter and a kernel
For , determine its row rank, column rank and null space for every .
Solution. The first column is nonzero because its first entry is 1; the second is . Thus with and . Its column rank is 1. The nonzero row spans the row space, so its row rank is also 1. Finally , whence . This includes and fields of any characteristic; no division by is used.
Equal dimensions do not identify the spaces
Worked example 3.6.8
(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 3.6.9
(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.
Rank–nullity for a finite-dimensional domain
Let be a finite-dimensional real vector space and let be a real vector space. For a linear map , define and . Both contain zero. Linearity shows that any real linear combination of two kernel vectors remains in the kernel, and that remains in the image. Thus both are subspaces. Finite basis existence and extension in 3.5 Basis and dimension apply to the kernel; no finite-dimensional assumption on is needed.
Choose a basis of and extend to a basis with . Then form a basis of : spanning follows by expanding any input; a dependence among these images places the corresponding input combination in the kernel, and independence of the extended basis makes all coefficients zero. Thus
This is rank–nullity. In equal finite dimensions, injectivity and surjectivity are equivalent, but the equivalence can fail in infinite-dimensional spaces.
For the matrix map , , the kernel is and the image is . The column-basis theorem proved above therefore gives . The abstract proof explains the dimension identity; the earlier free-coordinate construction supplies an explicit null-space basis.
Counterexample mode
An injective map need not be onto in infinite dimensions
On the space of all real sequences, the shift is linear and injective, yet nothing maps to . A zero kernel gives a full image only through rank–nullity, when domain and target have the same finite dimension.
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
Quick check
(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.
Quick check
(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
Quick check
(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.
Prerequisites
This note depends especially on 1.4 Gaussian elimination and RREF, 2.2 Transpose, symmetric, and skew-symmetric matrices, and 3.5 Basis and dimension.
Prerequisite proof routes
The following sections record, for each prerequisite result used above, where its proof is given.
Proof of the finite real matrix product laws
The associative, distributive and scalar laws for compatible finite real matrices are proved in 2.1 Matrix multiplication, with the size and scalar hypotheses stated there.
Build the elementary matrix from the identity
The elementary matrix of a row operation, obtained by applying the operation to the identity, is constructed in 2.3 Invertible matrices.
Why left multiplication performs the operation
That left multiplication by an elementary matrix performs the corresponding row operation is proved, case by case, in 2.3 Invertible matrices.
Acting on an augmented matrix
The identity , by which a row operation acts on the whole augmented matrix, is proved in 2.3 Invertible matrices.
A sequence of elementary row operations becomes one matrix product
That a chain of row operations is left multiplication by the product is proved in 2.3 Invertible matrices.
Reverse row operations and inverses
That every elementary matrix has a two-sided inverse, given by the reverse row operation, is proved in 2.3 Invertible matrices.
Finite elimination terminates and preserves the solution set
That finite elimination with nonzero pivots terminates and preserves the solution set is proved in 1.4 Gaussian elimination and RREF.
Classification and the homogeneous freedom
The classification of real systems, with the right-hand side transformed together with the coefficients, is proved in 1.5 Solution-set types.
The corresponding inverse criterion for square matrices is proved in 2.3 Invertible matrices, using elementary-matrix inverses and coefficient pivots; it does not use determinants.
Finite basis existence and extension, without a counting assumption
Exchange for finite real spanning lists, basis existence and basis extension are proved in 3.5 Basis and dimension.
Further study
Proof X-ray
Columns transport relations; rows keep the space
In the proof of the pivot bases and the equality of ranks, two different mechanisms are at work. For columns, the invertible preserves every linear relation among the columns with its exact coefficients, so spanning and independence are checked in and carried back to ; only the positions carry over, not the vectors. For rows, nothing needs carrying: row operations keep the row space itself, and independence is read at the pivot coordinates, where exactly one nonzero row has a nonzero entry.