Binary Functions

This post belongs to my “Intro Math” series, a set of posts designed to give the foundations to advanced mathematics. More info can be found in Intro Math.

I’ve done a few posts talking about functions that take one input, such as x^{2} , x-5 , etc. Another class of functions, known as Binary Functions, are very interesting and give rise to many mathematical structures.

You already know several binary function, like addition and multiplication. Subtraction and division are alternative forms of these operations and we’ll get to that later.

There are a few ways to designate these functions, a * b, a + b, or f(a,b) . The most common notation for a generic, binary functions is a * b , and I’ll use that unless there’s a more obvious choice.

Like many things in math, it is important to define what set we are working with. The properties of a function can vary based on the set being used. It is important that a function remains closed over the set. Meaning if * is defined over X , then \forall a,b \in X, a * b \in X.

These functions have many different properties, and I’ll devote the remainder of this post to listing them.

A function is called commutative if \forall a,b \in X, a * b = b * a . This means that the order of elements in the function does not matter.

Example 1 – Define a * b = a - b over \mathbb{Z} . This function is not commutative, consider 3 * 5 = -2 and 5 * 3 = 2 .

Example 2 – Define a * b = ab (meaning multiplication) over \mathbb{Z} . This function is commutative since multiplication is commutative.

A function is called associative if \forall a,b,c \in X , ( a * b ) * c = a * ( b * c ) . This means the order that the operation is done over multiple elements does not matter.

Example 3 – Define a * b = a + b + ab over \mathbb{Z} . Consider for a general a,b,c \in \mathbb{Z} . ( a * b ) * c = ( a + b + ab ) * c = a + b + c + ab + ac + bc + abc = a + ab + ac + abc + b + c + bc = a * ( b + c + bc ) = a * ( b * c ) . So this function is associative.

Example 4 – Define a * b = sin(ab) over \mathbb{R} . Consider for a general a,b,c \in \mathbb{Z} . ( a * b ) * c = sin(ab) * c = sin(sin(ab)c) , and a * ( b * c ) = a * sin(bc) = sin(asin(bc)) . These are not the same in general, so this function is not associative.

We’ve talked about properties of the function, but there are also elements that have special features. Define * over X , the identity element of this function is e in X such that \forall a \in X, e * a = a * e = a .

The standard notation for the identity element is e . Sometimes it is more intuitive to use 0 or 1.

Example 5 – Define a * b = a - b over \mathbb{Z} . This function does not have an identity element. You might be tempted to say 0 since a * 0 = a , but 0 * a = -a .

Example 6 – Define a * b = a + b + ab over \mathbb{Z} . Here 0 works as an identity element since a * 0 = 0 * a = a . So for this function and set, e = 0 .

While the identity element is defined for a function and a set, there are some special elements defined for each element of the set. For example, define * over X the inverse of an element a \in X is an element a^{-1} where a * a^{-1} = a^{-1} * a = e

Obviously a function must have an identity element for an element to be invertible. Let’s look at a few examples.

Example 7 – Define a * b = ab over \mathbb{Z} . The function has an identity element, e = 1 . However, not all elements are invertible. For example the inverse of 5 would be \frac{1}{5} , but \frac{1}{5} is not in \mathbb{Z} . There is also no possible way for 0 * a to be 1.

Example 8 – Let’s change the previous example to make it invertible. Now define a * b = ab over \mathbb{R} \ \{0\} . We must also check that it remains closed, but there’s no way for ab = 0 unless a or b are 0 so this is still closed. Now we can say for x \in \mathbb{R} \ \{0\}, x^{-1} = \frac{1}{x} .

Example 9 – Define a * b = a + b + ab over \mathbb{Z} . We saw in Example 6 that the identity element is 0 . To find the inverse, let’s solve the equation a * a^{-1} = 0 for a^{-1} . a * a^{-1} = a + a^{-1} + aa^{-1} = 0 . a^{-1}( 1 + a) = -a. a^{-1} = -a/( 1 + a) . This gives us a way to find the inverse, but there are some issues here. First, the inverse could be a fraction. The inverse is also undefined for a = -1 .

We can fix this by changed the set to be \mathbb{R} \ \{-1\} . Is this closed? We must make sure that a * b can never equal -1 . Let’s solve a * b = -1 for a . a + b + ab = -1 . a( 1 + b ) = ( -1 - b ) . a = ( 1 + b ) / ( -1 - b) . a = -1 . Since a and b cannot be -1, this is definitely closed.

Ok! That was a lot of new vocab. These concepts are critical to understand functions. If you’ve understood this post, as well as all over the other Intro Math posts (especially Logical ImplicationsModulo and Equivalence RelationsSet Theory Part 1, and Set Theory Part 2), then you can begin with Group Theory.

Leave a comment