Abstract Algebra: Groups, Rings & Fields

binary operation

A binary operation is a machine that eats two things from a set and spits out one thing — ideally back in the same set. Ordinary addition is a binary operation on numbers: feed it 3 and 5, it returns 8. So is multiplication, and so is the act of stacking one rotation on top of another. The word “binary” just means it takes exactly two inputs.

More precisely, a binary operation on a set S is a function that assigns, to every ordered pair (a, b) of elements of S, a single element of S, usually written a * b. The crucial requirement is closure: the answer must land back inside S. Subtraction is a binary operation on the integers (3 - 5 = -2 is still an integer) but not on the natural numbers, since 3 - 5 leaves the set.

Order can matter: a * b need not equal b * a (think of subtraction, or of doing two rotations in different sequences). An operation where the order never matters is called commutative. Almost all of abstract algebra is the study of sets equipped with one or two well-behaved binary operations, so this is the seed from which groups, rings, and fields all grow.

On the set {0, 1, 2} define a * b = (a + b) mod 3. Then 2 * 2 = (4) mod 3 = 1, and the answer stays in {0, 1, 2}, so this is a binary operation on the set.

Addition modulo 3 — closed on a three-element set.

Closure is part of the definition, not a bonus feature: if a * b can fall outside S, then * is not a binary operation on S at all. Always check both that an answer always exists and that it always stays inside the set.

Also called
binary operator二元运算符二元運算子