Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 4

Understanding Vector Space Bases

Recommended resources

Hello! Welcome to your fourth lesson in our linear algebra journey.

In our last two lessons, we explored two fundamental concepts: span, which is how a set of vectors can generate a space, and linear independence, which describes a set of vectors with no redundancies. You might have guessed that these two ideas are intimately related. What happens when you find a set of vectors that both spans a space and is linearly independent? You get the most efficient possible description of that space.

Today, we will formalize this powerful idea. Our learning outcome is to define and construct a basis for a vector space.

A basis is like the DNA of a vector space—a minimal set of instructions for building every single vector within it. This concept is foundational for your goals:

  • In deep learning, bases are used to create more efficient representations of data. Techniques like Principal Component Analysis (PCA) are all about finding a new, more informative basis for your dataset.
  • In quantum mechanics, the state of a system is a vector, and it's described by its components in a chosen basis. Different bases correspond to measuring different physical quantities (like position or momentum).

1. What is a Basis?

Let's start by solidifying the intuition. A basis of a vector space is a set of "building block" vectors that are just right: there are enough of them to "reach" every vector in the space, but not so many that any of them are redundant.

The 3Blue1Brown video we've used before has an excellent, concise definition that brings together everything we've learned.

Linear combinations, span, and basis vectors | Chapter 2, Essence of linear algebra

Let's watch the final part of the 3Blue1Brown video, where he puts the pieces together to provide the technical definition of a basis.

Watch from 6:51 to 9:33. The video culminates in the formal definition of a basis, tying together the concepts of span and linear independence. Pay close attention to the concluding puzzle: "The technical definition of a basis of a space is a set of linearly independent vectors that span that space. Think about why this definition would make sense."

As the video explains, this leads us to the formal definition.

Definition: A Basis
A set of vectors in a subspace is a basis for if two conditions are met:

  1. The set is linearly independent.
  2. The set spans (i.e., ).

This definition perfectly captures the idea of a minimal spanning set. Because the set is linearly independent, you cannot remove any vector without shrinking the span. It's perfectly efficient.

To reinforce this, the following video provides a clear, step-by-step explanation.

Basis of a subspace | Vectors and spaces | Linear Algebra | Khan Academy

Sal Khan from Khan Academy further clarifies the definition of a basis and introduces the important idea that it is the 'minimum set of vectors' needed.

Watch from the beginning to 6:12. This will reinforce the formal definition and provide the very useful perspective of a basis as a set with 'no redundancy'.


2. The Standard Basis and Uniqueness

You've been using a basis for years without knowing it! In the 2D Cartesian plane, the vectors and form a basis. They are linearly independent, and they span all of . This is called the standard basis.

However, a vector space has infinitely many different bases. For example, the vectors and also form a basis for . They are not perpendicular, but they are linearly independent and span the entire plane.

Visualizing Vector Bases in 2D
This image illustrates how the same vector can be represented in different bases. On the left, a vector is shown as a combination of standard basis vectors. On the right, a different vector is represented using a non-standard, non-orthogonal basis. This highlights that while the *components* of a vector depend on the basis, the vector itself is an independent geometric object.

This idea that a vector is an abstract object, separate from its representation (its coordinates), is critical in both deep learning and quantum mechanics. The choice of basis is like choosing a language to describe the vector.

A key property that makes bases so useful is that for any given basis, the "language" is unambiguous.

Theorem: The Unique Representation Theorem
If is a basis for a subspace , then for each vector in , there exists a unique set of scalars such that:

These scalars are called the coordinates of relative to the basis .

This is why coordinate systems work! The linear independence of the basis vectors ensures there's only one way to combine them to get any particular vector.


3. How to Construct a Basis

Now for the practical part: given a set of vectors that span a subspace, how do we find a basis for it? The set might be linearly dependent, so we need a systematic way to discard the redundant vectors.

The method relies on what we learned about pivot columns in the last lesson. Remember, the pivot columns of a matrix are not redundant; they are linearly independent of the preceding columns.

Basis and Dimension

The Interactive Linear Algebra textbook provides a straightforward recipe for finding a basis from a set of spanning vectors.

Please read the subsection 'Computing a Basis for a Subspace', focusing on the first part titled 'A basis for the column space'. The key takeaway is the theorem: 'The pivot columns of a matrix A form a basis for Col A'. This provides a direct method for our task.

Let's walk through the procedure derived from this reading:

To find a basis for the subspace spanned by a set of vectors :

  1. Form a matrix using these vectors as its columns: .
  2. Row reduce the matrix to its echelon form.
  3. Identify the pivot columns in the echelon form.
  4. The basis consists of the corresponding columns from the original matrix .

Example:
Find a basis for the subspace of spanned by the vectors:

  1. Form the matrix :

  2. Row reduce :

    (Note: This is an echelon form, not fully reduced, which is sufficient to identify pivots).

  3. Identify pivot columns: The pivots are in columns 1 and 3.

  4. Select columns from the original matrix : The basis vectors are the 1st and 3rd columns of the original matrix .
    So, a basis for the subspace is .

Notice that , so it was the redundant vector, and our procedure correctly discarded it because the second column was not a pivot column.

Test your understanding!

Find a basis for the subspace of spanned by the vectors:

Show answer
  1. Form the matrix A:
  2. Row reduce A:
  3. Identify pivot columns: The pivots are in columns 1 and 3.
  4. Select original columns: The basis is .

    We can see that and , so they were correctly identified as redundant.

Conclusion

Today, we've unified the concepts of span and linear independence to define a basis. This is one of the most important ideas in linear algebra, providing the fundamental "coordinate system" for any vector space.

Key Takeaways:

  • A basis for a subspace is a set of vectors that is both linearly independent and spans the subspace.
  • It can be thought of as a minimal spanning set—the most efficient collection of vectors to build the entire space.
  • While a subspace has many different possible bases, a vector's representation (its coordinates) is unique for any single given basis.
  • We can construct a basis for a space spanned by a set of vectors by putting them into a matrix and finding the original columns that correspond to the pivot columns.

Preview of Next Lesson:

In our examples, we saw that a basis for had two vectors, and our example of a plane in also had a basis with two vectors. This is no coincidence. It turns out that every basis for a given subspace has the exact same number of vectors. This fundamental number is called the dimension of the subspace. In our next lesson, we will explore this concept and the powerful insights it provides.