[summary: A group is an abstraction of a collection of symmetries of an object. Examples of groups include the collection of symmetries of a triangle (rotating by $~$120^\circ$~$ or $~$240^\circ$~$ degrees and flipping), rearrangements of a collection of objects (permutations), or rotations of a sphere.

A group abstracts from these examples by forgetting what the symmetries are symmetries *of*, and only considers how symmetries behave.

As an analogy, a ball can be red; but if we forget *what* it is that is red, we end up with a certain specific abstract idea, the idea of redness. So, with symmetries and objects, if we forget about the object, we end up with a specific abstract *symmetry*.

- Any two symmetries can be composed. For the symmetries of flipping and rotating a triangle, the whole action of rotating, and then flipping a triangle at once is a symmetry. So there is an
**operation**on a group which represents composition of symmetries. - There is always a do-nothing symmetry. When composed with another symmetry doesn't change that symmetry. So the operation has an
**identity**. - Any symmetry can be reversed. That is, for any symmetry, there is another symmetry where when composed together, give the do-nothing symmetry. Flipping a triangle, and then flipping it again is the same as doing nothing. So the operation has an
**[-inverse_mathematics inverse]**operation. - Like any collection of functions, when composing symmetries, it doesn't matter what order the individual compositions are computed in. When composing $~$f$~$, $~$g$~$, and $~$h$~$, we can compute $~$g \circ f$~$, and then compute $~$h \circ (g \circ f)$~$, or we can compute $~$h \circ g$~$ and then compute $~$(h \circ g) \circ f$~$, and we will get the same result. So the operation is
**associative**.

Note that it is not necessarily the case that the operation is commutative. Flipping and then rotating a triangle will give different symmetry than rotating and then flipping. If it is commutative, then the group is called abelian. ]

[summary(technical): A group $~$G$~$ is a pair $~$(X, \bullet)$~$ where $~$X$~$ is a set and $~$\bullet: X \times X \to X$~$ is a binary operation on $~$X$~$ obeying the following laws:

**Associativity:**$~$x(yz) = (xy)z$~$ for all $~$x, y, z \in X$~$.**Identity:**There is an element $~$e$~$ such that $~$xe=ex=x$~$ for all $~$x \in X$~$.**[-inverse_element Inverses]:**For each $~$x$~$ in $~$X$~$, there is an element $~$x^{-1} \in X$~$ such that $~$xx^{-1}=x^{-1}x=e$~$.

The operation need not be commutative, but if it is then the group is called abelian. ]

A group is an abstraction of a collection of symmetries of an object. Examples of groups include the collection of symmetries of a triangle (rotating by $~$120^\circ$~$ or $~$240^\circ$~$ degrees and flipping), rearrangements of a collection of objects (permutations), or rotations of a sphere. A group abstracts from these examples by forgetting what the symmetries are symmetries *of*, and only considers how symmetries behave.

As an analogy, a ball can be red; but if we forget *what* it is that is red, we end up with a certain specific abstract idea, the idea of redness. So, with symmetries and objects, if we forget about the object, we end up with a specific abstract *symmetry*.

A group $~$G$~$ is a pair $~$(X, \bullet)$~$ where:

- $~$X$~$ is a set, called the "underlying set." By abuse of notation, $~$X$~$ is usually denoted by the same symbol as the group $~$G$~$, which we will do for the rest of the article.
- $~$\bullet : G \times G \to G$~$ is a binary operation. That is, a function that takes two elements of a set and returns a third. We will abbreviate $~$x \bullet y$~$ by $~$xy$~$ when not ambiguous. This operation is subject to the following axioms:
**Identity:**There is an element $~$e$~$ such that $~$xe=ex=x$~$ for all $~$x \in X$~$.**[-inverse_element Inverses]:**For each $~$x$~$ in $~$X$~$, there is an element $~$x^{-1} \in X$~$ such that $~$xx^{-1}=x^{-1}x=e$~$.**Associativity:**$~$x(yz) = (xy)z$~$ for all $~$x, y, z \in X$~$.

1) The set X is the collection of abstract symmetries that this group represents. "Abstract," because these elements aren't necessarily symmetries *of* something, but almost all examples will be.

2) The operation $~$\bullet$~$ is the abstract composition operation.

3) The axiom of identity says that there is an element $~$e$~$ in $~$G$~$ that is a do-nothing symmetry: If you apply $~$\bullet$~$ to $~$e$~$ and $~$x$~$, then $~$\bullet$~$ simply returns $~$x$~$. The identity is unique: Given two elements $~$e$~$ and $~$z$~$ that satisfy axiom 2, we have $~$ze = e = ez = z.$~$ Thus, we can speak of "the identity" $~$e$~$ of $~$G$~$. This justifies the use of $~$e$~$ in the axiom of inversion: axioms 1 through 3 ensure that $~$e$~$ exists and is unique, so we can reference it in axiom 4.

$~$e$~$ is often written $~$1$~$ or $~$1_G$~$, because $~$\bullet$~$ is often treated as an analog of multiplication on the set $~$X$~$, and $~$1$~$ is the multiplicative identity. (Sometimes, e.g. in the case of rings, $~$\bullet$~$ is treated as an analog of addition, in which case the identity is often written $~$0$~$ or $~$0_G$~$.)

4) The axiom of inverses says that for every element $~$x$~$ in $~$X$~$, there is some other element $~$y$~$ that $~$\bullet$~$ treats like the opposite of $~$x$~$, in the sense that $~$xy = e$~$ and vice versa. The inverse of $~$x$~$ is usually written $~$x^{-1}$~$, or sometimes $~$(-x)$~$ in cases where $~$\bullet$~$ is analogous to addition.

5) The axiom of associativity says that \bullet behaves like composition of functions. When composing a bunch of functions, it doesn't matter what order the individual compositions are computed in. When composing $~$f$~$, $~$g$~$, and $~$h$~$, we can compute $~$g \circ f$~$, and then compute $~$h \circ (g \circ f)$~$, or we can compute $~$h \circ g$~$ and then compute $~$(h \circ g) \circ f$~$, and we will get the same result.

%%%knows-requisite(Monoid): Equivalently, a group is a monoid which satisfies "every element has an inverse". %%%

%%%knows-requisite(Category theory): Equivalently, a group is a category with exactly one object, which satisfies "every arrow has an inverse"; the arrows are viewed as elements of the group. This justifies the intuition that groups are collections of symmetries. The object of this category can be thought of an abstract object that the isomorphisms are symmetries of. A functor from this category into the category of sets associates this object with a set, and each of the morphisms a permutation of that set. %%%

# Examples

The most familiar example of a group is perhaps $~$(\mathbb{Z}, +)$~$, the integers under addition. To see that it satisfies the group axioms, note that:

- (a) $~$\mathbb{Z}$~$ is a set, and (b) $~$+$~$ is a function of type $~$\mathbb Z \times \mathbb Z \to \mathbb Z$~$
- $~$(x+y)+z=x+(y+z)$~$
- $~$0+x = x = x + 0$~$
- Every element $~$x$~$ has an inverse $~$-x$~$, because $~$x + (-x) = 0$~$.

For more examples, see the examples page.

# Notation

Given a group $~$G = (X, \bullet)$~$, we say "$~$X$~$ forms a group under $~$\bullet$~$." $~$X$~$ is called the underlying set of $~$G$~$, and $~$\bullet$~$ is called the *group operation*.

$~$x \bullet y$~$ is usually abbreviated $~$xy$~$.

$~$G$~$ is generally allowed to substitute for $~$X$~$ when discussing the group. For example, we say that the elements $~$x, y \in X$~$ are "in $~$G$~$," and sometimes write "$~$x, y \in G$~$" or talk about the "elements of $~$G$~$."

The order of a group, written $~$|G|$~$, is the size $~$|X|$~$ of its underlying set: If $~$X$~$ has nine elements, then $~$|G|=9$~$ and we say that $~$G$~$ has order nine.

# Resources

Groups are a ubiquitous and useful algebraic structure. Whenever it makes sense to talk about symmetries of a mathematical object, or physical system, groups pop up. For a discussion of group theory and its various applications, refer to the group theory page.

A group is a monoid with inverses, and an associative [algebraic_loop loop]. For more on how groups relate to other algebraic structures, refer to the tree of algebraic structures.