I've stumbled across some problems in the quotient spaces and I solved many of them but I cannot figure out the following. These are not homework and I appreciate your help.
a) Let $P$ be the space of polynomial function from $\mathbb{R}$ to $\mathbb{R}$. Define $W=\{p\in P:p(0)=p(1)\}$ and $V=\{p\in P:p(0)=p(1)=0\}$. What is the dimension of quotient spaces $P/W$ and $P/V$?
In this part the field of over which we're considering each vector space is $\mathbb{Q}$. Prove the following
b) Let $U=\{(a,b)\in \mathbb{R}^2:a+b\in \mathbb{Q}\}$ then $\mathbb{R}^2/U$ is isomorphic to $\mathbb{R}/\mathbb{Q}$.
c) Let $W=\{(a,b,c)\in \mathbb{R}^3:a+\mathbb{Q}=b+\mathbb{Q}=c+\mathbb{Q}\}$ then $\mathbb{R}^3/W$ is isomorphic to $(\mathbb{R}/\mathbb{Q})^2$.
d) If $X =\{(a, 0, 0)\in \mathbb{R}^3:a\in \mathbb{Q\}}$ then $W/X$ is isomorphic to $\mathbb{Q}^2$.
The dimensions are 1 and 2 respectively. I came up with these by a kind of guesswork: one constraint, like $p(0) = p(1)$, means that (in a finite-dimensional case), $W$ is one dimension smaller than $P$, so $P/W$ has dimension $1$. @jflipp's answer then shows a quick and easy way to prove it, but I'm going to go with the slow-and-difficult way, because that works too, and the q-and-e way isn't the one most students think of.
My solution is to think of a single nonzero element of $E/W$ and say "this must be a basis, because I think the space is 1-dimensional." My example is $p + E$, where $p(x) = x$, I claim that every other polynomial $q$ differs from a scalar multiple of $p$ by something in $E$. I.e., given a polynomial $q$, there's a polynomial $r$ with $r(0) = r(1)$ and a constant $c$ such that $$ q(x) = cp(x) + r(x). $$ I'll pick $c = q(1)- q(0)$, and define $r$ by the equation above, i.e., $$ r(x) = q(x) + (q(1) - q(0))p(x) = q(x) + [q(1) - q(0)]x $$ What's $r(0)$? It's $q(0) + [q(1)-q(0)]0 = q(0)$. What's $r(1)$? It's also $q(0)$. So $r$ really is in $W$.
Thus $P/W$ is at most one dimensional. But since the vector $p$ is not in $W$, the equivalence class of $p$ is not $W$ in $P/W$, so $P/W$ has at least one non-zero element, so it's at least one dimensional. Hence it's exactly one-dimensional.
For the second one, you need to pick TWO basis functions; good choices are $p_0(x) = 1$ and $p_1(x) = x$.
For parts b, c, d, you probably want to find an isomorphism. For part $b$, for instance, you could send the equivalence class $c = (x, y) + U$ to $d = (y - x) + Q$. You have to show this is well-defined by showing that if $(x', y') \in c$, then $(y'-x') + Q$ is the same equivalence class as $d$. That means showing that $(y'-x') - (y-x)$ is in $\mathbb Q$. Well, since $(x',y') \in c$, we know that there is a pair $(a, b) $ with $(x', y') = (x, y) + (a, b)$ and $a + b \in \mathbb Q$.
$$ (x', y') = (x, y) + (a, b) \\ (x'-x , y' - y) = (a, b) \\ (x'-x) + (y'-y) = a + b $$ so the difference we care about turns out ot be in $\mathbb Q$, as needed.