Skip to main content

Column Space

We discussed that a space is a vector space, if all linear combination of vectors (that are inside that space) lies in that space.
But what is this Column space? We know what is space, but what we meant by Column?
Here Column is referring to Column of a matrix.

Example in 3D vector space

Consider a matrix A=[121351]A=\begin{bmatrix} 1 & 2\\ 1 & 3\\ 5 & 1\\ \end{bmatrix} here each column is considered as a vector.
Matrix AA has 22 columns so we have 22 vectors, say

u=[115]R3;v=[231]R3\vec{u}= \begin{bmatrix} 1\\1\\5\\ \end{bmatrix}\in\mathbb{R}^3;\quad \vec{v}= \begin{bmatrix} 2\\3\\1\\ \end{bmatrix}\in\mathbb{R}^3
note

Column space of matrix AA is defined by the vector space of these vectors u,v\vec{u},\vec{v} and vector space of u,v\vec{u},\vec{v} is all the linear combinations of vectors u\vec{u} and v\vec{v}.

2 vectors in 3D vector space2 vectors in 3D vector space

How does that vector space look like?

note

Here we can see u\vec{u} and v\vec{v} are non-parallel vectors so vector space of u\vec{u} and v\vec{v} is a plane.

Equation of plane

General equation of plane is ax+by+cz+d=0ax+by+cz+d=0 we know this plane passes through origin so d=0d=0, and <a,b,c>\lt a,b,c \gt is normal to plane which we can get by taking cross product between v\vec{v} and u\vec{u}.
u×v=<14,9,1>\vec{u}\times\vec{v} = \lt -14,9,1 \gt so equation of plane is, 14x+9y+z=0-14x+9y+z=0

2D Subspace inside 3D vector space via 2 non parallel vectors2D Subspace inside 3D vector space via 2 non parallel vectors
Code To plot this (python)
import MultiVariable as mvar
import numpy as np
%matplotlib qt
def f(x,y):
return 14*x - 9*y

m = mvar.MultiVariable(count=10, x_range=(-1,3), y_range=(-1,3))
vectors = np.array([
[1,1,5],
[2,3,1],
])
origin = np.array([0,0,0])
m.plot_3D_vectors(vectors, origin, plot_separately=False)
m.plot_surface_color_3D(f,plot_separately=False, alpha=0.3)
m.setX_limit((-1,3))
m.setY_limit((-1,3.5))
Download MultiVariable class ⬇

Example in 4D vector space

Consider a matrix A=[1122463694812]A=\begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix} here each column is considered as a vector.
Matrix AA has 33 columns so we have 33 vectors, say

u=[1234]R4;v=[1468]R4;w=[26912]R4\vec{u}= \begin{bmatrix} 1\\2\\3\\4\\ \end{bmatrix}\in\mathbb{R}^4;\quad\vec{v}= \begin{bmatrix} 1\\4\\6\\8\\ \end{bmatrix}\in\mathbb{R}^4;\quad\vec{w}= \begin{bmatrix} 2\\6\\9\\12\\ \end{bmatrix}\in\mathbb{R}^4

So we have 3, 43,\ 4-dimensional vectors.
So

note

Column space of matrix AA is defined by the vector space of these vectors u,v,w\vec{u},\vec{v},\vec{w} and vector space of u,v,w\vec{u},\vec{v},\vec{w} is all the linear combinations of vectors u,v\vec{u},\vec{v} and w\vec{w}.

How does that vector space look like?

Does it fill the whole 4-dimensional space?

We have 33 vectors in R4\mathbb{R}^4 and we can't fill a 44 dimensional space with just 33 vectors, doesn't matter how they are oriented.
So the answer is No

Does it fill a 3-dimensional space?

Here you can see that w=u+v\vec{w}=\vec{u}+\vec{v}, so w\vec{w} lives in vector space of u\vec{u} and v\vec{v} So in total we have just 22 vectors u\vec{u} and v\vec{v} and we can't fill a 33 dimensional space with just 2 vectors, we at least need 33 (non-parallel) vectors to fill a 33-dimensional space.
So answer is No

Does it fill a 2-dimensional space?

Here you can see that w=u+v\vec{w}=\vec{u}+\vec{v}, so w\vec{w} lives in vector space of u\vec{u} and v\vec{v} , and, u\vec{u} and v\vec{v} are non-parallel vectors so vector space of u\vec{u} and v\vec{v} is a plane.
Combined all of that vector space of u\vec{u}, v\vec{v} and w\vec{w} is a plane \Rightarrow Column space of matrix AA is a plane.
So answer is Yes vector space of u,v\vec{u},\vec{v} and w\vec{w} fills a 22-dimensional space?

info

Column space of a matrix AA is defined by all the linear combinations of it's column vectors. Here we will denote the column space of matrix AA as C(A)\mathbf{C}(A)

Matrix Notation

We saw how we can find Column space using columns as vectors. Now let's find Column space of some matrix AA in matrix notation.
Say we have a matrix AA
Now answer this,
Does Ax=bA\vec{x}=\vec{b} always have a solution for every b\vec{b}?, and if the answer is No then which b\vec{b} do have a solution?
if AA is a n×mn\times m matrix, then x\vec{x} is a m×1m\times 1 vector and b\vec{b} is n×1n\times 1 vector.

Say our matrix is A=[1122463694812]A=\begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix} then

x=[x1x2x3];xiR and b=[b1b2b3b4];biR\vec{x}=\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix};\quad x_i\in\mathbb{R} \text{ and } \vec{b}=\begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ b_4 \\ \end{bmatrix};\quad b_i\in\mathbb{R}

Does Ax=bA\vec{x}=\vec{b} always have a solution for every b\vec{b}?

Here we have 3 variables x1,x2,x3x_1,x_2,x_3 and 4 equations so, one of the bib_i depends on one of bjb_j and iji\neq j So we can't have solution for every b\vec{b}, because of this dependency. So it rules out the possibility of 44 dimensional column space.
Because to be a Column space we must get every vector in that column space by the linear combinations of column vectors.

What are the b\vec{b} that are possible?
Ax=[1122463694812][x1x2x3]=[b1b2b3b4]A\vec{x}= \begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ b_4 \\ \end{bmatrix}

Ok we can't solve it for every b\vec{b} but we can solve it for some b\vec{b}.
For example:

For b=[1234]\vec{b}=\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \\ \end{bmatrix}

For b=[1234]\vec{b}=\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \\ \end{bmatrix} \quad x=[100]\vec{x}=\begin{bmatrix} 1 \\ 0\\ 0\\ \end{bmatrix}

Ax=[1122463694812][100]=[1234]A\vec{x}= \begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix} \begin{bmatrix} 1\\ 0\\ 0\\ \end{bmatrix} = \begin{bmatrix} 1\\ 2\\ 3\\ 4\\ \end{bmatrix}

For b=[1468]\vec{b}=\begin{bmatrix} 1 \\ 4 \\ 6 \\ 8 \\ \end{bmatrix}

For b=[1468]\vec{b}=\begin{bmatrix} 1 \\ 4 \\ 6 \\ 8 \\ \end{bmatrix} \quad x=[010]\vec{x}=\begin{bmatrix} 0 \\ 1\\ 0\\ \end{bmatrix}

Ax=[1122463694812][010]=[1468]A\vec{x}= \begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix} \begin{bmatrix} 0\\ 1\\ 0\\ \end{bmatrix} = \begin{bmatrix} 1\\ 4\\ 6\\ 8\\ \end{bmatrix}

Now you can see that the b\vec{b} that can solve this system of equation is the b\vec{b} that is in the column space of matrix AA.
So b\vec{b} is the linear combination of columns of matrix AA

Dependency

You can see that in our matrix

A=[1122463694812]A=\begin{bmatrix} 1 & 1 & 2\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{bmatrix}

there is a column that we can get with linear combination of other columns.
(here I represent column ii as cic_i) c3=c1+c2c_3=c_1+c_2
So c3c_3 is in the vector space of c1c_1 and c2c_2.

note

In above example if we remove one of the column from matrix AA then the column space of matrix A will still be same.
say we drop column 33 (We can drop column 11 or column22)
So say A=[11243648]A'=\begin{bmatrix} 1 & 1 \\ 2 & 4 \\ 3 & 6 \\ 4 & 8 \\ \end{bmatrix}
Then AxA'\vec{x} will also give all possible b\vec{b} that AxA\vec{x} can.

So we can say that

note

Column space of AA and AA' are same, C(A)=C(A)\mathbf{C}(A) = \mathbf{C}(A')

But we can't drop two columns from AA because any two columns in our matrix AA are independent of each other.
So we can say that Column space of matrix AA is a 22-dimensional subspace inside 44-dimensional space.