Why is the set of all polynomial functions of degree at most n a subspace of the set of all functions? I am given that:

Let $F(\mathbb R)$ be the set of all functions $f: \mathbb R \rightarrow \mathbb R$ and let $P_n(\mathbb R)$ be the set of all polynomial functions from $\mathbb R$ to $\mathbb R$ of degree at most $n$. $P_n(\mathbb R)$ is a subspace of $F(\mathbb R)$

However I wouldn't think that the zero function was an element of $P_n(\mathbb R)$ since the zero function is a polynomial function of undefined degree and so does not have degree of at most $n$. And so $P_n(\mathbb R)$ cannot be a subspace of $F(\mathbb R)$
Is it assumed here that the zero function is included in $P_n(\mathbb R)$? If so, why?
 A: Converting my comment into an answer: it is possible to give the zero polynomial a degree, and in my opinion the correct degree to give it is $\boxed{ -\infty }$ (in which case it has degree at most $n$ for every $n \in \mathbb{Z}$). There are several ways to get this answer. Here's one that's specific to $\mathbb{R}$:

Definition: The degree of a polynomial $f(x) \in \mathbb{R}[x]$ is the infimum of all integers $n \in \mathbb{Z}$ such that there exists a constant $C$ such that $|f(x)| \le C |x|^n$ for sufficiently large $x \in \mathbb{R}$.

This gives the expected answer for all nonzero polynomials, and for the zero polynomial we find that every $n \in \mathbb{Z}$ satisfies the above condition so the infimum is $-\infty$ (if we compactify $\mathbb{Z}$ appropriately).
Here's one that's specific to $\mathbb{C}$ but generalizes to a wider class of functions:

Definition: The degree of a rational function $f(x) \in \mathbb{C}(x)$ is the order of its pole at infinity.

This gives the expected answer for all nonzero polynomials, and the zero polynomial has a zero of order $\infty$ (equivalently, a pole of order $-\infty$) at infinity. For a rational function $\frac{p(x)}{q(x)}$ we get that its degree is $\deg p - \deg q$. In particular, for the purposes of thinking about degrees, we can think of $0$ as in some sense the limit of the sequence $1, x^{-1}, x^{-2}, \dots$ of rational functions, whose degrees are $0, -1, -2, \dots $.
And actually this definition, suitably interpreted, works over any field $K$, and defines the degree of a rational function $f(x) \in K(x)$.
Here are some pleasant properties this definition of degree satisfies:

*

*It is always true that $\deg (fg) = \deg f + \deg g$, with no restrictions. This requires that $\deg 0$ have the property then when added to the degree of any other rational function, we get $\deg 0$ again, which $-\infty$ satisfies.

*It is always true that $\deg(f + g) \le \text{max}(\deg f, \deg g)$, again with no restrictions. This requires that $\deg 0$ be less than or equal to the degree of any rational function, which $-\infty$ satisfies.

This means that $- \deg$ defines a valuation on rational functions.
Some people use the convention that the degree of the zero polynomial is $-1$; it should certainly at least be $\le 0$ but this answer doesn't satisfy the first property above even for polynomials, and doesn't satisfy the second property above for rational functions.
Anyway, I'm only saying this because I like talking about the degree of the zero polynomial. Whatever it is everyone agrees that $0$ should be in $P_n$ for every $n$, precisely so that $P_n = \text{span}(1, x, \dots x^n)$ is always a vector space.
A: $P_n(\Bbb R)$ satisfies the subspace criterion.  Namely, it is closed under addition and scalar multiplication.
Thus we have a vector subspace (of $\Bbb F(\Bbb R)$).
I would think that the zero polynomial  would have degree zero.
Looking at the other answer, the comments, and again at your question, you don't explicitly say "vector space", so I am a little confused.  Why it would help to consider the zero polynomial to have degree $-\infty$ is beyond me.  On second perusal, @Qiaochu Yuan has given a couple of intelligent reasons for doing that.
