Mathematics

Binary Operation · 4 min read

What is Binary Operation

Illustration for What is Binary Operation in Binary Operation
What is Binary Operation · Binary Operation

Binary Operation

A binary operation is just a rule that tells us how to join two things from a group together to get one answer that still stays in that same group.

A binary operation × on a set S is a function

: S x S -> S.

It means when you take two numbers from a set and use the rule on them, the result must be inside that set too.

We use the symbol × to show the rule, and we write a × b instead of writing it like a function like (a, b).

Examples

Imagine S is the set of all real numbers (R) and the rule is addition (+). For two numbers a and b in R, the rule is a × b = a + b.

Since adding two real numbers always gives another real number, this is a binary operation.

Imagine S is the set of all integers (Z), which are whole numbers like -1, 0, or 5, and the rule is multiplication (x). For a and b in Z, the rule is a × b = ab.

Multiplying two whole numbers always gives another whole number, so this is a binary operation.

Imagine S is the set of integers and the rule is to pick the bigger number between two numbers.

Let a × b = max{a, b}, the largest of a and b.

This is a binary operation because the bigger number will always be an integer from the set.

Imagine S is the set of all rational numbers (Q), which are numbers that can be fractions, and the rule is to just pick the first number.

Let S = Q and define × by a × b = a.

This is a binary operation because the first number is already in the set.

Imagine S is a collection of functions, and the rule is to join them together one after the other.

Let S = {f : Z -> Z}, with × composition of functions.

This is a binary operation because joining two functions that work on integers gives you a new function that still works on integers.

Imagine S is the set of natural numbers (N), which are counting numbers like 1, 2, 3, and the rule is to raise the first number to the power of the second.

Let S = N, with × defined by a × b = ab (e.g. 2 × 3 = 23 = 8).

This is a binary operation because raising a counting number to the power of another counting number gives a result that is still a counting number.

Key points

  • A binary operation '' on a set S is a function that takes two elements from S and produces a single element also in S.
  • It is formally written as × : S x S -> S, meaning for any a, b in S, a × b must also be in S.
  • Examples of binary operations include addition, multiplication, finding the maximum of two numbers, and function composition.
  • For an operation to be binary, the result of combining any two elements from the set must always remain within that same set.