Vector Spaces

The abstract framework that generalizes vectors beyond arrows in space.

10 min read · Advanced

What is a Vector Space?

A vector space V over a field F (usually real numbers) is a set equipped with two operations:

  • Vector addition: \(\vec{u} + \vec{v}\)
  • Scalar multiplication: \(c\vec{v}\)

The Eight Axioms

A vector space must satisfy these axioms:

Addition Axioms

  1. 1. Closure: \(\vec{u} + \vec{v} \in V\)
  2. 2. Commutativity: \(\vec{u} + \vec{v} = \vec{v} + \vec{u}\)
  3. 3. Associativity: \((\vec{u} + \vec{v}) + \vec{w} = \vec{u} + (\vec{v} + \vec{w})\)
  4. 4. Identity: \(\exists \vec{0}: \vec{v} + \vec{0} = \vec{v}\)
  5. 5. Inverse: \(\exists (-\vec{v}): \vec{v} + (-\vec{v}) = \vec{0}\)

Scalar Multiplication Axioms

  1. 6. Closure: \(c\vec{v} \in V\)
  2. 7. Distributivity: \(c(\vec{u} + \vec{v}) = c\vec{u} + c\vec{v}\)
  3. 8. Compatibility: \((cd)\vec{v} = c(d\vec{v})\)

Examples of Vector Spaces

  • \(\mathbb{R}^n\) - n-dimensional real coordinate space
  • Polynomials of degree ≤ n
  • Continuous functions on [a,b]
  • Solutions to homogeneous linear equations

Subspaces

A subspace is a subset that is itself a vector space. To verify:

  1. Contains the zero vector
  2. Closed under addition
  3. Closed under scalar multiplication

Dimension

The dimension of a vector space is the number of vectors in any basis. \(\mathbb{R}^3\) has dimension 3.

Connection to AI/ML

Embedding spaces in machine learning are vector spaces. When we say an embedding has dimension 768, we mean it lives in \(\mathbb{R}^{768}\).

💡

Vector Spaces Explained Simply

Think of a vector space as a special playground where vectors can live and play - but only if they follow the rules!

Imagine a sandbox. In this sandbox, you can do two things with the sand (vectors): combine piles together (addition) and make piles bigger or smaller (scalar multiplication). The magic rule? No matter how you combine or scale the sand, it always stays inside the sandbox. You can never accidentally create sand outside of it.

Why does this matter? When we have a vector space, we get predictability. Add any two vectors together? The result is still in our space. Stretch or shrink any vector? Still in our space. This "closed system" property is what makes vector spaces so powerful for everything from physics simulations to machine learning embeddings.

A subspace is like a smaller sandbox inside the big one - it follows all the same rules but takes up less room. And the dimension? That's simply how many independent directions you can move in your playground. In 3D space, you can move left-right, forward-backward, and up-down - three directions, dimension 3!

The eight axioms are just the formal "playground rules" that guarantee everything behaves nicely: addition works in any order, there's a zero vector (an empty pile), and scaling is consistent. Once you have these rules, you unlock the entire toolkit of linear algebra!

Frequently Asked Questions