I am trying to solve the problem:
Question: In a ring $R$ with identity, if every idempotent is central, then prove that for $a, b \in R$, $$ab =1 \implies ba=1$$
I have done in the following manner: $$ab=1\\ \implies b(ab)=b\\ \implies (ba)b-b=0\\ \implies (ba-1)b=0$$
Case 1: If $R$ contains no divisor of Zero then as $b \ne 0$ ,we get $$ba-1=0 \implies ba=1$$
Case 2: If $R$ contains divisor of Zeros then we may have $$ba-1\ne0\\ \implies ba\ne1\\ \implies (ab)a\ne a$$ But $ab=1$ hence $a\ne a$, an absurd condition. So $ba-1=0$ or $ba=1$.
I think I have solved the problem but I haven't used the given conditions "Every idempotent is central". So I think there is something wrong which I have done but can't find out! Please rectify my mistake if I am wrong and provide any hint to solve it.
Here's kind of a slick solution (don't read further if you want to figure it out for yourself!)
$$ab = 1$$ $$\Longrightarrow (ba)^{2} = b(ab)a = ba$$
So $ba$ is an idempotent and therefore central. So we have:
$$b(ba) = (ba)b$$ $$\Rightarrow ab(ba) = a(ba)b$$ $$\Rightarrow (ab)(ba) = (ab)(ab)$$ $$\Rightarrow ba = 1$$