The Ultimate Guide to Understanding Basis and Dimension in Vector Spaces
Understanding basis and dimension in vector spaces is one of the most important concepts in linear algebra because they describe the fundamental structure of vector spaces. Whether you are working with vectors in \( \mathbb{R}^n \), matrices, or polynomials, basis and dimension help explain how vector spaces are built, how vectors relate to one another, and how complicated a space really is. These ideas appear throughout mathematics and many other technical fields.
In this guide, we will begin by defining basis and exploring how to test whether a set forms a basis. Then we will study dimension and learn how to compute it for different vector spaces. Finally, we will examine how to expand sets that are too small and shrink sets that contain redundant vectors to create valid bases. By the end of this tutorial, you will have a solid understanding of how basis and dimension work and how these concepts fit into the larger picture of linear algebra.
Basis of a Vector Space
A basis is one of the most important concepts in linear algebra because it describes the vectors needed to build an entire vector space. Before studying basis, it is important to understand the ideas of vector spaces, span, and linear independence. If you need a review of these topics, see the articles A Beginner-Friendly Approach to Understanding Vector Spaces and Subspaces, Beginner Friendly Guide to Span and Spanning Sets: A Complete Step-by-Step Tutorial, and Linear Dependence vs Independence Explained for Beginners: Everything You Need to Know.
Definition
Let \( V \) be a vector space. A set of vectors
$$\{v_1,v_2,\dots,v_n\}$$
is called a basis for \( V \) if the vectors span \( V \) and hhe vectors are linearly independent.
The spanning condition guarantees that every vector in the space can be written as a linear combination of the basis vectors, and the linear independence condition guarantees that none of the basis vectors can be written as a linear combination of the others.
Intuition
A basis acts like a coordinate system for a vector space. Every vector in the space can be uniquely described using the basis vectors. For example, the standard basis for \( \mathbb{R}^2 \) is
$$\hat{i} = \langle 1, 0 \rangle, \hat{j} = \langle 0, 1 \rangle,$$
and every vector in \( \mathbb{R}^2 \) can be written as
$$x\hat{i} + y\hat{j}.$$
The coefficients \( x \) and \( y \) become the coordinates of the vector relative to the basis.
How to Determine Whether a Set Forms a Basis
To determine whether a set forms a basis, we must verify both span and linear independence.
The exact procedure depends on the vector space involved, but the general strategy is always the same.
Suppose we are given vectors
$${v_1,v_2,\dots,v_n}.$$
To show that these form a basis, we proceed as follows.
Step 1: Check Linear Independence
Determine whether the equation
$$c_1v_1 + c_2v_2 + \cdots + c_nv_n = 0$$
has only the trivial solution
$$c_1 = c_2 = \cdots = c_n = 0.$$
If the only solution is the trivial solution, the vectors are linearly independent.
This often involves solving a homogeneous system of equations using Gaussian elimination. See How to Solve a System of Equations Using Gaussian Elimination: A Step-by-Step Guide for a detailed review of this process.
It may also require computing a determinant. For a review of determinants, please refer to How to Find the Determinant of a Matrix Step by Step: A Complete Beginner’s Guide.
Step 2: Check Span
Determine whether every vector in the space can be written as a linear combination of the given vectors.
For a review of linear combinations, please refer to the articles The Ultimate Step-by-Step Guide to Basic Matrix Operations for Beginners and Vector Operations Tutorial for Beginners: A Complete Step-by-Step Guide.
Step 3: Conclude Whether the Set Is a Basis
If the vectors are both linearly independent and form a spanning set, they form a basis. If either condition fails, the set is not a basis.
Basis Examples
Examples in \( \mathbb{R}^n \)
Example 1: Prove or disprove:
(a) \( \{ \langle 1, 2 \rangle, \langle 3, 1 \rangle \} \) forms a basis for \( \mathbb{R}^2 \).
(b) \( \{ \langle 1, 0, 2 \rangle, \langle 2, 1, 3 \rangle, \langle 0, 1, 1 \rangle \} \) forms a basis for \( \mathbb{R}^3 \).
(c) \( \{ \langle 1, 2 \rangle, \langle 2, 4 \rangle \} \) forms a basis for \( \mathbb{R}^2 \).
Solution: (a) \( \{ \langle 1, 2 \rangle, \langle 3, 1 \rangle \} \) forms a basis for \( \mathbb{R}^2 \).
From the definition of linear independence/dependence, we have
$$c_1\langle 1, 2 \rangle + c_2\langle 3, 1 \rangle = 0.$$
Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \), we get
$$\langle c_1, 2c_1 \rangle + \langle 3c_2, c_2 \rangle = 0.$$
Adding corresponding components gives
$$\langle c_1 + 3c_2, 2c_1 + c_2 \rangle = 0.$$
Next, we equate components to obtain the system of equations
$$\begin{aligned}
c_1 + 3c_2 &= 0 \\
2c_1 + c_2 &= 0
\end{aligned}.$$
In matrix form, this is
$$\begin{bmatrix}
1 & 3 \\
2 & 1
\end{bmatrix}
\begin{bmatrix}
c_1 \\
c_2
\end{bmatrix}
=
\begin{bmatrix}
0 \\
0
\end{bmatrix}.$$
We now take the determinant of the coefficient matrix to get
$$\begin{vmatrix}
1 & 3 \\
2 & 1
\end{vmatrix}.$$
Applying the formula for 2×2 determinants gives
$$(1)(1) – (3)(2).$$
Simplifying we get
$$1 – 6.$$
Subtracting, we arrive at
$$-5.$$
Since the determinant is nonzero, the only solution is the trivial solution, so the vectors are linearly independent. The span is given by
$$c_1\langle 1, 2 \rangle + c_2\langle 3, 1 \rangle.$$
Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \), we get
$$\langle c_1, 2c_1 \rangle + \langle 3c_2, c_2 \rangle.$$
Adding corresponding components gives
$$\langle c_1 + 3c_2, 2c_1 + c_2 \rangle.$$
Since \( c_1 \) and \( c_2 \) can be any real numbers, the span is
$$\mathbb{R}^2.$$
Since the vectors are linearly independent and span \( \mathbb{R}^2 \), the set forms a basis for \( \mathbb{R}^2 \).
(b) \( \{ \langle 1, 0, 2 \rangle, \langle 2, 1, 3 \rangle, \langle 0, 1, 1 \rangle \} \) forms a basis for \( \mathbb{R}^3 \).
From the definition of linear independence/dependence, we have
$$c_1\langle 1, 0, 2 \rangle + c_2\langle 2, 1, 3 \rangle + c_3\langle 0, 1, 1 \rangle = 0.$$
Multiplying each component of the first vector by \( c_1 \), each component of the second vector by \( c_2 \), and each component of the third vector by \( c_3 \), we get
$$\langle c_1, 0, 2c_1 \rangle + \langle 2c_2, c_2, 3c_2 \rangle + \langle 0, c_3, c_3 \rangle = 0.$$
Adding corresponding components gives
$$\langle c_1 + 2c_2, c_2 + c_3, 2c_1 + 3c_2 + c_3 \rangle = 0.$$
Next, we equate components to obtain the system of equations
$$\begin{aligned}
c_1 + 2c_2 &= 0 \\
c_2 + c_3 &= 0 \\
2c_1 + 3c_2 + c_3 &= 0
\end{aligned}.$$
In matrix form, this is
$$\begin{bmatrix}
1 & 2 & 0 \\
0 & 1 & 1 \\
2 & 3 & 1
\end{bmatrix}
\begin{bmatrix}
c_1 \\
c_2 \\
c_3
\end{bmatrix}
=
\begin{bmatrix}
0 \\
0 \\
0
\end{bmatrix}.$$
We now take the determinant of the coefficient matrix to get
$$\begin{vmatrix}
1 & 2 & 0 \\
0 & 1 & 1 \\
2 & 3 & 1
\end{vmatrix}.$$
Extending the matrix gives
$$\begin{vmatrix}
1 & 2 & 0 \\
0 & 1 & 1 \\
2 & 3 & 1
\end{vmatrix}
\begin{matrix}
1 & 2 \\
0 & 1 \\
2 & 3
\end{matrix}.$$
Computing the determinant by summing the products of the three diagonals running from the top-left to the bottom-right and subtracting the products of the three diagonals running from the bottom-left to the top-right, we obtain
$$(1)(1)(1) + (2)(1)(2) + (0)(0)(3) – (2)(1)(0) – (3)(1)(1) – (1)(0)(2).$$
Simplifying we get
$$1 + 4 + 0 – 0 – 3 – 0.$$
Adding and subtracting, we arrive at
$$2.$$
Since the determinant is nonzero, the only solution is the trivial solution, so the vectors are linearly independent. The span is given by
$$c_1\langle 1, 0, 2 \rangle + c_2\langle 2, 1, 3 \rangle + c_3\langle 0, 1, 1 \rangle.$$
Multiplying each component of the first vector by \( c_1 \), each component of the second vector by \( c_2 \), and each component of the third vector by \( c_3 \), we get
$$\langle c_1, 0, 2c_1 \rangle + \langle 2c_2, c_2, 3c_2 \rangle + \langle 0, c_3, c_3 \rangle.$$
Adding corresponding components gives
$$\langle c_1 + 2c_2, c_2 + c_3, 2c_1 + 3c_2 + c_3 \rangle.$$
Since \( c_1 \), \( c_2 \), and \( c_3 \) can be any real numbers, the span is
$$\mathbb{R}^3.$$
Since the vectors are linearly independent and span \( \mathbb{R}^3 \), the set forms a basis for \( \mathbb{R}^3 \).
(c) \( \{ \langle 1, 2 \rangle, \langle 2, 4 \rangle \} \) forms a basis for \( \mathbb{R}^2 \).
From the definition of linear independence/dependence, we have
$$c_1 \langle 1, 2 \rangle + c_2 \langle 2, 4 \rangle = 0.$$
Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \), we get
$$\langle c_1, 2c_1 \rangle + \langle 2c_2, 4c_2 \rangle = 0.$$
Adding corresponding components gives
$$\langle c_1 + 2c_2, 2c_1 + 4c_2 \rangle = 0.$$
Next, we equate components to obtain the system of equations
$$\begin{aligned}
c_1 + 2c_2 &= 0 \\
2c_1 + 4c_2 &= 0
\end{aligned},$$
In matrix form, this is
$$\begin{bmatrix}
1 & 2 \\
2 & 4
\end{bmatrix}
\begin{bmatrix}
c_1 \\
c_2
\end{bmatrix}
=
\begin{bmatrix}
0 \\
0
\end{bmatrix}.$$
We now take the determinant of the coefficient matrix to get
$$\begin{vmatrix}
1 & 2 \\
2 & 4
\end{vmatrix}.$$
Applying the formula for 2×2 determinants gives
$$(1)(4) – (2)(2).$$
Simplifying we get
$$4 – 4.$$
Subtracting, we arrive at
$$0.$$
Since the determinant is 0, the system has nontrivial solutions, so the set is linearly dependent, therefore it is not a basis.
Examples with Matrices
Example 2: Prove or disprove:
(a) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \}$$ forms a basis for \( M_{2 \times 2} \).
(b) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 2 & 0 \\ 0 & 0 \end{bmatrix} \}$$ forms a basis for \( M_{2 \times 2} \).
Solution: (a) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \}$$ forms a basis for \( M_{2 \times 2} \).
From the definition of linear independence/dependence, we have
$$c_1\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + c_2\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + c_3\begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} + c_4\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} = 0.$$
Multiplying each entry of the first matrix by \( c_1 \), each entry of the second matrix by \( c_2 \), each entry of the third matrix by \( c_3 \), and each entry of the fourth matrix by \( c_4 \), we get
$$\begin{bmatrix} c_1 & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & c_2 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ c_3 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & c_4 \end{bmatrix} = 0.$$
Adding corresponding entries, we get
$$\begin{bmatrix} c_1 & c_2 \\ c_3 & c_4 \end{bmatrix} = 0.$$
Next, we equate entries to obtain the system of equations
$$\begin{aligned}
c_1 = 0 \\
c_2 = 0 \\
c_3 = 0 \\
c_4 = 0
\end{aligned}.$$
Thus, the solution is
$$c_1 = 0, c_2 = 0, c_3 = 0, c_4 = 0.$$
The only solution is the trivial solution, so the vectors are linearly independent. The span is given by
$$c_1\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + c_2\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + c_3\begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} + c_4\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}.$$
Multiplying each entry of the first matrix by \( c_1 \), each entry of the second matrix by \( c_2 \), each entry of the third matrix by \( c_3 \), and each entry of the fourth matrix by \( c_4 \), we get
$$\begin{bmatrix} c_1 & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & c_2 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ c_3 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & c_4 \end{bmatrix}.$$
Adding corresponding entries, we get
$$\begin{bmatrix} c_1 & c_2 \\ c_3 & c_4 \end{bmatrix}.$$
Since \( c_1 \), \( c_2 \), \( c_3 \), and \( c_4 \) can be any real numbers, the span is
$$M_{2 \times 2}.$$
Since the vectors are linear independent and span \( M_{2 \times 2} \), the set forms a basis for \( M_{2 \times 2} \).
(b) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 2 & 0 \\ 0 & 0 \end{bmatrix} \}$$ forms a basis for \( M_{2 \times 2} \).
From the definition of linear independence/dependence, we have
$$c_1\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + c_2\begin{bmatrix} 2 & 0 \\ 0 & 0 \end{bmatrix} = 0.$$
Multiplying each entry of the first matrix by \( c_1 \) and each entry of the second matrix by \( c_2 \), we get
$$\begin{bmatrix} c_1 & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 2c_2 & 0 \\ 0 & 0 \end{bmatrix} = 0.$$
Adding corresponding entries, we get
$$\begin{bmatrix} c_1 + 2c_2 & 0 \\ 0 & 0\end{bmatrix} = 0.$$
Next, we equate entries to obtain the system of equations
$$\begin{aligned}
c_1 + 2c_2 &= 0 \\
0 &= 0 \\
0 &= 0 \\
0 &= 0
\end{aligned}.$$
The last three equations do not add anything new, hence this system is equivalent to
$$\begin{aligned}
c_1 + 2c_2 &= 0
\end{aligned}.$$
Which implies
$$\begin{aligned}
c_1 &= -2c_2
\end{aligned}.$$
Letting \( c_2 =t \) be the free variable, our solution is
$$c_1 = -2t, c_2 = t.$$
The system has nontrivial solutions, so the set is linearly dependent, therefore it is not a basis.
Examples with Polynomials
Example 3: Prove or disprove:
(a) \( \{ 1, x, x^2 \} \) forms a basis for \( P_2 \).
(b) \( \{ 1+x, 1 – x, x^2 \} \) forms a basis for \( P_2 \).
(c) \( \{ 1 + x, 2 + 2x \} \) forms a basis for \( P_1 \).
Solution: (a) \( \{ 1, x, x^2 \} \) forms a basis for \( P_2 \).
From the definition of linear independence/dependence, we have
$$c_1(1) + c_2(x) + c_3(x^2) = 0.$$
Distributing, we obtain
$$c_1 + c_2x + c_3x^2 = 0.$$
Next, we equate coefficients to obtain the solution
$$c_1 = 0, c_2 = 0, c_3 = 0.$$
The only solution is the trivial solution, so the vectors are linearly independent. The linear combination is
$$c_1(1) + c_2(x) + c_3(x^2)$$
Distributing, we obtain
$$c_1 + c_2x + c_3x^2$$
Since \(c_1\), \(c_2\), and \(c_3\) can be any real numbers, the span is
$$P_2.$$
Since the vectors are linearly independent and span \( P_2 \), the set forms a basis for \( P_2 \).
(b) \( \{ 1+x, 1 – x, x^2 \} \) forms a basis for \( P_2 \).
From the definition of linear independence/dependence, we have
$$c_1(1 + x) + c_2(1 – x) + c_3x^2 = 0.$$
Distributing, we obtain
$$c_1 + c_1x + c_2 – c_2x + c_3x^2 = 0.$$
Adding, we get
$$(c_1 + c_2) + (c_1 – c_2)x + c_3x^2 = 0.$$
Next, we equate coefficients to obtain the system of equations
$$\begin{aligned}
c_1 + c_2 &= 0 \\
c_1 – c_2 &= 0 \\
c_3 &= 0
\end{aligned}.$$
In matrix form, this is
$$\begin{bmatrix}
1 & 1 & 0 \\
1 & -1 & 0 \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
c_1 \\
c_2 \\
c_3
\end{bmatrix}
=
\begin{bmatrix}
0 \\
0 \\
0
\end{bmatrix}.$$
We now take the determinant of the coefficient matrix to get
$$\begin{vmatrix}
1 & 1 & 0 \\
1 & -1 & 0 \\
0 & 0 & 1
\end{vmatrix}.$$
Extending the matrix gives
$$\begin{vmatrix}
1 & 1 & 0 \\
1 & -1 & 0 \\
0 & 0 & 1
\end{vmatrix}
\begin{matrix}
1 & 1 \\
1 & -1 \\
0 & 0
\end{matrix}.$$
Computing the determinant by summing the products of the three diagonals running from the top-left to the bottom-right and subtracting the products of the three diagonals running from the bottom-left to the top-right, we obtain
$$(1)(-1)(1) + (1)(0)(0) + (0)(1)(0) – (0)(-1)(0) – (0)(0)(1) – (1)(1)(1).$$
Simplifying we get
$$-1 + 0 + 0 – 0 – 0 – 1.$$
Adding and subtracting, we arrive at
$$-2.$$
Since the determinant is nonzero, the only solution is the trivial solution, so the vectors are linearly independent. The span is given by
$$c_1(1 + x) + c_2(1 – x) + c_3x^2.$$
Distributing, we obtain
$$c_1 + c_1x + c_2 – c_2x + c_3x^2.$$
Adding, we get
$$(c_1 + c_2) + (c_1 – c_2)x + c_3x^2.$$
Since \( c_1 \), \( c_2 \), and \( c_3 \) can be any real numbers, the span is
$$P_2.$$
Since the vectors are linearly independent and span \( P_2 \), the set forms a basis for \( P_2 \).
(c) \( \{ 1 + x, 2 + 2x \} \) forms a basis for \( P_1 \).
From the definition of linear independence/dependence, we have
$$c_1(1 + x) + c_2(2 + 2x) = 0.$$
Distributing, we obtain
$$c_1 + c_1x + 2c_2 + 2c_2x = 0.$$
Adding, we get
$$(c_1 + 2c_2) + (c_1 + 2c_2)x = 0.$$
Next, we equate coefficients to obtain the system of equations
$$\begin{aligned}
c_1 + 2c_2 &= 0 \\
c_1 + 2c_2 &= 0
\end{aligned}.$$
The last equation adds nothing new, hence this system is equivalent to
$$\begin{aligned}
c_1 + 2c_2 &= 0
\end{aligned}.$$
Which implies
$$\begin{aligned}
c_1 &= -2c_2
\end{aligned}.$$
Letting \( c_2 =t \) be the free variable, our solution is
$$c_1 = -2t, c_2 = t.$$
The system has nontrivial solutions, so the set is linearly dependent, therefore it is not a basis.
Dimension of a Vector Space
Once we understand the concept of basis, the next important idea is dimension. Dimension tells us how large a vector space is by measuring the number of vectors required in a basis.
Definition
The dimension of a vector space \( V \) is the number of vectors in any basis for \( V \) and is denoted by
$$\dim(V) = n.$$
Finite and Infinite Dimensional Spaces
A vector space is finite-dimensional if it has a finite basis, and infinite-dimensional if no finite basis exists.
How to Compute Dimension
Note that:
- \( \dim(\mathbb{R}^n) = n \).
- \( \dim(M_{m \times n}) = mn \).
- \( \dim(P_n) = n + 1 \).
- If \( W \subset V \), then \( \dim(W) \leq \dim(V) \).
Relationship Between Basis and Dimension
Every basis for the same vector space contains the same number of vectors. For example, every basis for \( \mathbb{R}^2 \) must contain exactly two vectors. This guarantees the dimension is well-defined.
Examples
Example 4: Compute the dimension of the following vector spaces:
(a) \( \mathbb{R}^2 \)
(b) \( \mathbb{R}^3 \)
(c) \( M_{2 \times 2} \)
(d) \( P_2 \)
Solution: (a) \( \mathbb{R}^2 \)
Applying the formula, we arrive at a final answer of
$$2.$$
(b) \( \mathbb{R}^3 \)
Applying the formula, we arrive at a final answer of
$$3.$$
(c) \( M_{2 \times 2} \)
Applying the formula gives
$$2(2).$$
Multiplying, we arrive at a final answer of
$$4.$$
(d) \( P_2 \)
Applying the formula gives
$$2 + 1.$$
Adding, we arrive at a final answer of
$$3.$$
How to Expand a Linearly Independent Set into a Basis
Sometimes a set of vectors is linearly independent but does not span the entire vector space. In this case, the set is too small to form a basis. To fix this, we add additional vectors to the set that are not in the span, while preserving linear independence.
Examples
Example 5: Expand the following linearly independent sets into a basis for the given vector space:
(a) \( \{ \langle 1, 2 \rangle \} \), \( \mathbb{R}^2 \)
(b) \( \{ \langle 1, 0, 0 \rangle, \langle 0, 1, 0 \rangle \} \), \( \mathbb{R}^3 \)
(c) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \}, M_{2 \times 2}$$
(d) \( \{ 1 + x \} \), \( P_2 \).
Solution: (a) \( \{ \langle 1, 2 \rangle \} \), \( \mathbb{R}^2 \).
Notice that \( \langle 0, 1 \rangle \notin \text{span}\{ \langle 1, 2 \rangle \} \), hence a final basis is
$$\{ \langle 1, 2 \rangle, \langle 0,1 \rangle \}.$$
(b) \( \{ \langle 1, 0, 0 \rangle, \langle 0, 1, 0 \rangle \} \), \( \mathbb{R}^3 \).
Notice that $$\langle 0, 0, 1 \rangle \notin \text{span}\{ \langle 1, 0, 0 \rangle, \langle 0, 1, 0 \rangle \},$$ hence a final basis is
$$\{ \langle 1, 0, 0 \rangle, \langle 0, 1, 0 \rangle, \langle 0, 0, 1 \rangle \}.$$
(c) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \}, M_{2 \times 2}.$$
Notice that \( \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \notin \text{span}\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \} \), expanding the set then gives
$$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \}.$$
Notice that $$\begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}\notin \text{span}\{\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \},$$ expanding the set once again we get
$$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} \}.$$
Notice that $$\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \notin \text{span}\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} \},$$
hence a final basis is
$$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \}.$$
(d) \( \{ 1 + x \} \), \( P_2 \).
Notice that \( x \notin \text{span}\{ 1 + x \} \), expanding the set then gives
$$\{ 1 + x, x \}.$$
Notice that \( x^2 \notin \text{span}\{ 1 + x, x \} \), hence a final basis is
$$\{ 1 + x, x, x^2 \}.$$
How to Shrink a Spanning Set into a Basis
Sometimes a set spans a vector space but contains too many vectors, making it linearly dependent. To create a basis, we remove unnecessary vectors while preserving span.
Examples
Example 6: Shrink the following spanning sets into a basis for the given vector space:
(a) \( \{ \langle1, 0 \rangle, \langle 0, 1 \rangle, \langle 1, 1 \rangle \} \), \( \mathbb{R}^2 \)
(b) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \}, M_{2 \times 2}$$
(c) \( \{ 1, x, 1+x, x^2 \} \), \( P_2 \).
Solution: (a) \( \{ \langle1, 0 \rangle, \langle 0, 1 \rangle, \langle 1, 1 \rangle \} \), \( \mathbb{R}^2 \)
Notice that \( \langle1, 0 \rangle + \langle 0, 1 \rangle = \langle 1, 1 \rangle \), hence a final basis is
$$\{ \langle1, 0 \rangle, \langle 0, 1 \rangle \}.$$
(b) $$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \}, M_{2 \times 2} \}$$
Notice that $$\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix},$$ hence a final basis is
$$\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \}.$$
(c) \( \{ 1, x, 1+x, x^2 \} \), \( P_2 \).
Notice that \( 1 + x = 1 + x \), hence a final basis is
$$\{ 1, x, x^2 \}.$$
Conclusion
Understanding basis and dimension in vector spaces is essential because these concepts reveal how vector spaces are organized and how vectors interact within them. A basis provides the fundamental building blocks of a vector space, while dimension tells us how many independent vectors are needed to describe the entire space.
In this guide, we explored how to determine whether a set forms a basis by checking span and linear independence. We studied how dimension is computed and how it relates directly to the number of vectors in a basis. We also learned how to expand linearly independent sets into bases and how to shrink spanning sets by removing redundant vectors. Along the way, we worked through examples involving vectors in \( \mathbb{R}^n \), matrices, and polynomial vector spaces.
One of the most important ideas to remember is that basis and dimension work together. A basis must contain enough vectors to span the space, but not so many that redundancy appears. Dimension then measures exactly how many vectors are required.
Further Reading
A Comprehensive Beginner’s Guide to Partial Fraction Decomposition – With your knowledge of basis, I recommend revisiting partial fraction decomposition and testing whether the set of fractions in the decomposition forms a basis.
Step-by-Step Solutions to Common Examples of Linear Transformations in Linear Algebra – It is also informative to revisit linear transformations and explore if the columns of the transformation matrices form a basis.
