# From Vector Spaces to Periodic Functions

By Susam Pal on 30 Jan 2019

## 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:

$$x + y = y + x$$ for all $$x, y \in \mathbb{R}.$$

$$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 all $$x \in \mathbb{R}.$$

5. Associativity of scalar multiplication:
$$a(bx) = (ab)x$$ for all $$a, b \in \mathbb{Q}$$ and for 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 for 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 for 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}.$$

## 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.

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.
We know that $$b_a = 0$$ for distinct $$a, b \in \mathcal{H}$$ because $$a$$ and $$b$$ are basis vectors.
In the above expansion of $$x,$$ each $$x_a$$ is a 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}.$$ Thus $$(x + b)_{a} = x_a + b_a = x_a + 0 = x_a.$$ This shows that a function $$f(x) = x_a$$ is a periodic function with period $$b$$ for any $$b \in \mathcal{H} \setminus \{a\}.$$
Let us define two functions: \begin{align*} f(x) & = \sum_{a \in \mathcal{H} \setminus \{ b \}} x_a a, & g(x) & = x_b b. \end{align*} where $$b \in \mathcal{H}$$ and $$x \in \mathbb{R}.$$ Let us choose $$c \in \mathcal{H}$$ such that $$c \ne b.$$ Then $$f(x)$$ is a periodic function with period $$b$$ and $$g(x)$$ is a periodic function with period $$c.$$ Further, $f(x) + g(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 $$f(x)$$ and $$g(x)$$ are two periodic functions such that their sum is the identity function.