# Unary Set Operations

There are many unary operations on $\mathbb{R}$. For example, negation is a unary set operation that maps $\mathbb{R} \to \mathbb{R}$, for example if $f$ is a function that takes a real number and negates it, then $5 \to - 5$, or $-5 \to -(-5)$.

Some unary operations are only partially unary. One example is reciprocation on real numbers. Since $\frac{1}{0}$ is undefined, $\mathbb{R} \to \mathbb{R}$ except for 0.

# Binary Set Operations

There are also many binary operations on the real numbers. Such operations take two real numbers and produce another real number. If we let $X$ denote a binary operation, then $\mathbb{R} \: X \: \mathbb{R} \to \mathbb{R}$.

For example, addition is a binary operation (e.g. 4 + 5 = 9). Subtraction and multiplication are also some examples of binary operations.

## Commutativity of Binary Operations

Definition: A binary operation is said to be commutative if a change in the order of the arguments results in equivalence. |

For example, multiplication on the real numbers is said to be commutative since $\forall \: x, y \in \mathbb{R}$, $x + y = y + x$. However, there are examples where multiplication is not commutative. For example, if we are given two square matrices A and B, their product $AB ≠ BA$ for all matrices A and B. In fact, $AB = BA$ only for certain cases, hence it is important to note what sort of set we're talking about for binary operations.

## Associativity of Binary Operations

Definition: A binary operation is said to be associative if parentheses can be reordered and the result is equivalent. |

For example, addition is associative since $\forall \: x, y, z \in \mathbb{R}$, $(x + y) + z = x + (y + z)$, for example, (1 + 2) + 3 = 1 + (2 + 3).

## Distributivity of Binary Operations

Distributivity applies when we combined multiplication and addition. For example, on the real numbers $\forall \: x, y, z \in \mathbb{R}$, $z(x + y)= zx + zy$. That is we have distributed the term z over the sum (x + y).

## Identity Elements of Binary Operations

Definition: An element e is said to be an identity element (or neutral element) of a binary operation if under the operation any element combined with e results in the same element. |

One common example arises in addition on real numbers when our identity element e is 0. That is $x + e = x$ only when e = 0. The identity element is not always 0 though. In multiplication on real numbers, $xe = x$ only when our identity element e is 1, and if A is an $m x m$ square matrix then $Ae = A$ only if e is the $m x m$ identity matrix $I_{m x m}$.

## Inverses of Binary Operations

Definition: For an element x, the inverse denoted $x^{-1}$ when combined with x under the binary operation results in the identity element for that binary operation. |

For example, for addition on real numbers, the identity element is 0. Hence $x + x^{-1} = 0$ only when our inverse is -x since $\forall \: x \in \mathbb{R}$, $x + (-x) = 0$.

Furthermore, for multiplication on real numbers, since our identity element is 1, then $x \cdot x^{-1} = 1$ only when our inverse is $\frac{1}{x}$. However, $0 \in \mathbb{R}$, however 0 has no inverse, hence we say that $x^{-1} = \frac{1}{x}$ is a *multiplicative inverse*.