Let $R$ be a commutative ring with identity and let $a, b \in R$ such that $a=ab$. How can we make a non zero idempotent element of $R$ by this relation?

$\begingroup$ Just to clarify. Are you are in search of a non zero idempotent $e$ such that $ae=a$ (i.e. to straithen $b$) ? $\endgroup$ – Duchamp Gérard H. E. Aug 30 '15 at 5:35

$\begingroup$ There were four votes to close because of "unclear what you're asking". I thought it was clear, but a little too easy. $\endgroup$ – Todd Trimble♦ Aug 30 '15 at 17:06

2$\begingroup$ I think this is a mistyped HW problem. It is a standard exercise in commutative ring theory to show that a principal ideal $(a)$ which is idempotent in the sense that $(a) = (a)^2$ must be generated by an idempotent element. The proof starts by arguing that $(a)=(a)^2$ implies $a = a^2b$, and then producing an idempotent from this relation. $\endgroup$ – Keith Kearnes Aug 30 '15 at 18:12

1$\begingroup$ @KeithKearnes Thanks; that has the ring of truth to it. With that, closure seems completely justified. $\endgroup$ – Todd Trimble♦ Aug 30 '15 at 22:12
The existence of $a,b∈R$ with $a=ab$ does not imply the existence of an idempotent other than 0 and 1. For example, consider the ring $\mathbb Z[x,y]/(xy)$. It has two such elements, for example $a=x$ and $b=1−y$, but it has no nontrivial idempotents. Any element $p$ in this ring can be written uniquely in the form of a polynomial in $x$ and $y$ with no crossterms (since $xy=0$), say $a+b_1x+⋯+b_mx^m+c_1y+⋯+c_ny^n$, with coefficients in $\mathbb Z$. If $m>0$, then $p^2$ will have an $x^{2m}$ term, which $p$ doesn't, so $p$ can't be idempotent. Similarly, an idempotent can't have $n>0$. So the only possible idempotents are those of $\mathbb Z$, namely 0 and 1.
(I tried to post this as a comment, but for some reason the TeX was made unreadable there.)
Given the relation $a = ab$, which implies $a  ab = a(1  b) = 0$, the only zero divisors you are guaranteed are multiples of $a$ and $1  b$.
For example if $R$ is a domain, and $a,b$ are the images of $x,y$ in $R[x,y]/x(1y)$, then the only zero divisors will be multiples of $a$ and $b$.
But if we do have two zero divisors $a$, $1b$, then we can obtain idempotents whenever $(a, 1b) = (1)$, by the Chinese Remainder Theorem. Find $r,s$ so that $ra + s(1b) = 1$. Then $ra$ and $s(1b)$ are your idempotents.

$\begingroup$ Yes, but this doesn't answer the question, does it? Andreas's answer is that the only such idempotent is $1$. $\endgroup$ – Todd Trimble♦ Aug 30 '15 at 17:04

1$\begingroup$ A useful addendum to "it's not always possible" is "but sometimes it is possible". Furthermore, the comaximality condition is essentially what distinguishes the two cases. $\endgroup$ – PrimeRibeyeDeal Aug 30 '15 at 18:41