# Subspaces with regards to Functions

I'm trying to wrap my head around vector subspaces and the definition of a subspaces simply being that it is closed under addition and scalar multiplication. I'm looking for an explanation that will help me understand how a function might be closed under addition and scalar multiplication and how it might not be?

For example:

Why is the function y = x^2 not closed under addition and scalar multiplication?

Thank you so much for helping a struggling wannabe mathematician!

Not one function! To show that $V$ is a subspace of the space of all functions, we must show that $\forall f, g\in V\forall a, b\in\mathbb{R}$ the linear combination $af(x)+bg(x)$ is also in V.
For example, to show that continuous functions are a subspace of the space of all functions it is enough to show that $af(x)+bg(x)$ is continuous for $f$, $g$ continuous.