# 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.

• The dimension of $P_n$ is $n+1$. You want the dimension of $S$.Thus, in your example, the dimension of $P_4$ is $5$, and the dimension of $S$, as you found, is $2$. – quasi Apr 6 '17 at 14:30
• you shall understand the question throughly…the set the question is talking about is the set of all fourth degree polynomial that is ODD! – Li Chun Min Apr 6 '17 at 14:31
• It might help us, if you say, what $P_n$ actually is. Assuming $P_n$ is the vector space of polynomials of degree equal or less than $n$, then this is the kernel of the linear transformation $p(x) \mapsto p(-x)+p(x)$. What is the dimension of the image (which powers of $x$ will you get)? – ctst Apr 6 '17 at 14:31
• so what is the basis for this vector subspace? – Li Chun Min Apr 6 '17 at 14:32
• Pn is polynomials with real coefficients with degree < or = n – Pelo Apr 6 '17 at 14:35

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$.
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\}$).