## Vector Spaces

A fascinating result that appears in linear algebra is the fact that the set of real numbers \( \mathbb{R} \) is a vector space over the set of rational numbers \( \mathbb{Q} \). This may appear surprising at first but it is easy to show that it is indeed so by checking that all eight axioms of vector spaces hold good:

1. Commutativity of vector addition:
   \( x + y = y + x \) for all \( x, y \in \mathbb{R} \).

2. Associativity of vector addition:
   \( x + (y + z) = (x + y) + z \) for all \( x, y, z \in \mathbb{R} \).

3. Existence of additive identity vector:
   We have \( 0 \in \mathbb{R} \) such that \( x + 0 = x \) for all \( x \in \mathbb{R} \).

4. Existence of additive inverse vectors:
   There exists \( -x \in \mathbb{R} \) for every \( x \in \mathbb{R} \) such that \( x + (-x) = 0 \).

5. Associativity of scalar multiplication:
   \( a(bx) = (ab)x \) for all \( a, b \in \mathbb{Q} \) and all \( x \in \mathbb{R} \).

6. Distributivity of scalar multiplication over vector addition:
   \( a(x + y) = ax + by \) for all \( a \in \mathbb{Q} \) and all \( x, y \in \mathbb{R} \).

7. Distributivity of scalar multiplication over scalar addition:
   \( (a + b)x = ax + bx \) for all \( a, b \in \mathbb{Q} \) and all \( x \in \mathbb{R} \).

8. Existence of scalar multiplicative identity:
   We have \( 1 \in \mathbb{Q} \) such that \( 1 \cdot x = x \) for all \( x \in \mathbb{R} \).

This shows that the set of real numbers \( \mathbb{R} \) forms a vector space over the field of rational numbers \( \mathbb{Q} \). Another quick way to arrive at this fact is to observe that \( \mathbb{Q} \subseteq \mathbb{R} \), that is, \( \mathbb{Q} \) is a subfield of \( \mathbb{R} \). Any field is a vector space over any of its subfields, so \( \mathbb{R} \) must be a vector space over \( \mathbb{Q} \).

We can also show that \( \mathbb{R} \) is an infinite dimensional vector space over \( \mathbb{Q} \). Let us assume the opposite, i.e. \( \mathbb{R} \) is finite dimensional. Let \( r_1, \dots, r_n \) be the basis for this vector space. Therefore for each \( r \in \mathbb{R} \), we have unique \( q_1, \dots, q_n \in \mathbb{Q} \) such that \( r = q_1 r_1 + \dots + q_n r_n \). Thus there is a bijection between \( \mathbb{Q}^n \) and \( \mathbb{R} \). This is a contradiction because \( \mathbb{Q}^n \) is countable whereas \( \mathbb{R} \) is uncountable. Therefore \( \mathbb{R} \) must be an infinite dimensional vector space over \( \mathbb{Q} \).

## Problem

Here is an interesting problem related to vector spaces that I came across recently:

Define two periodic functions \( f \) and \( g \) from \( \mathbb{R} \) to \( \mathbb{R} \) such that their sum \( f + g \) is the identity function. The axiom of choice is allowed.

A function \( f \) is periodic if there exists \( p \gt 0 \) such that \( f(x + p) = f(x) \) for all \( x \) in the domain.

If you want to think about this problem, this is a good time to pause and think about it. There are spoilers ahead.

## Solution

The axiom of choice is equivalent to the statement that every vector space has a basis. Since the set of real numbers \( \mathbb{R} \) is a vector space over the set of rational numbers \( \mathbb{Q} \), there must be a basis \( \mathcal{H} \subseteq \mathbb{R} \) such that every real number \( x \) can be written uniquely as a finite linear combination of elements of \( \mathcal{H} \) with rational coefficients, that is, \[ x = \sum_{a \in \mathcal{H}} x_a a \] where each \( x_a \in \mathbb{Q} \) and \( \{ a \in \mathcal{H} \mid x_a \ne 0 \} \) is finite. The set \( \mathcal{H} \) is also known as the Hamel basis.

In the above expansion of \( x \), we use the notation \( x_a \) to denote the rational number that appears as the coefficient of the basis vector \( a \). Therefore \( (x + y)_{a} = x_a + y_a \) for all \( x, y \in \mathbb{R} \) and all \( a \in \mathcal{H} \).

We know that \( b_a = 0 \) for distinct \( a, b \in \mathcal{H} \) because \( a \) and \( b \) are basis vectors. Thus \( (x + b)_{a} = x_a + b_a = x_a + 0 = x_a \) for all \( x \in \mathbb{R} \) and distinct \( a, b \in \mathcal{H} \). This shows that a function \( f(x) = x_a \) is a periodic function with period \( b \) for any \( a \in \mathcal{H} \) and any \( b \in \mathcal{H} \setminus \{ a \} \).

Let us define two functions: \begin{align*} g(x) & = \sum_{a \in \mathcal{H} \setminus \{ b \}} x_a a, & h(x) & = x_b b. \end{align*} where \( b \in \mathcal{H} \) and \( x \in \mathbb{R} \). Now \( g(x) \) is a periodic function with period \( b \) for any \( b \in \mathcal{H} \) and \( h(x) \) is a periodic function with period \( c \) for any \( c \in \mathcal{H} \setminus \{ b \} \). Further, \[ g(x) + h(x) = \left( \sum_{a \in \mathcal{H} \setminus \{ b \}} x_a a \right) + x_b b = \sum_{a \in \mathcal{H}} x_a a = x. \] Thus \( g(x) \) and \( h(x) \) are two periodic functions such that their sum is the identity function.

## References

- Vector Space by Eric W. Weisstein
- The Dimension of R over Q by Alex Youcis
- Sums of Periodic Functions by David Radcliffe