Skip to main content
Logo image

Section 13.5 Commutativity

In Part I we studied the commutative property of integer addition and multiplication. For example, addition is commutative because \(2+7=9\) and \(7+2=9\text{.}\) Subtraction does not have this property. For example, \(2-7=-5\) but \(7-2=5\text{.}\) Next, we study commutativity for general binary operations.
The video in Figure 13.5.1 introduces commutativity for general binary operations. It also gives examples. After the video, we give the formal definition and more examples. Then we give methods for deciding whether a binary operation is commutative.
Figure 13.5.1. Commutativity by Matt Farmer and Stephen Steward.
Carefully read the definition.

Definition 13.5.2.

Let \(S\) be a set and \(\bullet:S\times S \to S\) be a binary operation on \(S\text{.}\) Then, \(\bullet\) is commutative if \(a \bullet b=b \bullet a\) for all \(a\in S\) and \(b\in S\text{.}\)
We know that integer addition and multiplication are commutative. The next example checks whether integer subtraction is also commutative.

Example 13.5.3. Commutativity of known binary operations.

We consider the binary operations from Example 13.1.3:
  1. The addition of integers \(+:\Z\times\Z\to\Z\) is commutative.
  2. The multiplication of natural numbers \(\cdot:\N\times\N\to\N\) is commutative.
  3. We have \(5-2=3\) and \(2-5=(-3)\text{.}\) As \(3\ne(-3)\) we have \(5-2\ne 2-5\text{.}\) This counterexample shows that the binary operation \(-:\Z\times\Z\to\Z\) is not commutative.

Example 13.5.4. Commutativity of \(\star:T\times T\to T\).

Let \(T=\{\Tx,\Ty,\Tz\}\text{,}\) and let the binary operation \(\star:T\times T\to T\) be given by the table in Example 13.1.4. To prove that \(\star\) is commutative, we exhaust all possibilities. We check that for all \(a\in T\) and \(b\in T\text{,}\)
\begin{equation*} a\star b\text{ is equal to } b \star a \end{equation*}
by separately computing \(a\star b\) in the left column and \(b\star a\) in the right column and noticing that the two computations in each row match.
When one of the general elements is the identity element, there is a shortcut. We can handle several cases at the same time by setting one of the two general elements equal to the identity element and using a variable for the other. Recall that the identity element is \(\Ty\) for \(T\) with \(\star\text{.}\) Then, for all \(a\in T\) we have:
\begin{gather*} a\star \Ty=a\\ \Ty\star a=a \end{gather*}
Now, note that if the two general elements are the same, there is nothing to check. For all \(a \in T\text{,}\) we trivially have that \(a\star a = a\star a\text{.}\) So, the only remaining case to check is covered here:
\begin{gather*} \Tx\star \Tz=\Ty\\ \Tz\star \Tx=\Ty \end{gather*}
We have shown that \(a\star b=b\star a\) for all \(a\in T\) and \(b\in T\text{.}\) So, the binary operation \(\star:T\times T \to T\) is commutative.
When an operation on a set is given by an operation table, we can decide whether the operation is commutative by checking the table for a certain symmetry. Find the diagonal from the operation symbol in the top-left corner to the bottom-right corner. Then check whether this diagonal acts like a mirror for the other entries. If it does, the operation is commutative.

Example 13.5.5. Commutativity of \(\star:T\times T\to T\) revisited.

With the above comment in mind, we revisit Example 13.5.4. We shade the diagonal that must act as a mirror for the other entries in the table if the operation is commutative. Then, we individually check the symmetry by pointing out the pairs of entries that need to match and noting that they do, in fact, match.
\(\star\) \(\Tx\) \(\Ty\) \(\Tz\)
\(\Tx\) \(\color{gray}\Tz\) \(\color{red}\Tx\) \(\Ty\)
\(\Ty\) \(\color{red}\Tx\) \(\color{gray}\Ty\) \(\Tz\)
\(\Tz\) \(\Ty\) \(\Tz\) \(\color{gray}\Tx\)
\(\star\) \(\Tx\) \(\Ty\) \(\Tz\)
\(\Tx\) \(\color{gray}\Tz\) \(\Tx\) \(\color{red}\Ty\)
\(\Ty\) \(\Tx\) \(\color{gray}\Ty\) \(\Tz\)
\(\Tz\) \(\color{red}\Ty\) \(\Tz\) \(\color{gray}\Tx\)
\(\star\) \(\Tx\) \(\Ty\) \(\Tz\)
\(\Tx\) \(\color{gray}\Tz\) \(\Tx\) \(\Ty\)
\(\Ty\) \(\Tx\) \(\color{gray}\Ty\) \(\color{red}\Tz\)
\(\Tz\) \(\Ty\) \(\color{red}\Tz\) \(\color{gray}\Tx\)

Example 13.5.6. Commutativity of \(\oplus:\Z_5\times\Z_5\to\Z_5\).

Consider the binary operation \(\oplus:\Z_5\times\Z_5\to\Z_5\) defined by \(a\oplus b=(a+b)\fmod 5\text{.}\) We follow an approach that is similar to that from Example 13.2.5 to show that \(\oplus\) is commutative. Let \(a\in\Z_5\) and \(b\in\Z_5\text{.}\) By the definition of \(\oplus\) and the commutativity of addition of integers we have
\begin{equation*} a\oplus b = (a+b)\fmod 5 = (b+a)\fmod 5=b\oplus a\text{.} \end{equation*}
So \(\oplus\) is commutative

Problem 13.5.7. Commutativity of a binary operation given by a table.

Let \(A = \{\Tg,\Th,\Tc,\Td\}\) and let \(\diamond:A\times A\to A\) be defined by the table:
\(\diamond\) \(\Tg\) \(\Th\) \(\Tc\) \(\Td\)
\(\Tg\) \(\Tg\) \(\Th\) \(\Tc\) \(\Td\)
\(\Th\) \(\Th\) \(\Tg\) \(\Td\) \(\Tc\)
\(\Tc\) \(\Tc\) \(\Td\) \(\Tg\) \(\Box\)
\(\Td\) \(\Td\) \(\Tc\) \(\Th\) \(\Tg\)
Which element in the box makes the operation \(\diamond\) commutative?
Solution.
The operation \(\diamond\) is commutative if for all \(a\) and \(b\) in \(A\) we have \(a\diamond b=b\diamond a\text{.}\) In particular we must have \(\Td\diamond\Tc=\Tc\diamond\Td\text{.}\) Since \(\Td\diamond\Tc=\Th\) we must also have \(\Tc\diamond\Td=\Th\text{.}\) Hence the element \(\Th\) in the box makes \(\diamond\) commutative.

Problem 13.5.8. A non-commutative binary operations.

Give an example of a binary operation that is not commutative.
Solution.
Consider the binary operation subtraction \(-:\Z\times\Z\to\Z\text{.}\) Since \(3-2=1\) and \(2-3=-1\text{,}\) and \(1\ne -1\text{,}\) the binary operation \(-\) is not commutative.
Suppose a binary operation is built from a commutative operation, such as addition or multiplication. Then the binary operation is also commutative.

Problem 13.5.9. Is this binary operations commutative ?

Decide whether the binary operation \(\otimes:\Z_{11}^\otimes\times \Z_{11}^\otimes\to \Z_{11}^\otimes\) given by \(a\otimes b = (a\cdot b) \fmod 11\) is commutative.
Answer.
The binary operation \(\otimes:\Z_{11}^\otimes\times \Z_{11}^\otimes\to \Z_{11}^\otimes\) given by \(a\otimes b = (a\cdot b) \fmod 11\) is commutative.
Solution.
We know multiplication of integers is commutative. That is, for all integers \(a\) and \(b\) we have \((a\cdot b) = (b\cdot a)\text{.}\) Thus
\begin{equation*} a\otimes b = (a\cdot b) \fmod 11 = (b\cdot a) \fmod 11 = b\otimes a\text{,} \end{equation*}
which means that the binary operation \(\otimes\) is commutative.

Problem 13.5.10. Is this binary operations commutative ?

Decide whether the binary operation \(\oplus:\Z_{11}\times \Z_{11}\to \Z_{11}\) given by \(a\oplus b = (a+b) \fmod 11\) is commutative.
Answer.
The binary operation \(\oplus:\Z_{11}\times \Z_{11}\to \Z_{11}\) given by \(a\oplus b = (a+b) \fmod 11\) is commutative.
Solution.
We proceed as in Problem 13.5.9.
Because the addition of integers is commutative, we have \(a+b=b+a\) for all integers \(a\) and \(b\text{.}\) Thus
\begin{equation*} a\oplus b = (a+b) \fmod 11=(b+a)\fmod 11 = b\oplus a, \end{equation*}
which means that \(\oplus\) is a commutative binary operation.
To show that a binary operation is not commutative, look for a counterexample. A counterexample is enough.

Problem 13.5.11. Is this binary operations commutative ?

Decide whether the binary operation \(\ominus:\Z_{11}\times \Z_{11}\to \Z_{11}\) given by \(a\ominus b = (a-b) \fmod 11\) is commutative.
Answer.
The binary operation \(\ominus:\Z_{11}\times \Z_{11}\to \Z_{11}\) given by \(a\ominus b = (a-b) \fmod 11\) is not commutative.
Solution.
We know that subtraction of integers is not commutative. So we suspect that the binary operation \(\ominus\) that is based on subtraction is not commutative. We find a counterexample. Let \(a:=1\) and \(b:=0\text{.}\) Then
\begin{equation*} a\ominus b = 1\ominus 0 = (1-0) \fmod 11 = 1 \fmod 11 = 1 \end{equation*}
and
\begin{equation*} b\ominus a = 0\ominus 1 = (0-1) \fmod 11 = (-1) \fmod 11 = 10\text{.} \end{equation*}
We have found \(a\) and \(b\) such that \(a\ominus b\) is not equal to \(b\ominus a\text{.}\) So the binary operation \(\ominus\) is not commutative.