Basis and Dimension
This note continues Gilbert Strang's Section 3.4, Independence, Basis and Dimension.
The central idea is that a basis is not one vector. A basis is a collection of basis vectors that together describe an entire vector space or subspace.
1. Basis versus basis vectors
Suppose
\[ v_1=\begin{bmatrix}1\\0\end{bmatrix}, \qquad v_2=\begin{bmatrix}0\\1\end{bmatrix}. \]
Then
\[ \boxed{\{v_1,v_2\}} \]
is one basis for \(\mathbb R^2\).
The individual vectors \(v_1\) and \(v_2\) are basis vectors.
So the distinction is:
\[ \boxed{\text{basis}=\text{the whole collection}} \]
and
\[ \boxed{\text{basis vectors}=\text{the individual building blocks inside that collection}}. \]
The basis remains fixed while the coefficients change depending on which vector we want to describe.
For example,
\[ \begin{bmatrix}3\\5\end{bmatrix} =3v_1+5v_2, \]
while
\[ \begin{bmatrix}-2\\7\end{bmatrix} =-2v_1+7v_2. \]
The same basis can therefore describe every vector in the space.
2. The two conditions for a basis
A collection of vectors is a basis for a space only if both conditions hold:
\[ \boxed{1.\ \text{The vectors are linearly independent.}} \]
\[ \boxed{2.\ \text{The vectors span the space.}} \]
The practical interpretation is
\[ \boxed{\text{basis}=\text{enough building blocks to describe everything, with no redundancy}.} \]
Independence removes redundancy.
Span guarantees completeness.
3. A non-square matrix can still contain a basis
A basis is a property of a vector space or subspace, not something restricted to square matrices.
For example,
\[ A= \begin{bmatrix} 1&0&2\\ 0&1&3 \end{bmatrix} \]
is a \(2\times3\) matrix.
Its columns are
\[ v_1=\begin{bmatrix}1\\0\end{bmatrix}, \qquad v_2=\begin{bmatrix}0\\1\end{bmatrix}, \qquad v_3=\begin{bmatrix}2\\3\end{bmatrix}. \]
Since
\[ v_3=2v_1+3v_2, \]
all three columns are dependent.
But \(v_1\) and \(v_2\) are independent and span the column space.
Therefore
\[ \boxed{\{v_1,v_2\}\text{ is a basis for }C(A).} \]
So a non-square matrix can certainly have pivot columns that form a basis for its column space.
4. Basis for the row space
For the column space, the pivot columns must be taken from the original matrix \(A\) because row operations change the column vectors.
The row space behaves differently.
Row operations replace rows by linear combinations of existing rows, so they preserve the space spanned by the rows.
Therefore
\[ \boxed{\operatorname{Row}(A)=\operatorname{Row}(R)}. \]
This means the nonzero rows of the echelon or reduced matrix \(R\) provide a natural basis for the row space.
For example,
\[ A= \begin{bmatrix} 1&2\\ 2&4 \end{bmatrix} \]
reduces to
\[ R= \begin{bmatrix} 1&2\\ 0&0 \end{bmatrix}. \]
The second row of \(A\) was already
\[ (2,4)=2(1,2). \]
So it contributed no new row direction.
A basis for the row space is therefore
\[ \boxed{\{(1,2)\}}. \]
The useful contrast is
\[ \boxed{\text{basis for }C(A):\text{ pivot columns of original }A} \]
while
\[ \boxed{\text{basis for row space: nonzero rows of }R}. \]
5. A vector space can have many different bases
For \(\mathbb R^2\), one basis is
\[ \left\{ \begin{bmatrix}1\\0\end{bmatrix}, \begin{bmatrix}0\\1\end{bmatrix} \right\}. \]
Another is
\[ \left\{ \begin{bmatrix}1\\1\end{bmatrix}, \begin{bmatrix}1\\-1\end{bmatrix} \right\}. \]
The actual basis vectors are different, but both collections are independent and both span \(\mathbb R^2\).
Thus the basis itself is not unique.
However, something important is fixed: the number of vectors in every basis.
6. Why every basis of the same space has the same number of vectors
Suppose one basis for a vector space is
\[ \{v_1,\ldots,v_m\} \]
and another basis for the same space is
\[ \{w_1,\ldots,w_n\}. \]
Assume
\[ n>m. \]
Because the \(v\)'s form a basis, they span the entire space. Therefore every \(w_j\) must be a combination of the \(v\)'s.
But that means we are trying to have \(n\) independent \(w\)-vectors represented using only \(m\) independent directions, with
\[ n>m. \]
From the earlier result,
\[ \boxed{n>m\Rightarrow\text{dependence}.} \]
So the \(w\)'s would have to be dependent.
But a basis must be independent.
Contradiction.
Therefore \(n>m\) is impossible.
The same argument rules out \(m>n\).
So
\[ \boxed{m=n}. \]
Here \(m\) and \(n\) refer to the number of vectors in two different bases of the same vector space. They are not necessarily the row and column counts of an original matrix.
7. Dimension
Because every basis of the same space has the same number of vectors, that number belongs to the space itself.
Strang calls it the dimension.
\[ \boxed{\dim(S)=\text{number of vectors in any basis of }S.} \]
So
\[ \dim(\mathbb R^2)=2, \]
and
\[ \dim(\mathbb R^3)=3. \]
Dimension can be understood as
\[ \boxed{\text{the number of independent directions or degrees of freedom in the space}.} \]
Equivalently,
\[ \boxed{\text{dimension}=\text{number of independent building blocks needed to describe the whole space}.} \]
8. Number of components is not the same as dimension of a subspace
Consider
\[ v_1= \begin{bmatrix} 1\\1\\2 \end{bmatrix}, \qquad v_2= \begin{bmatrix} 2\\2\\5 \end{bmatrix}. \]
These are vectors in \(\mathbb R^3\), so each vector has three components.
But they are independent and span only a plane through the origin.
Therefore that plane has
\[ \boxed{\dim=2}. \]
So
\[ \boxed{\text{number of components of each vector}\neq\text{dimension of the subspace}.} \]
The plane lives inside \(\mathbb R^3\), but it has only two independent directions.
9. Strang's line and plane example
Consider
\[ v=(1,5,2). \]
The line through \(v\) consists of
\[ \{cv:c\in\mathbb R\}. \]
One nonzero vector is enough to span that entire line.
Therefore
\[ \boxed{\dim(\text{line})=1}. \]
Now consider the plane perpendicular to that line:
\[ x+5y+2z=0. \]
Two vectors in this plane are
\[ s_1= \begin{bmatrix} -5\\1\\0 \end{bmatrix}, \qquad s_2= \begin{bmatrix} -2\\0\\1 \end{bmatrix}. \]
They are independent and span the plane.
Therefore
\[ \boxed{\dim(\text{plane})=2}. \]
This plane is also the nullspace of
\[ A=\begin{bmatrix}1&5&2\end{bmatrix}. \]
Here
\[ n=3, \qquad r=1. \]
So the number of free variables is
\[ n-r=2. \]
Those two free variables produce the two special solutions \(s_1\) and \(s_2\).
Therefore
\[ \boxed{\dim N(A)=n-r}. \]
Strang also states
\[ \boxed{\dim C(A)=r}. \]
So rank, free variables, basis, and dimension now connect:
\[ \boxed{r=\text{number of independent column directions}} \]
and
\[ \boxed{n-r=\text{number of independent nullspace directions}.} \]
10. Connection to quantum computing
The same idea of dimension applies directly to quantum state spaces.
For one qubit, the state space has dimension
\[ 2. \]
This does not mean there are only two possible quantum states.
There are infinitely many states of the form
\[ |\psi\rangle=\alpha|0\rangle+\beta|1\rangle. \]
The number 2 means that exactly two independent basis vectors are sufficient to describe every possible one-qubit state.
For two qubits,
\[ \dim=4, \]
with computational basis
\[ |00\rangle,\quad|01\rangle,\quad|10\rangle,\quad|11\rangle. \]
For three qubits,
\[ \dim=8. \]
A general three-qubit state is
\[ |\psi\rangle =\alpha_0|000\rangle +\alpha_1|001\rangle +\cdots +\alpha_7|111\rangle. \]
The eight computational basis states are not the only possible quantum states. They are the eight independent basis directions from which infinitely many quantum states can be constructed.
Therefore, for \(q\) qubits,
\[ \boxed{\dim(\mathcal H)=2^q}. \]
The new meaning of \(2^q\) is therefore not merely the count of computational-basis strings. It is the dimension of the quantum state space.
That immediately implies:
- every basis of the \(q\)-qubit Hilbert space contains exactly \(2^q\) vectors;
- any collection of more than \(2^q\) vectors in that space must be linearly dependent;
- an arbitrary state is described using \(2^q\) basis coordinates;
- a general operator on that space is represented by a \(2^q\times2^q\) matrix.
A particular state may have many zero amplitudes, so it may visibly involve fewer basis vectors, but the full state space still has dimension \(2^q\).
Core mental model
\[ \boxed{\text{basis}=\text{complete collection of independent building blocks}} \]
\[ \boxed{\text{basis vector}=\text{one building block inside that collection}} \]
\[ \boxed{\text{dimension}=\text{number of basis vectors required by the space}} \]
and for a matrix with \(n\) columns and rank \(r\):
\[ \boxed{\dim C(A)=r} \]
\[ \boxed{\dim N(A)=n-r}. \]
Note metadata
- Note type: learning-note
- Subject: learning-notes
- Source: Introduction to Linear Algebra, 5th Edition — Section 3.4: Independence, Basis and Dimension
Related notes
- Span, Basis, and Column Space: Complete Building Blocks Without Redundancy (Post ID: 289)
- Understanding Linear Independence Through Ax = 0: Zero Vectors, Pivots, and Why n > m Forces Dependence (Post ID: 270)
- Understanding Rank and Rank-One Matrices: Pivots, Redundancy, and Nullspace Geometry (Post ID: 202)