[Math] Is the set of periodic functions a subspace of $\mathbb{R}^{\mathbb{R}}$? Explain.

linear algebraperiodic functionsvector-spaces

A function $f: \mathbb{R} \rightarrow \mathbb{R}$ is called periodic if there exists a positive number $p$ such that $f(x) = f(x + p)$ for all $x \in \mathbb{R}$. Is the set of periodic functions from $\mathbb{R} \rightarrow \mathbb{R}$ a subspace of $\mathbb{R}^{\mathbb{R}}$? Explain.

attempt: Suppose S be the set of periodic functions.
Then we must show that $S$ is a subspace or not. We must check it's not empty, and that it's closed under addition and scalar multiplication.
Let $f,g \in S$. Then $f,g$ are periodic. So their sum is also.
Thus, $(f + g)(x+ p) = f(x + p) + g(x + p) = f(x) + g(x) = (f + g)(x)$.
So it's closed under addition.
I am confused , I don't really understand. Can someone please help ? Thank you.

Best Answer

For any irrational $\alpha$, the function $f(x)=\sin x+\sin(\alpha x)$ is not periodic, because $\limsup f(x)=2$ but $f(x)<2$ for every $x\in\Bbb R$.

For a proof, see this and have in mind that $f$ is continuous.