Linear Algebra - Dimension of Subspace How do I go about finding the dimension of the subspace:
$$S:= \{{ p(x) \in P_4: p(-x)= -p(x)\space \forall x \in \mathbb{R} \}}\space of \space P_4$$
My textbook says $\dim(P_n)=n+1$, but this does not give me the correct answer (the correct answer is 2). All help is appreciated. 
 A: So the set $S$ contains the polynomials $\in P_4$ such that $p(-x) = -p(x)$. So lets start by determining the form of these polynomials. Notice how for a monomial with an  even degree e.g. $x^2$ would return the same value if you were to put $-x$ or $x$ however a monomial with an odd degree e.g. $x^3$ would return minus the value you would get if you  put $-x$ instead of $x$. So the only odd monomials that belong to $P_4$ are $x,x^3$ these then would form your basis as they satisfy the property $p(-x) = -p(x)$ and are linearly independent. Therefore the dimension of the $S$ is $2$.
A: Consider the linear map
$$
T\colon P_4\to P_4,
\qquad
T(p(x))=p(x)+p(-x)
$$
The matrix $A$ associated to $T$ with respect to the basis $\{1,x,x^2,x^3,x^4\}$ is determined by computing
\begin{align}
T(1)&=2 \\
T(x)&=0 \\
T(x^2)&=2x^2\\
T(x^3)&=0\\
T(x^4)&=2x^4
\end{align}
so the matrix is
$$
\begin{bmatrix}
2 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 2 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 2
\end{bmatrix}
$$
which has rank $3$ and nullity $2$. Since $S$ is the kernel of $T$, it has dimension $2$ (and is generated by $\{x,x^3\}$).
