Hello! Welcome to the fifth lesson in our module on Vector Spaces and Subspaces.
In our last two lessons, we developed two fundamental concepts: the span of a set of vectors (all the points you can reach) and the linear independence of a set (a measure of non-redundancy). We saw that a spanning set might contain redundant vectors, while a linearly independent set might not be large enough to span a whole space.
This brings us to a natural and powerful question: What do we call a set of vectors that is "just right"—large enough to span the entire space, but small enough that it contains no redundant vectors?
This "goldilocks" set is called a basis. The concept of a basis is arguably one of the most important in linear algebra, as it provides a coordinate system for a vector space, a fundamental idea for representing data in machine learning and beyond.
By the end of this lesson, you will be able to:
- Define a basis for a vector space.
- Understand the key properties of a basis, including the uniqueness of representation.
- Prove whether a given set of vectors forms a basis for a vector space, including for spaces like and spaces of polynomials.
1. The Definition of a Basis
A basis strikes a perfect balance between two properties: spanning and linear independence.
Let's watch a segment from Professor Gilbert Strang's lecture, where he formally defines a basis and provides initial examples.
9. Independence, Basis, and Dimension
In this segment, Professor Strang brings together the ideas of linear independence and spanning to define a basis. He emphasizes that a basis is a 'just right' set of vectors.
Please watch from 20:57 to 23:49. Focus on the two properties that define a basis.
To formalize this, let's consult a written definition.
Basis (linear algebra) - Wikipedia
The Wikipedia article on 'Basis' provides a concise and standard definition.
Please read the introduction and the 'Definition' section. Note the two conditions: linear independence and the spanning property.
As the resources state, a set of vectors is a basis for a vector space if it satisfies two conditions:
- Linear Independence: The set is linearly independent.
- Spanning Property: The set spans , i.e., .
The Uniqueness of Representation: A Key Consequence
A crucial property that follows directly from this definition is that any vector can be written as a linear combination of basis vectors in exactly one way.
Proof Sketch:
Let be a basis for .
- Existence: Since spans , for any , there must exist scalars such that . So at least one representation exists.
- Uniqueness: Suppose there were two different representations for :
Subtracting the second equation from the first gives:
Since the basis vectors are linearly independent, the only solution to this equation is the trivial one. Therefore, for all , which means . The representation is unique.
These unique scalars are called the coordinates of with respect to the basis .
2. Proving a Set is a Basis
To prove that a set of vectors forms a basis for a vector space, you must demonstrate that it satisfies both conditions: it is linearly independent AND it spans the space.
Example: The Standard Basis for
The most familiar basis is the standard basis. In , it consists of the vectors and .

More generally, the standard basis for is the set , where is a vector with a 1 in the -th position and 0s everywhere else. These vectors form the columns of the identity matrix, .
The Matrix Method for Vectors in
Suppose we have a set of vectors in . To check if they form a basis, we can create an matrix with these vectors as its columns: .
Now, let's translate our two conditions into properties of the matrix :
- Linear Independence: The columns are linearly independent if the equation has only the trivial solution ().
- Spanning : The columns span if the equation has a solution for every .
For a square matrix , these two conditions are equivalent to being invertible. This gives us a powerful and efficient method:
A set of vectors in forms a basis for if and only if the matrix formed by using these vectors as columns is invertible.
Let's return to the lecture to see how this test is applied.
9. Independence, Basis, and Dimension
Professor Strang continues his discussion, showing how to test if a set of vectors in R^3 forms a basis by creating a matrix and checking its properties (in this case, invertibility).
Please watch from 23:49 to 28:22. Notice how the abstract question of being a basis translates into a concrete question about a matrix.
3. Beyond : Bases for Other Vector Spaces
The concept of a basis is not limited to column vectors in . It applies to any vector space, including spaces of matrices, functions, or, as we'll see here, polynomials. Your background in computer science has likely prepared you to think about abstract structures, and vector spaces are a prime example.
Consider , the vector space of all polynomials of degree at most 2. The standard basis for is . Any polynomial is a unique linear combination of these basis vectors.
But what about a non-standard set, like ? To prove it's a basis for , we must show it's linearly independent and spans . This involves setting up and solving a system of equations, just as with vectors in .
The Vector Space of Polynomials: Span, Linear Independence, and Basis
This video by Dr. Trefor Bazett provides an excellent, clear proof that a given set of polynomials forms a basis for the space of polynomials of degree at most 2.
Please watch from 07:50 to 10:26. Pay close attention to how the problem is converted into a system of linear equations represented by a matrix, which should feel very familiar.
The process is analogous:
- Set up the equation: To check for both properties, we set an arbitrary polynomial equal to a linear combination of our candidate vectors:
- Equate coefficients: Group terms by powers of and equate the coefficients on both sides. This creates a system of linear equations for .
- Solve the system: Show that this system has a unique solution for any . This is equivalent to showing the coefficient matrix is invertible, which proves both linear independence (when ) and the spanning property.
4. A Deeper Look: Proving Key Properties
Given your interest in proofs, let's explore a powerful theorem that can simplify the process of verifying a basis for a finite-dimensional space.
So far, we know that all bases for a given space have the same number of vectors. We will prove this in the next lesson, but for now, let's accept it and call this number the dimension of the space, denoted . For example, and .
Theorem: Let be a vector space with .
- Any linearly independent set of vectors in is automatically a basis for .
- Any spanning set of vectors in is automatically a basis for .
This means if you have the correct number of vectors, you only need to check one of the two conditions, not both!
Your challenge is to prove a core part of this theorem.
Proof Exercise:
Prove that if is a vector space of dimension , then a set of vectors is linearly independent if and only if it spans .
[PDF] Lecture Notes for Advanced Linear Algebra
This exercise from a set of advanced linear algebra notes guides you through proving this fundamental theorem. Working through it will significantly deepen your understanding of how linear independence, spanning, and dimension are interconnected.
Find and complete Exercise 2.7.12 at the end of Chapter 2. The preceding exercises (1.4.11 to 1.4.14) build up the tools needed for this proof, such as the Exchange Lemma, so you may want to review their statements.
Finally, a fundamental question in mathematics is whether something is guaranteed to exist. Does every vector space have a basis? The answer is yes, but the proof for infinite-dimensional spaces relies on a non-constructive axiom from set theory called the Axiom of Choice (via Zorn's Lemma). The resource below contains this proof if you're curious about such foundational topics.
Basis (linear algebra) - Wikipedia
For those interested in the foundational proofs of mathematics, the Wikipedia article provides the proof that every vector space has a basis using Zorn's Lemma.
This is optional. Read the section 'Proof that every vector space has a basis'. Don't worry about mastering it, but appreciate the logic used to guarantee existence.
Conclusion
Today, we defined the concept of a basis—a linearly independent spanning set. This is a cornerstone of linear algebra, providing the minimal set of vectors needed to build an entire vector space.
Key Takeaways:
- A basis for a vector space is a set of vectors that is both linearly independent and spans the space.
- A basis provides a unique representation (coordinates) for every vector in the space.
- To prove a set is a basis, you must prove both conditions.
- For a set of vectors in an -dimensional space (like ), you can form an matrix with the vectors as columns. The set is a basis if and only if the matrix is invertible.
- If you know the dimension of a space is , any set of linearly independent vectors is a basis, and any set of spanning vectors is a basis.
Preview of the next lesson:
We've mentioned that all bases for a given vector space seem to have the same number of elements. In our next lesson, we will formally prove this and define the dimension of a vector space. Dimension is a fundamental property that tells us the "size" or "degrees of freedom" of a space, a concept essential for applications like PCA in machine learning.