In a von Neumann regular commutative ring with unity every finitely generated ideal is principal

Let $$R$$ be a commutative, von Neumann regular ring with unity. How to show that every finitely generated ideal in $$R$$ is principal?

I can see, in view of mathematical induction, it suffices to show that any ideal generated by two elements of $$R$$ must be principal.

Let $$I=(a,b)$$ be an ideal of $$R.$$ Since $$I$$ is commutative with unity, $$I=\{xa+yb:x,y\in R\}.$$ Also since $$R$$ is regular there exist $$r,s\in R$$ such that $$a=ara=ra^2$$ and $$b=bsb=sb^2.$$

However I cannot figureout which element would generate $$I.$$ Please help.

• It seems that when you write "regular" you mean "von Neumann regular". If this is the case, it would be good to update your post accordingly, since ''regular'' by itself has a very different meaning in commutative algebra. – Alex Wertheim Feb 15 at 5:20
• This can be strengthened to: in any von Neumann regular ring (commutative or not) every f.g. right ideal is a summand of $R_R$ (and every f.g. left ideal is a summand in $_RR$.) – rschwieb Feb 15 at 13:48

Since $$ara=a$$, the element $$e=ar$$ is idempotent (i.e., $$e^2=e$$) and generates the same ideal as $$a$$.
Similarly, $$f=bs$$ is idempotent and generates the same ideal as $$b$$.
These idempotent elements are easier to deal with than $$a$$ and $$b$$, and in particular $$e+f-ef = ar + bs -arbs$$ is another idempotent element that generates the ideal $$\langle e,f\rangle=\langle a,b \rangle$$, since $$e(e+f-ef)=e$$ and $$f(e+f-ef)=f$$.