Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Vector Spaces and Subspaces: Definitions and Properties

Hello! Welcome to the first lesson of our course. Your goal is to build a deep, theoretical understanding of AI, and we'll start that journey today by establishing the mathematical bedrock upon which much of machine learning is built: linear algebra.

This initial module focuses on the foundational concepts of linear algebra. In this lesson, we will address the first learning outcome: to define vector spaces and subspaces, and verify their axiomatic properties. We'll explore the abstract rules that govern vectors and see how these rules provide a powerful framework for everything from data representation to optimization algorithms.

Let's begin by defining what a "vector space" truly is.

1. What is a Vector Space?

In your experience with projects like house price prediction, you've likely represented data as vectors—arrays of numbers. For example, a house might be represented by a vector [size, num_bedrooms, age]. The concept of a vector space formalizes the environment where such objects live. It's an abstract definition for a collection of objects (which we call vectors) that can be added together and scaled by numbers, in a way that is consistent and predictable.

This abstraction is powerful because any set that satisfies these rules—be it arrows in 3D space, matrices, polynomials, or even audio signals—is a vector space and inherits a rich set of properties and tools.

The definition of a vector space hinges on a set of rules, or axioms. The image below provides a quick overview of these properties, which we are about to study in detail.

Definition and Axioms of a Vector Space
This slide provides a formal definition of a vector space, listing the key axiomatic properties that we will explore in this lesson.

To get a clear and intuitive introduction to these axioms, please watch the following video from the "Oxford Linear Algebra" series by Dr. Tom Crawford.

Oxford Linear Algebra: What is a Vector Space?

This video introduces the concept of a vector space as an abstract structure defined by a set of rules, or axioms. It clearly explains the two fundamental operations and the eight axioms that define a vector space.

Watch the first 10 minutes and 10 seconds of the video. Pay close attention to the formal definition of a vector space (a set with two maps) and how the eight axioms are divided into two groups: those for vector addition and those for scalar multiplication.

As you saw in the video, a vector space over a field of scalars (for our purposes, will typically be the real numbers, ) is a non-empty set of objects called vectors, equipped with two operations:

  1. Vector Addition: + : V × V → V (adding two vectors in produces another vector in ).
  2. Scalar Multiplication: · : F × V → V (multiplying a vector in by a scalar in produces another vector in ).

These operations must satisfy the following eight axioms for all vectors and all scalars :

Axioms for Vector Addition:

  1. Commutativity:
  2. Associativity:
  3. Additive Identity: There exists a zero vector such that for all .
  4. Additive Inverse: For every , there exists an inverse vector such that .

Axioms for Scalar Multiplication:
5. Multiplicative Identity: (where 1 is the multiplicative identity in ).
6. Associativity:
7. Distributivity (vectors):
8. Distributivity (scalars):

Note that the first two properties required for the operations, closure under addition and scalar multiplication, are sometimes listed as axioms themselves, bringing the total count to ten.

2. Verifying the Axioms: An Example

Knowing the axioms is one thing; seeing them in action is another. To prove that a set is a vector space, one must rigorously verify that all the axioms hold true.

Continue with the same video to see a detailed verification that the familiar 3D coordinate system, , is indeed a vector space.

Oxford Linear Algebra: What is a Vector Space?

This segment of the video provides a concrete, step-by-step verification of all eight vector space axioms for the set of 3D vectors, \mathbb{R}^3. This is a foundational example of how to apply the abstract definition.

Watch the video from 10:54 to 22:12. Notice how the proof for each axiom relies on the properties of the underlying real numbers that make up the vector components.

The process you just watched is the blueprint for verifying any potential vector space. Other common examples of vector spaces you'll encounter in machine learning include:

  • The set of all matrices, .
  • The set of all polynomials of degree less than or equal to , .
  • The set of all continuous functions .
Test your understanding!

Consider the vector space of all matrices with real entries, , with the standard matrix addition and scalar multiplication. What is the zero vector in this space? For a generic matrix , what is its additive inverse ?

Show answer
  • The zero vector is the zero matrix: . Adding this matrix to any other matrix leaves unchanged.
  • The additive inverse of is . Adding and results in the zero matrix.

3. Proving Properties from Axioms

As you requested a high degree of mathematical rigor, it's important to see how new mathematical truths can be built directly from a small set of axioms. For example, the axioms state that a zero vector and an additive inverse exist, but they don't state that they are unique. We can prove this.

This next segment of the video demonstrates how to construct a formal proof for the uniqueness of the additive identity (the zero vector). This is a classic example of axiomatic reasoning.

Oxford Linear Algebra: What is a Vector Space?

This final segment demonstrates how to construct a rigorous proof using only the axioms. The presenter proves that the additive identity (the zero vector) in any vector space must be unique.

Watch from 22:12 to 29:02. Follow the logic of the proof, which starts by assuming two different zero vectors and shows they must be the same.

The technique used—assuming two such entities exist and then proving they must be identical—is a standard method for proving uniqueness in mathematics. Similar proofs can be constructed for the uniqueness of the additive inverse and other fundamental properties, all deriving from the same eight axioms.

4. Subspaces

Often, we are interested in a set of vectors that lies within a larger, known vector space. For example, in , consider the set of all vectors that lie on a plane passing through the origin. This set is a subspace.

A subspace of a vector space is a subset of that is itself a vector space, using the same addition and scalar multiplication operations from .

Checking all eight axioms to verify a subspace would be repetitive, since most are inherited from the parent space . Fortunately, there's a much more efficient method called the Subspace Test.

To learn about this test and see it applied, please read the following excerpt from a set of linear algebra lecture notes.

MATH115A LECTURE NOTES

These notes from a UCLA course on linear algebra formally define a subspace and introduce the essential 'Subspace Test' (Theorem 1.19), which simplifies the process of verification.

Read Section 1.4, 'Subspaces' (pages 4-5). Focus on Definition 1.14 and, most importantly, the 'Subspace Test 1.19'. Understand the three conditions of the test and study the examples (1.20, 1.21, 1.22) showing how the test is applied.

As the notes detail, a non-empty subset of a vector space is a subspace of if and only if the following three conditions hold:

  1. Zero Vector: The zero vector of is in ().
  2. Closure under Addition: For any two vectors , their sum is also in .
  3. Closure under Scalar Multiplication: For any vector and any scalar , the product is also in .

If these three conditions are met, all other vector space axioms are automatically satisfied.

Test your understanding!

Let . Use the three-part Subspace Test to determine if the set of all vectors such that is a subspace of .

Show answer

Let's check the three conditions:

  1. Is the zero vector in W? The zero vector in is . Since , the condition is met. Yes, .

  2. Is W closed under addition? Let and be two arbitrary vectors in . By definition of , we know and . Their sum is . To check if this sum is in , we add its components:

    Since the sum of the components is 0, the vector is in . Yes, is closed under addition.

  3. Is W closed under scalar multiplication? Let be a vector in and be any real scalar. We know . The scalar multiple is . Let's check the sum of its components:

    Since the sum of the components is 0, the vector is in . Yes, is closed under scalar multiplication.

Since all three conditions of the Subspace Test are satisfied, is a subspace of . Geometrically, this is the plane passing through the origin with the normal vector .


Conclusion

In this lesson, we have laid the first crucial stone in your foundation of mathematical AI. We moved from the intuitive idea of a vector to the formal, axiomatic definition of a vector space.

Here are the key takeaways:

  • A vector space is a set of objects (vectors) with two operations (addition and scalar multiplication) that satisfy eight specific axioms. This abstract framework unifies many different mathematical objects under one theory.
  • To verify that a set forms a vector space, one must demonstrate that it is closed under the two operations and that all eight axioms hold true.
  • The axioms are not just a checklist; they are foundational rules from which we can prove further properties, such as the uniqueness of the zero vector.
  • A subspace is a vector space contained within another. We can efficiently check if a subset is a subspace using the three-part Subspace Test: verify the presence of the zero vector and closure under both addition and scalar multiplication.

In our next lesson, we will build upon this foundation. Now that we have defined the "space" where vectors exist, we will begin to explore the relationships between vectors within that space. We will cover the concepts of linear independence and the span of a set of vectors, which are essential for understanding how to construct vector spaces and represent data efficiently.

Can't find a good explanation? Sign up and we'll make it for you

Sign up