When discussing rings, integral domains, fields etc, I'm told that the cancellation law holds in any ring that has no zero divisors. By cancellation law, I mean that if we have no zero divisors, we can look at the equation $ab = ac$ and "cancel" the a on the left-hand side, and thus know that $b=c$. (I believe that the proof of this comes out of saying that $(ab-ac) = a(b-c) = 0$ thus implying that $(b-c) = 0$ if $a \neq 0$, and so $b=c$).
What I'm confused about, is that the requirement for the cancliation law is simply that our ring has no zero divsors, there's no mention of our ring containg unity. However, if our ring doesn't contain unity, but the cancellation law holds, then what can we make of the equation $a^2 = a$? Every time I try to simplify this, I find the need to use unity, which I don't believe I am guaranteed to have in my ring. Does saying that our ring has no zero divisors, in fact, imply that our ring contains unity?
Can somone help explain/correct this apparent paradox for me please?
In a ring which satisfies cancellation on both sides, $a$ can only be one of two things: $0$, or else the identity for the ring.
Obviously $0$ satisfies $0^2=0$, and if $a$ is nonzero and satisfies $a^2=a$, then $a(ar-r)=(ra-r)a=0$ for arbitrary $r$, whereupon you must conclude that $ar=r=ra$ for all $r$, and that $a$ is the identity.
Of course, depending on your ring, $0$ may be the only element that satisfies $a^2=a$ (like the rng $(X)$ inside the ring $F[X]$.)