isomorphism between $\mathbb{Q}[x]/(x^2-x)$ and $\mathbb{Q}\times\mathbb{Q}$ 
I want to prove that $\mathbb{Q}[x]/(x^2-x)\cong \mathbb{Q}\times\mathbb{Q}$. 

Using fundamental theorem of isomorphism I have to find a surjective homomorphism between $\mathbb{Q}[x]$ and $\mathbb{Q}\times\mathbb{Q}$, but I don't know how to define this.
 A: Hint You want $x^2 \equiv x$ in the factor, this implies that $x^k \equiv x$ in the factor for all $k \geq 1$.
Therefore, in the factor, you will have
$$a_0+a_1x+...+a_nx^n \equiv a_0+(a_1+....+a_n)x$$
It should be obvious how you can chose a pair of numbers from the last expression.
Alternate Hint $x^2-x=x(x-1)$ is the intersection of the kernels of $P(x) \to P(0)$ and $P(x) \to P(1)$.
A: There are two special elements of $\mathbb{Q}\times\mathbb{Q}$. They are $e_1=(1,0)$ and $e_2=(0,1)$. These two elements have the property that $e_1^2=e_1$ and $e_2^2=e_2$ and $e_1e_2=0$ and $e_1+e_2=1$. We call them orthogonal idempotents. Can you find two such elements in $\mathbb{Q}[x]/(x(1-x))$?
A: If you know the Chinese Remainder Theorem, you can do this quite quickly.  Since $1 = x - (x-1) \in (x) + (x-1)$, then the ideals $(x-1)$ and $(x)$ are comaximal.  Then the Chinese Remainder Theorem implies that
$$
\frac{\mathbb{Q}[x]}{(x(x-1))} \cong \frac{\mathbb{Q}[x]}{(x)} \times \frac{\mathbb{Q}[x]}{(x-1)} \, .
$$
Can you simplify these last two quotients?
