# Examples on the dimension of vector spaces of real functions

Let $S$ be a vector space of functions from $\mathbb{R}^n$ to $\mathbb{R}$, say $S := \{ f:\mathbb{R}^n \rightarrow \mathbb{R} \}$.

I am looking for some examples in which the dimension of $S$ is known.

For instance, trivial examples are the following.

Linear functions $f(x) := a^\top x$ implies that $\text{dim}(S) = n$.

Quadratic functions $f(x) := x^\top A x$ implies that $\text{dim}(S) = n^2$, or probably just $n(n+1)/2$ because we can take $A$ symmetric.

What is the dimension of the space of:

• Sinusoidal functions $f(x) := a \sin( b^\top x + c)$? Is it just $n+2$?

• Other known less-trivial examples?

Then, if $S_1$ has dimension $d_1$ and $S_2$ has dimension $d_2$, what is the dimension of $S:= \{ f := f_1 \circ f_2 : \ f_1 \in S_1, f_2 \in S_2 \}$?

Also, given a $d$-dimensional vector space $S_0$ of functions $f: \mathbb{R}^{n} \rightarrow \mathbb{R}^m$, and a function $g: \mathbb{R}^m \rightarrow \mathbb{R}$, what is the dimension of the space $S := \{ g \circ f : \ f \in S_0 \}$?

• Is there any reason to think that the set of compositions is a vector space? – Gerry Myerson May 4 '13 at 10:06
• Suppose it is, otherwise the question is not well posed and there is no point in answering. – user693 May 4 '13 at 10:17
• Absurd to suppose the impossible: if $\,f_1,f_2:\Bbb R^n\to\Bbb R^m\,$ and $\,n\neq m\,$ ,then $\,f_1\circ f_2\,$ cannot be defined... – DonAntonio May 4 '13 at 10:29
• Clearly and obviously $f_1: \mathbb{R}^n \rightarrow \mathbb{R}^m$ and $f_2: \mathbb{R}^m \rightarrow \mathbb{R}$. Where is it written that both $f_1$ and $f_2$ are from $\mathbb{R}^n$ to $\mathbb{R}^m$??? – user693 May 4 '13 at 10:38
• Re your question about sinusoidal functions: try thinking about what a basis would be. (The same advice applies to your question in general.) – symplectomorphic May 4 '13 at 10:49

If you examine the last construction in your post you have S is a new space of functions $\mathbb{R}^n \rightarrow \mathbb{R}$ that simply factors through $\mathbb{R}^m$ However since you're fixing the map $g:\mathbb{R}^m \rightarrow \mathbb{R}$ the basis for $S_0$ and what g does to that basis is what completely determines your new vector space. (I'm assuming you are considering the necessary restrictions on g and the functions of $S_0$ to make the composition a vector space)
• Thanks for the answer. So if $f$ belongs to a vector space of dimension $d$ and $g$ is scalar valued, besides "regular enough", the dimension of $S := \{ g \circ f \}$ is $d$ as well. Am I right? – user693 May 4 '13 at 18:32
• I believe it's a little tricky actually. It's somewhat more straightforward if you define it to be the 1 dimensional space spanned by the basis {g}. That resembles a tensor product construction more. In that sense the dimension is also d. However, if you leave it as g is a scalar not 0 then it should keep the dimension the same. But I believe that as originally written g could actually decrease your dimension depending on what you define it to be. Say you have basis $\{f_1,...,f_d\}$ and $g(f_d) = 0$ then in my interpretation your new space should have dim = d - 1. – Q11 May 4 '13 at 18:48
• I see. At least, do you agree that the dimension would be at most $d$? – user693 May 5 '13 at 11:20