Abstract algebra studies algebraic structures.

**Algebraic operation** $\omega: X^n \to X$
is a mapping from the $n$-th Cartesian product $X^n$ of a set to the set $X$ itself,
where $n$ is the **arity** of the algebraic operation:
**nullary operation**, $n = 0$; **unary operation**, $n = 1$; **binary operation**, $n = 2$;
**finitary operation**, $n \in \mathbb{N}$;
**infinitary operation**, $n = \aleph_\alpha, \alpha \in \mathbb{N}$.

**Algebraic system** $(X, (\omega_1, \cdots), (R_1, \cdots))$ is a set $X$
with a class $(\omega_1, \cdots)$ of finitary operations and a class $(R_1, \cdots)$ of relations;
such operations and relations are called **basic** or **primitive** to the algebraic system.
**Universal algebra** or **algebra** is an algebraic system that has no basic relation.
**Relational system** or **model** (in logic) is an algebraic system that has no basic operation.

**Magma** (原群), **semigroup** (半群), **monoid** (幺半群), **group** (群),
and **abelian group** (交换群) are algebras $(X, ∗)$ where $∗$ is a binary operation
satisfying a cumulative list of properties, defined in the following table.

Table: Group-like Algebras $(X, ∗)$ by Cumulative Properties of the Operation

Property | Property Definition | Algebra |
---|---|---|

closure | $\forall a,b \in X, a ∗ b \in X$ | magma |

associativity | $\forall a,b,c \in X, (a ∗ b) ∗ c = a ∗ (b ∗ c)$ | semigroup |

identity | $\exists e \in X, \forall a \in X, e ∗ a = a ∗ e = a$ | monoid |

inverse | $\forall a \in X, \exists b \in X, b ∗ a = a ∗ b = e$ | group |

commutativity | $\forall a,b \in X, a ∗ b = b ∗ a$ | abelian group |

Examples of groups:

- Integers $(\mathbb{Z},+)$, where the identity is 0 and the inverse of $a$ is $-a$.
- Dihedral groups have underlying sets consisting of symmetries like rotations and flections, and composition as group operation.

**Ring** $(X, (+, ×))$ is a set $X$ with two binary operations
called **addition** $+$ and **multiplication** $×$, such that:

- $(X, +)$ is an abelian group;
- $(X, ×)$ is a monoid;
- Multiplication left and right distributes over addition: $a × (b + c) = (a × b) + (a × c)$, $(a + b) × c = (a × c) + (b × c)$;

For a ring $(X, (+, ×))$, **zero** $0$ denotes the identity of $+$ (additive identity),
and $1$ denotes the identity of $×$ (multiplicative identity).
**Subtraction** $-$ is the inverse operation of addition $+$.

Basic properties:

- Multiplication by $0$ annihilates $X$: $0 × a = a × 0 = 0$;
- $-1 × a = -a$;
- The
**zero ring**or**trivial ring**: if $0=1$ in a ring, then it is the only element of the ring. - The additive identity $0$ and the additive inverse $-a$ of each element $-a$ are unique.

Examples of rings:

- Integers $(\mathbb{Z}, (+,×))$, where the additive identity is $0$, the additive inverse of $a$ is $-a$, and the multiplicative identity is $1$.
- Modular arithmetic $\mathbb{Z}/n\mathbb{Z}$
- $\mathcal{M}_n(R)$, where the underlying set is all n-by-n matrices over an arbitrary ring $R$, with matrix addition and matrix multiplication as corresponding operations. It is a special case of matrix ring.
- Polynomial ring over $R$, $R[t]$, consists of the set of polynomials in one or more variables $t$ with coefficients in another ring $R$, often a field.

**Semiring** is an algebra similar to a ring, but without additive inverses.
**Commutative ring** is a ring whose multiplication is commutative.
**Division ring** is a ring with multiplicative inverses for all nonzero elements;
**division** is the inverse operation of multiplication $+$,
defined for all nonzero elements of a division ring.

**Field** $(X, (+, ×))$ is a commutative division ring.

Examples of fields: finite field with four elements; the fields of rational numbers $(\mathbb{Q}, (+,×))$, real numbers $(\mathbb{R}, (+,×))$, and complex numbers $(\mathbb{C}, (+,×))$.

Unary algebra.

Banach algebra.