How to find dimension of a given quotient vector space? I need to prove the following result from an exercise book. 
$V = \mathbb{Z}_3[x]$ is a vector space (over $\mathbb{Z_3}$) of all polynomials over $\mathbb{Z_3}$ in indeterminate $x$.
$S = \{x^n + x^{n+2}  : n\in \mathbb{N}\cup\{0\}\}$ and $W = \langle S\rangle$.
How to prove that $\dim\left(V/W\right) = 2$ over $\mathbb{Z_3}$.
I know the formula to find the dimension of quotient spaces. But here I am totally unable to prove it. Kindly help to prove the result. Thanks for your help.
 A: Hint: Let $P(x)\in\mathbb{Z}_3[x]$. Dividing $P(x)$ by $1+x^2$ you'll get$$P(x)=Q(x)(1+x^2)+a+bx,$$for some $Q(x)\in\mathbb{Z}_3[x]$ and some $a,b\in\mathbb{Z}_3$. But $Q(x)(1+x^2)\in W$.
A: Any polynomial in $\mathbb{Z}_3[X]$ is equivalent mod $W$ to a polynomial of degree $\leq1$. 
This is because a term $aX^k$ where $k>1$ is equivalent modulo $\left<S\right>$ to $-aX^{k-2}$, which is equivalent to $aX^{k-4}$, and so on until the degree reaches $0$ or $1$.
Therefore the classes of $1$ and $X$ mod $W$ are a spanning set of $V/W$, and the dimension is at most $2$.
Now to show that the dimension is equal to $2$ you need to see why $\{1, X\}$ is a linearly independent family in $V/W$. This is equivalent to $W\cap \operatorname{Span}(\{1, X\})=\{0\}$, and now the reason for which this is true is because every non-zero element of $W$ has degree at least $2$.
A: The field being $\mathbb{Z}_3$ is irrelevant - the same result holds over any field.  The subspace $W$ contains $1+x^2, x+x^3$, etc.  Modding out by this subspace makes everything in $W$ equal $0$.   So in the quotient vector space $x^2 = -1$, $x^3=-x$, $x^4=-x^2$, etc.  So $\{1,x\}$ is a basis of the quotient space.
