# Column space

{{ safesubst:#invoke:Unsubst||$N=Merge |date=__DATE__ |$B= Template:MboxTemplate:DMCTemplate:Merge partner }} The column vectors of a matrix. The column space of this matrix is the vector space generated by linear combinations of the column vectors.

In linear algebra, the column space C(A) of a matrix A (sometimes called the range of a matrix) is the set of all possible linear combinations of its column vectors.

Let K be a field (such as real or complex numbers). The column space of an m × n matrix with components from K is a linear subspace of the m-space Km. The dimension of the column space is called the rank of the matrix. A definition for matrices over a ring K (such as integers) is also possible.

The column space of a matrix is the image or range of the corresponding matrix transformation.

## Definition

Let K be a field of scalars. Let A be an m × n matrix, with column vectors v1v2, ..., vn. A linear combination of these vectors is any vector of the form

$c_{1}\mathbf {v} _{1}+c_{2}\mathbf {v} _{2}+\cdots +c_{n}\mathbf {v} _{n},$ where c1c2, ..., cn are scalars. The set of all possible linear combinations of v1, ... ,vn is called the column space of A. That is, the column space of A is the span of the vectors v1, ... , vn.

Any linear combination of the column vectors of a matrix A can be written as the product of A with a column vector:

${\begin{array}{rcl}A{\begin{bmatrix}c_{1}\\\vdots \\c_{n}\end{bmatrix}}&=&{\begin{bmatrix}a_{11}&\cdots &a_{1n}\\\vdots &\ddots &\vdots \\a_{m1}&\cdots &a_{mn}\end{bmatrix}}{\begin{bmatrix}c_{1}\\\vdots \\c_{n}\end{bmatrix}}={\begin{bmatrix}c_{1}a_{11}+&\cdots &+c_{n}a_{1n}\\\vdots &\vdots &\vdots \\c_{1}a_{m1}+&\cdots &+c_{n}a_{mn}\end{bmatrix}}=c_{1}{\begin{bmatrix}a_{11}\\\vdots \\a_{m1}\end{bmatrix}}+\cdots +c_{n}{\begin{bmatrix}a_{1n}\\\vdots \\a_{mn}\end{bmatrix}}\\&=&c_{1}\mathbf {v} _{1}+\cdots +c_{n}\mathbf {v} _{n}\end{array}}$ Therefore, the column space of A consists of all possible products Ax, for x ∈ Cn. This is the same as the image (or range) of the corresponding matrix transformation.

Example
If $A={\begin{bmatrix}1&0\\0&1\\2&0\end{bmatrix}}$ , then the column vectors are v1 = (1, 0, 2)T and v2 = (0, 1, 0)T.
A linear combination of v1 and v2 is any vector of the form
$c_{1}{\begin{bmatrix}1\\0\\2\end{bmatrix}}+c_{2}{\begin{bmatrix}0\\1\\0\end{bmatrix}}={\begin{bmatrix}c_{1}\\c_{2}\\2c_{1}\end{bmatrix}}\,$ The set of all such vectors is the column space of A. In this case, the column space is precisely the set of vectors (xyz) ∈ R3 satisfying the equation z = 2x (using Cartesian coordinates, this set is a plane through the origin in three-dimensional space).

## Basis

The columns of A span the column space, but they may not form a basis if the column vectors are not linearly independent. Fortunately, elementary row operations do not affect the dependence relations between the column vectors. This makes it possible to use row reduction to find a basis for the column space.

For example, consider the matrix

$A={\begin{bmatrix}1&3&1&4\\2&7&3&9\\1&5&3&1\\1&2&0&8\end{bmatrix}}{\text{.}}$ The columns of this matrix span the column space, but they may not be linearly independent, in which case some subset of them will form a basis. To find this basis, we reduce A to reduced row echelon form:

${\begin{bmatrix}1&3&1&4\\2&7&3&9\\1&5&3&1\\1&2&0&8\end{bmatrix}}\sim {\begin{bmatrix}1&3&1&4\\0&1&1&1\\0&2&2&-3\\0&-1&-1&4\end{bmatrix}}\sim {\begin{bmatrix}1&0&-2&1\\0&1&1&1\\0&0&0&-5\\0&0&0&5\end{bmatrix}}\sim {\begin{bmatrix}1&0&-2&0\\0&1&1&0\\0&0&0&1\\0&0&0&0\end{bmatrix}}{\text{.}}$ At this point, it is clear that the first, second, and fourth columns are linearly independent, while the third column is a linear combination of the first two. (Specifically, v3 = –2v1 + v2.) Therefore, the first, second, and fourth columns of the original matrix are a basis for the column space:

${\begin{bmatrix}1\\2\\1\\1\end{bmatrix}},\;\;{\begin{bmatrix}3\\7\\5\\2\end{bmatrix}},\;\;{\begin{bmatrix}4\\9\\1\\8\end{bmatrix}}{\text{.}}$ Note that the independent columns of the reduced row echelon form are precisely the columns with pivots. This makes it possible to determine which columns are linearly independent by reducing only to echelon form.

The above algorithm can be used in general to find the dependence relations between any set of vectors, and to pick out a basis from any spanning set. A different algorithm for finding a basis from a spanning set is given in the row space article; finding a basis for the column space of A is equivalent to finding a basis for the row space of the transpose matrix AT.

## Dimension

{{#invoke:main|main}} The dimension of the column space is called the rank of the matrix. The rank is equal to the number of pivots in the reduced row echelon form, and is the maximum number of linearly independent columns that can be chosen from the matrix. For example, the 4 × 4 matrix in the example above has rank three.

Because the column space is the image of the corresponding matrix transformation, the rank of a matrix is the same as the dimension of the image. For example, the transformation R4 → R4 described by the matrix above maps all of R4 to some four-dimensional subspace.

The nullity of a matrix is the dimension of the null space, and is equal to the number of columns in the reduced row echelon form that do not have pivots. The rank and nullity of a matrix A with n columns are related by the equation:

${\text{rank}}(A)+{\text{nullity}}(A)=n.\,$ This is known as the rank-nullity theorem.

## Relation to the left null space

The left null space of A is the set of all vectors x such that xTA = 0T. It is the same as the null space of the transpose of A. The product of the matrix AT and the vector x can be written in terms of the dot product of vectors:

$A^{\mathsf {T}}\mathbf {x} ={\begin{bmatrix}\mathbf {v} _{1}\cdot \mathbf {x} \\\mathbf {v} _{2}\cdot \mathbf {x} \\\vdots \\\mathbf {v} _{n}\cdot \mathbf {x} \end{bmatrix}},$ because row vectors of AT are transposes of column vectors vk of A. Thus ATx = 0 if and only if x is orthogonal (perpendicular) to each of the column vectors of A.

It follows that the left null space (the null space of AT) is the orthogonal complement to the column space of A.

For a matrix A, the column space, row space, null space, and left null space are sometimes referred to as the four fundamental subspaces.

## For matrices over a ring

Similarly the column space (sometimes disambiguated as right column space) can be defined for matrices over a ring K as

$\sum \limits _{k=1}^{n}\mathbf {v} _{k}c_{k}$ for any c1, ..., cn, with replacement of the vector m-space with "right free module", which changes the order of scalar multiplication of the vector vk to the scalar ck such that it is written in an unusual order vectorscalar.