On the ring $\frac{\mathbb{Q}[x]}I$ , where $I=\langle x^2-x\rangle$ Let $R$ be the ring $\frac{\mathbb{Q}[x]}I$ , where $I=\langle x^2-x\rangle$.Then 
$(1) R$ has infinitely many unit elements
$(2)R$ has exactly $4$ idempotent elements
$(3)R $ has infinitely many prime ideals.
$(4) R$ is UFD.
My thoughts:-
$I=\langle x^2-x\rangle=\langle x(x-1)\rangle$
Let $A=\langle x\rangle$ and $B=\langle x-1\rangle$
A and B are comaximal i.e $A+B=\mathbb{Q}[x]$. This is trivial as $x-(x-1)=1$ 
Thus by Chinese Remainder Theorem $\langle x^2-x\rangle=A\cap B=AB$ and $\frac{\mathbb{Q}[x]}{\langle x^2-x \rangle}\simeq \frac{\mathbb{Q}[x]}{\langle x \rangle } ×\frac{\mathbb{Q}[x]}{\langle x-1 \rangle } $
Now 
$\frac{\mathbb{Q}[x]}{\langle x \rangle } \simeq \mathbb{Q}$ and $\frac{\mathbb{Q}[x]}{\langle x-1 \rangle }\simeq \mathbb{Q}$  via the ring homomorphism $\phi :\mathbb{Q}[x] \to \mathbb{Q}$ given by $\phi (p(x))=p(1),$ where $p(x) \in \mathbb{Q}[x]$.
So  $R \simeq \mathbb{Q}×
\mathbb{Q}$
Now every element $(a,b) \neq (0,0)$ from $\mathbb{Q}×
\mathbb{Q}$
 is a unit , so infinitely many unit elements
If $(a,b)^2=(a,b)$ then $a^2=a,b^2=b$ so the idempotent elements are $(1,0),(0,1),(1,1),(0,0)$
I claim $\mathbb{Q}×\{0\}$ and 
$\{0\}×\mathbb{Q}$ are the only proper non trivial ideals .
Proof: If not let $J$ be such an ideal other than the ideals mentioned above. Then there is at least one $(a,b)\neq (0,0) \in J $ but then it is a unit , so $(1,1)\in J$ and $J=
\mathbb{Q}×\mathbb{Q}$ .Thus the claim is proved.
So there are no infinitely many prime ideals.
Again $(a,0)(0,b)=(0,0) $ where $a\ne 0, b\neq 0$ implies that $R$ is not an Integral domain, so it's not a UFD.
Have I missed something or done it wrong? Please go through it and suggest improvements or better ideas.
Thanks for your valuable time.
 A: (1.) Unfortunately, it is not true that every nonzero element of $\mathbb Q \times \mathbb Q$ is a unit. (Can you find the inverse of $(1, 0),$ for instance?) Be careful about what your identity element is. In a unital ring $R \times S$ with pointwise multiplication, the identity element is always $(1_R, 1_S),$ where $1_R$ and $1_S$ are the respective identity elements of $R$ and $S.$ Ultimately, though, it is true that there are infinitely many units in $\mathbb Q \times \mathbb Q.$ (Use the aforementioned hint about the identity element.)
(2.) Correct.
(3.) Correct intuition; incorrect proof. One proof of your correct observation is the following.
Proof. Consider a prime ideal $P$ of $R = \mathbb Q \times \mathbb Q.$ Given any two elements $(a, b)$ and $(c, d)$ of $R$ such that $(a, b)(c, d)$ is in $P,$ we must have (by definition) that $(a, b) \in P$ or $(c, d) \in P.$ Considering that $(0, 0) = (a, 0)(0, a) \in P$ for all nonzero elements $a \in \mathbb Q,$ it follows that $(a, 0) \in P$ or $(0, a) \in P$ for all nonzero $a \in \mathbb Q.$ We will assume first that $(a, 0) \in P.$ We have therefore that $(1/a, 0) (a, 0) = (1, 0)$ is in $P$ so that $P = \mathbb Q \times \{0\}.$ On the other hand, if we have that $(0, a) \in P,$ then the analogous argument will show that $P = \{0\} \times \mathbb Q.$ QED.
(d.) Correct.
