Search Knowledge

© 2026 LIBREUNI PROJECT

Linear Algebra / Overview

Vector Spaces and Axioms

The Axiomatic Foundation of Vector Spaces

In elementary physics, a vector is often described as a directed line segment. While intuitive, this definition is insufficient for higher mathematics. Modern linear algebra treats a Vector Space as an abstract algebraic structure—a “playground” where elements can be added together and scaled by numbers.

1. Defining the Playground

A Vector Space VV over a field FF (typically R\mathbb{R}) is a set equipped with two operations: vector addition (++) and scalar multiplication (\cdot). Instead of memorizing axioms as dry rules, we can view them as the “laws of physics” for our data.

Standard Euclidean Space: Rn\mathbb{R}^n

The most common example is Rn\mathbb{R}^n, where addition and scaling are performed component-wise. Let’s verify the Commutativity (u+v=v+uu + v = v + u) and Distributivity (a(u+v)=au+ava(u+v) = au + av) properties using NumPy.

python
1import numpy as np
2 
3# Define two vectors in R3
4u = np.array([1, 2, 3])
5v = np.array([4, 5, 6])
6a = 2.5
7 
8# 1. Verify Commutativity
9lhs_add = u + v
10rhs_add = v + u
11print(f"Addition Commutativity: {lhs_add} == {rhs_add}")
12 
13# 2. Verify Distributivity
14lhs_dist = a * (u + v)
15rhs_dist = a * u + a * v
16print(f"Distributivity: {lhs_dist} == {rhs_dist}")
17 
18# Check if they are numerically equal
19print(f"Equal? {np.allclose(lhs_dist, rhs_dist)}")

2. The Eight Axioms

For any set VV to be a formal Vector Space, these eight rules must hold for all u,v,wVu, v, w \in V and scalars a,bRa, b \in \mathbb{R}:

  1. Commutativity: u+v=v+uu + v = v + u.
  2. Associativity: (u+v)+w=u+(v+w)(u + v) + w = u + (v + w).
  3. Additive Identity: There is a 0\mathbf{0} such that v+0=vv + \mathbf{0} = v.
  4. Additive Inverse: For every vv, there is a v-v such that v+(v)=0v + (-v) = \mathbf{0}.
  5. Multiplicative Identity: 1v=v1 \cdot v = v.
  6. Compatibility: a(bv)=(ab)va(bv) = (ab)v.
  7. Distributivity of Scalar: a(u+v)=au+ava(u + v) = au + av.
  8. Distributivity of Vector: (a+b)v=av+bv(a + b)v = av + bv.

Exercise: The Non-Vector Space

Consider the set of all points in the first quadrant: Q={(x,y)R2x,y0}Q = \{(x, y) \in \mathbb{R}^2 \mid x, y \ge 0\}. Why does this fail to be a vector space?

python
1import numpy as np
2 
3# A point in the first quadrant
4v = np.array([5, 10])
5 
6# Scaling by a negative number
7scalar = -1
8result = scalar * v
9 
10print(f"Original vector: {v}")
11print(f"Scaled by -1: {result}")
12 
13# Is result in the first quadrant?
14is_in_q = np.all(result >= 0)
15print(f"Is the result still in the first quadrant? {is_in_q}")

The failure shown above violates Closure under Scalar Multiplication. If we scale a “positive” vector by a negative number, we leave the set. Thus, the first quadrant is not a vector space.

3. Abstract Examples: Polynomials

The beauty of these axioms is that “vectors” don’t have to be arrows. They can be functions or polynomials. The set Pn\mathbb{P}_n of polynomials of degree n\le n forms a vector space because adding two polynomials yields another polynomial, and the axioms hold.

Why is the set of polynomials of *exactly* degree 3 not a vector space?

4. Function Spaces

In advanced applications like Fourier analysis, we treat signals (functions) as vectors. If f(t)f(t) and g(t)g(t) are continuous functions, then h(t)=f(t)+g(t)h(t) = f(t) + g(t) is also continuous.

python
1import numpy as np
2import matplotlib.pyplot as plt
3 
4t = np.linspace(0, 1, 100)
5f = np.sin(2 * np.pi * t)
6g = np.cos(4 * np.pi * t)
7 
8# Vector addition of 'functions' (sampled)
9h = f + g
10 
11plt.plot(t, f, '--', label='f(t)')
12plt.plot(t, g, '--', label='g(t)')
13plt.plot(t, h, 'k', linewidth=2, label='f(t) + g(t)')
14plt.legend()
15plt.title("Addition in Function Space")
16plt.show()

5. Summary Check

Which property ensures that 2(u + v) is the same as 2u + 2v?