Understanding the concept of a basis is fundamental to mastering linear algebra. Because of that, a basis provides the minimal set of building blocks required to construct every vector within a given subspace. Without a basis, a subspace is an amorphous set of infinite possibilities; with a basis, it becomes a structured, finite-dimensional coordinate system. Finding the basis of a subspace is a procedural skill that relies heavily on the concepts of linear independence and span, and it serves as the gateway to understanding dimension, rank, and linear transformations Took long enough..
What Defines a Basis?
Before diving into the computational methods, it is crucial to solidify the definition. A basis for a subspace $W$ of a vector space $V$ is a set of vectors $\mathcal{B} = {\mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k}$ that satisfies two distinct conditions:
- Spanning Set: The vectors must span the subspace. This means every vector $\mathbf{w} \in W$ can be written as a linear combination of the basis vectors: $\mathbf{w} = c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \dots + c_k\mathbf{v}_k$.
- Linear Independence: No vector in the set can be written as a linear combination of the others. Formally, the equation $c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \dots + c_k\mathbf{v}_k = \mathbf{0}$ has only the trivial solution $c_1 = c_2 = \dots = c_k = 0$.
If a set spans the space but is dependent, it contains redundant vectors. If it is independent but does not span, it fails to reach every corner of the subspace. A basis hits the "sweet spot": maximal efficiency with complete coverage. The number of vectors in any basis for $W$ is the dimension of $W$, denoted $\dim(W)$ And that's really what it comes down to..
Scenario 1: Basis for the Column Space (Col A)
One of the most common tasks in linear algebra is finding a basis for the column space of a matrix $A$. The column space, $\text{Col } A$, is the span of the column vectors of $A$. Since the columns of $A$ automatically span $\text{Col } A$, the only challenge is extracting a linearly independent subset Simple, but easy to overlook..
The Pivot Column Method: This is the standard, most reliable algorithm.
- Row Reduce: Compute the reduced row echelon form (RREF) of matrix $A$, or simply an echelon form (REF). Let’s call this matrix $U$.
- Identify Pivot Columns: Locate the columns in $U$ that contain leading entries (pivots).
- Select Corresponding Columns: The basis for $\text{Col } A$ consists of the columns from the original matrix $A$ that correspond to the pivot columns in $U$.
Why the original matrix? Row operations change the column space. The column space of $U$ is generally not the same as the column space of $A$. That said, row operations preserve the linear dependence relations among the columns. If columns 1, 3, and 5 are pivot columns in $U$, then columns 1, 3, and 5 of $A$ are linearly independent and span $\text{Col } A$ Which is the point..
Example: Let $A = \begin{bmatrix} 1 & 2 & 3 \ 2 & 4 & 6 \ 1 & 2 & 4 \end{bmatrix}$. Row reducing yields $U = \begin{bmatrix} 1 & 2 & 0 \ 0 & 0 & 1 \ 0 & 0 & 0 \end{bmatrix}$. Pivots are in columns 1 and 3. Basis for $\text{Col } A$: $\left{ \begin{bmatrix} 1 \ 2 \ 1 \end{bmatrix}, \begin{bmatrix} 3 \ 6 \ 4 \end{bmatrix} \right}$. Dimension (Rank) = 2 The details matter here..
Scenario 2: Basis for the Null Space (Nul A)
The null space of $A$, $\text{Nul } A$, is the set of all solutions to the homogeneous equation $A\mathbf{x} = \mathbf{0}$. Unlike the column space, the null space is not explicitly given by the columns of $A$; it must be solved for.
The Parametric Vector Form Method:
- Row Reduce: Find the RREF of $A$. (RREF is preferred over REF here for cleaner parameter assignment).
- Identify Free Variables: Columns without pivots correspond to free variables ($x_2, x_4$, etc.).
- Express Basic Variables: Write each basic variable (pivot columns) in terms of the free variables.
- Decompose the Solution Vector: Write the general solution vector $\mathbf{x}$ as a sum of vectors, each multiplied by a single free variable parameter.
- The Vectors are the Basis: The vectors attached to the parameters form a basis for $\text{Nul } A$.
Example: Using the RREF from above: $U = \begin{bmatrix} 1 & 2 & 0 \ 0 & 0 & 1 \ 0 & 0 & 0 \end{bmatrix}$. System: $x_1 + 2x_2 = 0$, $x_3 = 0$. Free variable: $x_2$. Solution: $x_1 = -2x_2$, $x_3 = 0$. Vector form: $\mathbf{x} = x_2 \begin{bmatrix} -2 \ 1 \ 0 \end{bmatrix}$. Basis for $\text{Nul } A$: $\left{ \begin{bmatrix} -2 \ 1 \ 0 \end{bmatrix} \right}$. Dimension (Nullity) = 1.
Note that the vectors produced by this method are automatically linearly independent because each vector has a "1" in a unique free-variable slot and "0" in the others The details matter here. Surprisingly effective..
Scenario 3: Basis for a Subspace Defined by a Span
Often, a subspace $W$ is defined explicitly as $W = \text{Span}{\mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_p}$. The goal is to discard the dependent vectors.
The Row Space Method (Treating Vectors as Rows): This is computationally efficient for checking independence of a given set.
- Construct Matrix: Create a matrix $B$ where the given vectors $\mathbf{v}_1, \dots, \mathbf{v}_p$ are the rows of $B$.
- Row Reduce: Find the RREF (or REF) of $B$.
- Non-Zero Rows: The non-zero rows of the resulting echelon form constitute a basis for the row space of $B$, which is exactly the span of the original vectors (i.e., the subspace $W$).
Why this works: Row operations preserve the row space. The non-zero rows in echelon form are linearly independent (due to the stair-step pattern of pivots) and they span the same space as the original rows.
Alternative: The Column Space Method (Treating Vectors as Columns):
- Construct matrix $C$ with vectors as columns.
- Row reduce $C$.
- Identify pivot columns in the reduced form.
- Select the corresponding columns from the original matrix $C$.
Both methods yield a valid basis. The row method yields vectors that look "cleaner" (often with leading 1s), while the column method yields vectors that are actual members of the original spanning set.
Scenario 4: Basis for a Subspace Defined by Equations
Subspaces are frequently defined implicitly by a system of linear homogeneous equations (e.g., a plane through the origin in $\mathbb{R}^3
When a subspace is given as the set of all solutions to a homogeneous linear system
[
A\mathbf{x}= \mathbf{0},
]
the problem reduces to finding a basis for the null space of (A). The procedure is essentially the same as in Scenario 2, but it is worth spelling out the steps explicitly because the “equation‑defining” viewpoint appears frequently in applications (e.Day to day, g. , describing a plane, a line, or the intersection of several hyperplanes).
Scenario 4: Basis for a Subspace Defined by Homogeneous Equations
-
Form the coefficient matrix.
Write the system (A\mathbf{x}= \mathbf{0}) with (A) an (m\times n) matrix whose rows are the coefficient vectors of the equations. -
Row‑reduce to RREF.
Compute the reduced row‑echelon form (U=\operatorname{rref}(A)). Identify the pivot columns (basic variables) and the free columns (free variables). -
Express basic variables in terms of free ones.
From each non‑zero row of (U) write an equation that isolates the basic variable corresponding to that row’s pivot. All basic variables become linear combinations of the free variables And that's really what it comes down to.. -
Build the solution vectors.
For each free variable (x_{f_j}) set it to 1 while all other free variables are set to 0, and compute the resulting vector (\mathbf{x}). Collect these vectors; each one corresponds to a distinct free variable And it works.. -
The collected vectors form a basis.
By construction they are linearly independent (each has a 1 in a unique free‑variable position and 0 elsewhere) and they span the whole solution set, i.e., (\operatorname{Nul}A). Hence they constitute a basis for the subspace defined by the original equations It's one of those things that adds up..
Example
Consider the subspace of (\mathbb{R}^4) given by
[
\begin{cases}
x_1 + 2x_2 - x_3 + 4x_4 = 0,\
3x_1 - x_2 + 2x_3 - x_4 = 0.
\end{cases}
]
-
Coefficient matrix
[ A=\begin{bmatrix} 1 & 2 & -1 & 4\ 3 & -1 & 2 & -1 \end{bmatrix}. ] -
RREF
[ U=\operatorname{rref}(A)= \begin{bmatrix} 1 & 0 & \tfrac{3}{7} & -\tfrac{2}{7}\[2pt] 0 & 1 & -\tfrac{5}{7} & \tfrac{15}{7} \end{bmatrix}. ]
Pivot columns: 1 and 2 (basic variables (x_1,x_2)).
Free columns: 3 and 4 (free variables (x_3,x_4)).
-
Solve for basics
From the first row: (x_1 = -\tfrac{3}{7}x_3 + \tfrac{2}{7}x_4).
From the second row: (x_2 = \tfrac{5}{7}x_3 - \tfrac{15}{7}x_4) Simple, but easy to overlook. That alone is useful.. -
Construct basis vectors
-
Set (x_3=1,;x_4=0):
(\displaystyle \mathbf{v}_1=\begin{bmatrix} -\tfrac{3}{7}\[2pt] \tfrac{5}{7}\[2pt] 1\[2pt] 0 \end{bmatrix}). -
Set (x_3=0,;x_4=1):
(\displaystyle \mathbf{v}_2=\begin{bmatrix} \tfrac{2}{7}\[2pt] -\tfrac{15}{7}\[2pt] 0\[2pt] 1 \end{bmatrix}).
- Basis
[ \boxed{;\Bigl{\begin{bmatrix} -3/7\ 5/7\ 1\ 0 \end{bmatrix}, \begin{bmatrix} 2/7\ -15/7\ 0\ 1 \end{bmatrix}\Bigr};} ] is a basis for the subspace. Its dimension (nullity) is 2, which agrees with the rank‑nullity theorem: (\operatorname{rank}A=2) and (n=4), so (\dim\operatorname{Nul}A = 4-2 =2).
Closing Remarks
The four scenarios presented—finding a basis for a column