TITLE: If $A=Ae\oplus A(1-e)$, is $e$ a nontrivial idempotent?
QUESTION [5 upvotes]: My book says "it is easy to see that $A$ (a commutative ring) has an idempotent $e\neq 0,1$ if and only if it is a direct sum of rings $A=A_1\oplus A_2$ with $A_1=Ae$ and $A_2=A(1-e)$."
I know the $\implies$ implication, but if $A=Ae\oplus A(1-e)$, why is $e$ a nontrivial idempotent? I tried writing $e=ae+b(1-e)$ for $a,b\in A$ and squaring, but nothing cancels correctly. I also tried computing $e(1-e)$ with $1-e=1-ae-b(1-e)$, but again nothing cancels nicely.

REPLY [6 votes]: This is OK, I think. If $A = Ae \oplus A(1-e)$, then consider $e(1-e) = (1- e)e.$ This is in $Ae \cap A(1-e) = \{ 0\},$ so we must have $e(1-e) =0$ and hence $e = e^2.$ I think you should require both $Ae$ and $A(1-e)$ to be non-zero, though, strictly speaking to exclude $e \in \{0,1 \}.$