Beware: not all `obvious' looking rules need be true in general. We give two examples.
ab = 0 does not necessarily imply a = 0 or b = 0.
(a + b)(a - b) = a2 - b2
does not hold in general!
So the lesson is: if you
come up with a probable rule, first prove it!
So, the equality certainly holds in commutative rings.
You can find counterexamples in the ring of quaternions
or in a
ring of 2×2 matrices.