# Row and column spaces

The row space and column space of an m-by-n matrix are the linear subspaces generated by row vectors and column vectors, respectively, of the matrix. Its dimension is equal to the rank of the matrix and is at most min(m, n).[1]

The rest of article will consider matrices of real numbers: row and column spaces are subspace of Rn and Rm real spaces respectively. But row and column spaces can be constructed from matrices with components in any field and even a ring.

## Overview

Let A be a m-by-n matrix. Then

1. rank(A) = dim(rowsp(A)) = dim(colsp(A)),
2. rank(A) = number of pivots in any echelon form of A,
3. rank(A) = the maximum number of linearly independent rows or columns of A.

If one considers the matrix as a linear transformation from Rn to Rm, then the column space of the matrix equals the image of this linear transformation.

The column space of a matrix A is the set of all linear combinations of the columns in A. If A = [a1, ...., an], then colsp(A) = span {a1, ...., an}.

The concept of row space generalises to matrices to C, the field of complex numbers, or to any field.

Intuitively, given a matrix A, the action of the matrix A on a vector x will return a linear combination of the columns of A weighted by the coordinates of x as coefficients. Another way to look at this is that it will (1) first project x into the row space of A, (2) perform an invertible transformation, and (3) place the resulting vector y in the column space of A. Thus the result y =A x must reside in the column space of A. See the singular value decomposition for more details on this second interpretation.

## Example

Given a matrix J:

$J = \begin{bmatrix} 2 & 4 & 1 & 3 & 2\\ -1 & -2 & 1 & 0 & 5\\ 1 & 6 & 2 & 2 & 2\\ 3 & 6 & 2 & 5 & 1 \end{bmatrix}$

the rows are r1 = (2,4,1,3,2), r2 = (−1,−2,1,0,5), r3 = (1,6,2,2,2), r4 = (3,6,2,5,1). Consequently the row space of J is the subspace of R5 spanned by { r1, r2, r3, r4 }. Since these four row vectors are linearly independent, the row space is 4-dimensional. Moreover in this case it can be seen that they are all orthogonal to the vector n = (6,−1,4,−4,0), so it can be deduced that the row space consists of all vectors in R5 that are orthogonal to n.