[Math] Proving the set of all real-valued functions on a set forms a vector space

linear algebraproof-verification

The conditions for a set to be a vector space are that it must contain the zero vector and be closed under addition and scalar multiplication. I am having trouble showing that $\mathcal{F}(X, \mathbb{R})$ satisfies these conditions.

1) Closure under addition

Choose $f, g \in \mathcal{F}(X, \mathbb{R})$ I need to show that $f + g \in \mathcal{F}(X, \mathbb{R})$. Choose an arbitrary element $x \in \mathbb{R}$.

Then since

$$f(x) \in \mathcal{F}(X, \mathbb{R})$$
and
$$g(x) \in \mathcal{F}(X, \mathbb{R}),$$

we have

$$f(x) + g(x) = (f + g)(x) \in \mathcal{F}(X, \mathbb{R}).$$

Thus, closure under addition has been proved.

2) Closure under scalar multiplication
Choose some constant $c \in \mathbb{R}$ and an arbitrary function $f \in \mathcal{F}(X, \mathbb{R})$.

We can set some function $g = c\cdot f$, and since $g$ still maps from $X$ to $\mathbb{R}$, we have $g\in\mathcal{F}(X, \mathbb{R})$. Thus, closure under scalar multiplication has been proven.

3) Zero vector This is implied by condition $2$, with $c = 0$.

Is my proof correct?

Best Answer

The conditions you state are those to show that a subset of a vector space is a vector space (then called a vector subspace). In principle, you need to check all the other vector space axions as well (commutativity and associativity of addition, distributive law for the scalar multiplication). All of these are kind of obvious since you only operate on the values, which are real numbers and for which these laws hold. But still, it is important to note that they hold here.

Further down the line, this helps with other spaces of functions (say, continuous functions or differentiable functions or functions invariant under some group operation on $X$): once you know that all functions form a vector space, for any subset of all functions, you only need to check closedness under addition and scalar multiplication (which automatically tells you the zero element is in the set).