Let $R$ be a ring. An element $a\in R$ is called idempotent if $a^2=a$. Suppose that R is a ring with unity $1\neq 0$, and that there are $a,b\in R$ such that $a+b=1$. Prove that $a,b$ are idempotent if and only if $ab=0$.
Even a hint would be awesome. As usual, I feel like the way to start should be really obvious and the proof should be really simple.
If $a + b = 1$, then $b = 1-a$. We then have that the following statements are equivalent: $$ ab = 0\\ a(1-a) = 0\\ a - a^2 = 0\\ a=a^2 $$ The statement $b^2 = b$ follows the same way.