Beginner Friendly Guide to Span and Spanning Sets: A Complete Step-by-Step Tutorial

Beginner Friendly Guide to Span and Spanning Sets: A Complete Step-by-Step Tutorial

Understanding span is one of the most important steps in learning linear algebra, but it is also one of the concepts that often feels abstract at first. In this beginner-friendly guide to span and spanning sets, we will explore the concept of span, starting with the definition and working through several problems.

In this guide, you will learn what span means in simple terms, how to compute the span of a set of vectors in different vector spaces, including \( \mathbb{R}^n \), matrices, and polynomials, as well as how to determine whether a vector lies within a span.

By the end, you will not only understand the definition of span, but also be able to apply it in a wide range of problems.

Span

Before defining span, recall from the article A Beginner-Friendly Approach to Understanding Vector Spaces and Subspaces that a vector space is a collection of objects that can be added together and multiplied by scalars, and remain in the same space.

The idea of span is built directly from linear combinations, where we combine vectors using scalar multiplication and vector addition. Linear combinations of matrices and vectors are covered in The Ultimate Step-by-Step Guide to Basic Matrix Operations for Beginners and Vector Operations Tutorial for Beginners: A Complete Step-by-Step Guide. In addition, linear combinations of polynomials are covered in Linear Dependence vs Independence Explained for Beginners: Everything You Need to Know.

Definition

Let

$$\{ v_1, v_2, \dots, v_n \}$$

be a set of vectors in a vector space \( V \). The span of these vectors is the set of all possible linear combinations of the vectors and is denoted by

$$\text{span}\{ v_1, v_2, \dots, v_n \}.$$

In simple terms, the span contains every vector that can be created from the given vectors using scalar multiplication and addition.

The span of a set of vectors has several important properties:

  • Span is always a subspace.
  • Span always contains the zero vector.
  • Different sets of vectors can have the same span.
  • Span tells us the set of all vectors obtainable from a collection of vectors.

How to Find the Span of a Set of Vectors

Now that we understand the definition of span, the next step is to learn how to determine the span of a set of vectors. In practice, this means identifying all vectors that can be formed using linear combinations of the given vectors.

The general process is straightforward:

Step 1: Write a General Linear Combination

Suppose we are given vectors

$$\{ v_1, v_2, \dots, v_n \}.$$

To find their span, start by writing a general linear combination:

$$c_1v_1 + c_2v_2 + \cdots + c_nv_n$$

where \( c_1, c_2, \dots, c_n \) are arbitrary scalars.

Step 2: Combine the Vectors

Next, perform the scalar multiplication and vector addition.

Step 3: Describe the Resulting Set

After simplifying the expression, identify the set of vectors that can be produced. This final description is the span of the vectors.

Examples of Span

Span is not limited to vectors in \( \mathbb{R}^n \). Span works in any vector space, including vector spaces of matrices and polynomials. In this section, we will look at several examples to see how span behaves in different settings.

Example in \( \mathbb{R}^n \)

Example 1: Determine the span of the sets:
(a) \( \{ \langle1, 0 \rangle, \langle 0, 1 \rangle \} \)
(b) \( \{ \langle1, 0, 0 \rangle, \langle 0, 1, 0 \rangle \} \).

Solution: ((a) \( \{ \langle1, 0 \rangle, \langle 0, 1 \rangle \} \).

The linear combination is

$$c_1\langle 1, 0 \rangle + \langle 0, 1 \rangle.$$

Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \)

$$\langle c_1, 0 \rangle + \langle 0, c_2 \rangle.$$

Adding corresponding components gives

$$\langle c_1, c_2 \rangle.$$

Since \(c_1\) and \(c_2\) can be any real numbers, the span is

$$\mathbb{R}^2.$$

(b) \( \{ \langle1, 0, 0 \rangle, \langle 0, 1, 0 \rangle \} \).

The linear combination is

$$c_1\langle 1, 0, 0 \rangle + c_2\langle 0, 1, 0 \rangle.$$

Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \)

$$\langle c_1, 0, 0 \rangle + \langle 0, c_2, 0 \rangle.$$

Adding corresponding components gives

$$\langle c_1, c_2, 0 \rangle.$$

Since \(c_1\) and \(c_2\) can be any real numbers, the span is

$$\{ \langle x, y, 0 \rangle | x, y \in \mathbb{R} \}.$$

Example with Matrices

Example 2: Determine the span of the set
$$\{ \begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix},
\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix} \}.$$

Solution: The linear combination is

$$c_1\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix}
+
c_2\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix}.$$

Multiplying each entry of the first matrix by \( c_1 \) and each entry of the second matrix by \( c_2 \)

$$\begin{bmatrix}
C_1 & 0 \\
0 & 0
\end{bmatrix}
+
\begin{bmatrix}
0 & c_2 \\
0 & 0
\end{bmatrix}.$$

Adding corresponding components gives

$$\begin{bmatrix}
c_1 & c_2 \\
0 & 0
\end{bmatrix}.$$

Since \(c_1\) and \(c_2\) can be any real numbers, the span is

$$\{ \begin{bmatrix}
a & b \\
0 & 0
\end{bmatrix} | a,b \in \mathbb{R} \}.$$

Example with Polynomials

Example 3: Determine the span of the set \( \{ 1, x, x^2 \} \).

Solution: 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.$$

How to Check if a Vector Is in the Span

One of the most important applications of span is determining whether a particular vector can be generated from a given set of vectors. In other words, we want to know whether the vector belongs to the span of the set.

The process is the same in every vector space:

  1. Write a linear combination of the given vectors.
  2. Set the combination equal to the target vector.
  3. Solve the resulting system of equations.

If a solution exists, then the vector is in the span. If no solution exists, then the vector is not in the span. Gaussian elimination is one of the most effective methods for solving these systems. For a refresher, please refer to the article How to Solve a System of Equations Using Gaussian Elimination: A Step-by-Step Guide.

Example

Example 4: Prove or disprove:
(a) \( \langle 5, 8 \rangle \in \text{span}\{ \langle 1, 2 \rangle, \langle 3, 1 \rangle \} \)
(b) $$\begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}
\in
\text{span}\{\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix},\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix}\}$$
(c) \( 2 + 3x – x^2 \in \text{span}\{ 1, x, x^2 \} \).

Solution: (a) \( \langle 5, 8 \rangle \in \text{span}\{ \langle 1, 2 \rangle, \langle 3, 1 \rangle \} \).

We seek scalars \( c_1 \) and \( c_2 \), such that

$$c_1\langle 1, 2 \rangle + c_2\langle 3, 1 \rangle = \langle 5, 8 \rangle.$$

Multiplying each component of the first vector by \( c_1 \) and each component of the second vector by \( c_2 \)

$$\langle c_1, 2c_1 \rangle + \langle 3c_2, c_2 \rangle = \langle 5, 8 \rangle.$$

Adding corresponding components gives

$$\langle c_1 + 3c_2, 2c_1 + c_2 \rangle = \langle 5, 8 \rangle.$$

Next, we equate components to obtain the system

$$\begin{aligned}
c_1 + 3c_2 &= 5 \\
2c_1 + c_2 &= 8
\end{aligned}.$$

The augmented matrix for the system is

$$\begin{pmatrix}
1 & 3 & 5 \\
2 & 1 & 8
\end{pmatrix}.$$

Subtracting 2 times row 1 from row 2 we get

$$\begin{pmatrix}
1 & 3 & 5 \\
2 – 2(1) & 1 – 2(3) & 8 – 2(5)
\end{pmatrix}.$$

Simplifying we get

$$\begin{pmatrix}
1 & 3 & 5 \\
2 – 2 & 1 – 6 & 8 – 10
\end{pmatrix}.$$

Subtracting, we arrive at

$$\begin{pmatrix}
1 & 3 & 5 \\
0 & -5 & –2
\end{pmatrix}.$$

Dividing row 2 by -5 gives

$$\begin{pmatrix}
1 & 3 & 5 \\
\frac{0}{-5} & \frac{-5}{-5} & \frac{–2}{-5}
\end{pmatrix}.$$

Dividing, we obtain

$$\begin{pmatrix}
1 & 3 & 5 \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Subtracting 3 times row 2 from row 1 we get

$$\begin{pmatrix}
1 – 3(0) & 3 – 3(1) & 5 – 3(\frac{2}{5}) \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Simplifying we get

$$\begin{pmatrix}
1 – 0 & 3 – 3 & 5 – \frac{6}{5}) \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Obtaining a common denominator gives

$$\begin{pmatrix}
1 – 0 & 3 – 3 & \frac{5(5)}{5} – \frac{6}{5}) \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Simplifying we get

$$\begin{pmatrix}
1 – 0 & 3 – 3 & \frac{25}{5} – \frac{6}{5}) \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Subtracting the fractions gives

$$\begin{pmatrix}
1 – 0 & 3 – 3 & \frac{25 – 6}{5} \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

Subtracting, we arrive at

$$\begin{pmatrix}
1 & 0 & \frac{19}{5} \\
0 & 1 & \frac{2}{5}
\end{pmatrix}.$$

In equation form, this is

$$\begin{aligned}
c_1 &= \frac{19}{5} \\
c_2 &= \frac{2}{5}
\end{aligned}.$$

Thus, our solution is

$$c_1 = \frac{19}{5}, c_2 = \frac{2}{5}.$$

Since a solution exists

$$\langle 5, 8 \rangle \in \text{span}\{ \langle 1, 2 \rangle, \langle 3, 1 \rangle \}.$$

(b) $$\begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}
\in
\text{span}\{\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix},\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix}\}.$$

We seek scalars \( c_1 \) and \( c_2 \), such that

$$c_1\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix} + c_2\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix} = \begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}.$$

Multiplying each entry of the first matrix by \( c_1 \) and each entry of the second matrix by \( c_2 \)

$$\begin{bmatrix}
c_1 & 0 \\
0 & 0
\end{bmatrix} + \begin{bmatrix}
0 & c_2 \\
0 & 0
\end{bmatrix} = \begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}.$$

Adding corresponding entries gives

$$\begin{bmatrix}
c_1 & c_2 \\
0 & 0
\end{bmatrix} = \begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}.$$

Next, we equate entries to obtain the system

$$\begin{aligned}
c_1 &= 2 \\
c_2 &= 5 \\
0 &= 0 \\
0 &= 0
\end{aligned}.$$

The last two equations do not add anything new, hence this system is equivalent to

$$\begin{aligned}
c_1 &= 2 \\
c_2 &= 5
\end{aligned}.$$

Thus, our solution is

$$c_1 = 2, c_2 = 5.$$

Since a solution exists

$$\begin{bmatrix}
2 & 5 \\
0 & 0
\end{bmatrix}
\in
\text{span}\{\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix},\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix}\}.$$

(c) \( 2 + 3x – x^2 \in \text{span}\{ 1, x, x^2 \} \).

We seek scalars \( c_1 \), \( c_2 \), and \( c_3 \), such that

$$c_1(1) + c_2(x) + c_3(x^2) = 2 + 3x – x^2.$$

Distributing, we obtain

$$c_1 + c_2x + c_3x^2 = 2 + 3x – x^2.$$

Next, we equate coefficients to obtain the system

$$\begin{aligned}
c_1 &= 2 \\
c_2 &= 3 \\
c_3 &= -1
\end{aligned}.$$

Thus, our solution is

$$c_1 = 2, c_2 = 3, c_3 = -1.$$

Since a solution exists

$$2 + 3x – x^2 \in \text{span}\{ 1, x, x^2 \}.$$

Conclusion

In this beginner-friendly guide to span and spanning sets, we explored how span is built from linear combinations and how it applies across multiple vector spaces, including \( \mathbb{R}^n \), matrices, and polynomials. We also learned how to determine whether a vector belongs to a span by setting up and solving systems of equations. The span of a set of vectors is the collection of all vectors that can be formed by scalar multiplication and addition.

Further Reading

A Comprehensive Beginner’s Guide to Partial Fraction Decomposition – With your knowledge of span, I recommend revisiting partial fraction decomposition and testing whether the set of fractions in the decomposition forms a spanning set.

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 spanning set.

Frequently Asked Questions

Yes. The span of any collection of vectors is always a subspace because it is closed under vector addition and scalar multiplication.

Yes. Even if vectors are linearly dependent, they may still span a space.