Rowspace, Columnspace, and Nullspace of a Matrix

In the following let M be a m by n matrix

The Rowspace of M is the vector space (a subspace of n-dimensional space) that is spanned by the rows of M

You can find the Dimension of the Rowspace of M by row reducing M--the non-zero rows that are left span the Rowspace (and will also be linearly independent).

Example: Let

M=(({{1, 2, 3, 4}, {-1, 1, 0, 1}, {3, -2, 1, 0}}))

RowReduce[M]

All three rows are nonzero so the dimension of the rowspace is 3 and it is spanned by the vectors shown in the rows of the last display.

The Columnspace of M is the vector space (a subspace of m-dimensional space) that is spanned by the columns of M

You can find the Dimension of the Columnspace of M by row reducing M--the columns with pivot elements span the columnspace (and will also be linearly independent).

Example: Let

M=(({{1, 2, 3, 4}, {-1, 1, 0, 1}, {3, -2, 1, 0}}))

RowReduce[M]

The first, second and fourth columns are pivot columns so the dimension of the columnspace is 3.  It can be shown that the columnspace is spanned by the original 3 vectors corresponding to the pivot columns of the row-reduced matrix, that is by the vectors (({{1}, {-1}, {3}})),  (({{2}, {1}, {-2}})), and (({{4}, {1}, {0}})).

Note that the dimension of the columnspace and the dimension of the rowspace are both 3.  This is always true and this common dimension of the rowspace and columnspace is called the Rank of the matrix.

The nullspace is the space spanned by the solution vectors of MX=0.

Example: Let

M=(({{1, 2, 3, 4}, {-1, 1, 0, 1}, {3, -2, 1, 0}}))

RowReduce[M]

In the row-reduced matrix, the first row represents the equation x + z = 0, the 2nd row is the equation y + z = 0, and the last row is w=0.  Thus the nullspace (vectors written in row format) is {x,y,z,w} = {-z,-z,z,0} = z {-1,-1,1,0} so the vector {-1,-1,1,0} spans the nullspace of the matrix.  Thus, the nullspace has dimension 1.

Some Results Concerning Rowspace, Columnspace, and Nullspace of a matrix

The nullity of a matrix is the dimension of the nullspace of the matrix.

If M is a matrix with n columns, then rank(M)+nullity(M)=n

If M is an m by n matrix, then rank(M)=number of leading variables (variables that depend on other variables) in the solution of MX=0 and nullity(M)=number of free variables or parameters in the solution of MX=0.

For the system MX=B of m equation in n unknowns, the following are equivalent:

MX=B is consistent

B is in the columnspace of M

The coefficient matrix M and the augmented matrix [M | B] have the same rank

Functions Used in this notebook

$Post=If[MatrixQ[#],MatrixForm[#] ,#]&;