Row Space and Null Space

Learn two complementary subspaces of a matrix, row space and null space.

Definition of row space

The row space of a matrix, AA, denoted by R(A)R(A), is the span of its row vectors. Mathematically,

R(A)=C(AT)R(A)=C(A^T)

Example

The row space of A=[100001]A=\begin{bmatrix}1 &0&0\\0&0&1\end{bmatrix} is the xzxz plane in R3\R^3, which can also be seen as a column space of ATA^T. The column space of AA is R2\R^2, with a basis as the first and third columns of AA. Both the row space and column space of AA are two dimensional, but they’e fundamentally different.

rank(A)=rank(AT)    dim(R(A))=dim(C(A))rank(A)=rank(A^T)\implies dim(R(A))=dim(C(A))

Note: Even though R(A)R(A) and C(A)C(A) have the same dimensions, R(A)R(A) and C(A)C(A) aren’t necessarily the same.

When R(A)=C(A)?

When the following conditions are true, R(A)=C(A)R(A)=C(A).

  1. AA is invertible. Consider an invertible n×nn \times n matrix, AA. All columns are linearly independent and hence span Rn\R^n. All rows are also linearly independent and hence span Rn\R^n.
  2. AA is symmetric. Because both the set of columns and rows are the same, their span is also the same space.

Null space

The null space of an m×nm \times n matrix, AA,
contains a subset of Rn\R^n which transforms to a zero vector. The null space of AA is typically denoted by N(A)N(A).

N(A)={xAx=0}N(A)=\{\bold x | A\bold x=\bold 0\}

Note: The zero-vector is always in the null space.

Note: Because N(A)N(A) is closed under linear combinations, it’s a vector space. In particular, x1,x2N(A)    αx1+βx2N(A)\bold{x_1,x_2}\in N(A) \implies \bold{\alpha x_1+\beta x_2} \in N(A).

The null space of a matrix, AA, is the solution set of the homogeneous linear system, Ax=0A\bold x=\bold 0. When there are fewer pivots as compared to the number of variables, the solution set will be infinite. Otherwise, the only solution is the zero vector.

Example

Let’s look at an example where A=[1326]A=\begin{bmatrix}1&3\\2&6\end{bmatrix} and x=[31]x=\begin{bmatrix}-3\\1\end{bmatrix}.

[1326][31]=[00]\begin{bmatrix}1&3\\2&6\end{bmatrix}\begin{bmatrix}-3\\1\end{bmatrix}=\begin{bmatrix}0\\0\end{bmatrix}

It’s worth noting that every scalar multiple of [31]\begin{bmatrix}-3\\1\end{bmatrix} is also a solution. The visualization below demonstrates that various vectors in the direction of [31]\begin{bmatrix}-3\\1\end{bmatrix} map to the origin when transformed by [1326]\begin{bmatrix}1&3\\2&6\end{bmatrix}.

In the visualization below, the null space is represented by a sequence of purple points, whereas the rest of the points are outside the null space. The visualization demonstrates the mapping of the null space to the origin, whereas the rest of the points map onto the column space of the matrix.

Get hands-on with 1400+ tech skills courses.