 The 5th roots of unity in the complex plane form a group under multiplication. Each non-identity element generates the group.

In abstract algebra, a generating set of a group is a subset of the group set such that every element of the group can be expressed as a combination (under the group operation) of finitely many elements of the subset and their inverses.

In other words, if $S$ is a subset of a group $G$ , then $\langle S\rangle$ , the subgroup generated by $S$ , is the smallest subgroup of $G$ containing every element of $S$ , which is equal to the intersection over all subgroups containing the elements of $S$ ; equivalently, $\langle S\rangle$ is the subgroup of all elements of $G$ that can be expressed as the finite product of elements in $S$ and their inverses. (Note that inverses are only needed if the group is infinite; in a finite group, the inverse of an element can be expressed as a power of that element.)

If $G=\langle S\rangle$ , then we say that $S$ generates $G$ , and the elements in $S$ are called generators or group generators. If $S$ is the empty set, then $\langle S\rangle$ is the trivial group $\{e\)$ , since we consider the empty product to be the identity.

When there is only a single element $x$ in $S$ , $\langle S\rangle$ is usually written as $\langle x\rangle$ . In this case, $\langle x\rangle$ is the cyclic subgroup of the powers of $x$ , a cyclic group, and we say this group is generated by $x$ . Equivalent to saying an element $x$ generates a group is saying that $\langle x\rangle$ equals the entire group $G$ . For finite groups, it is also equivalent to saying that $x$ has order $|G|$ .

A group may need an infinite number of generators. For example the additive group of rational numbers $\mathbb {Q}$ is not finitely generated. It is generated by the inverses of all the integers, but any finite number of these generators can be removed from the generating set without it ceasing to be a generating set. In a case like this, all the elements in a generating set are nevertheless "non-generating elements", as are in fact all the elements of the whole group − see Frattini subgroup below.

If $G$ is a topological group then a subset $S$ of $G$ is called a set of topological generators if $\langle S\rangle$ is dense in $G$ , i.e. the closure of $\langle S\rangle$ is the whole group $G$ .

## Finitely generated group

 Main article: Finitely generated group

If $S$ is finite, then a group $G=\langle S\rangle$ is called finitely generated. The structure of finitely generated abelian groups in particular is easily described. Many theorems that are true for finitely generated groups fail for groups in general. It has been proven that if a finite group is generated by a subset $S$ , then each group element may be expressed as a word from the alphabet $S$ of length less than or equal to the order of the group.

Every finite group is finitely generated since $\langle G\rangle =G$ . The integers under addition are an example of an infinite group which is finitely generated by both 1 and −1, but the group of rationals under addition cannot be finitely generated. No uncountable group can be finitely generated. For example, the group of real numbers under addition, $(\mathbb {R} ,+)$ .

Different subsets of the same group can be generating subsets. For example, if $p$ and $q$ are integers with gcd(pq) = 1, then $\{p,q\)$ also generates the group of integers under addition by Bézout's identity.

While it is true that every quotient of a finitely generated group is finitely generated (the images of the generators in the quotient give a finite generating set), a subgroup of a finitely generated group need not be finitely generated. For example, let $G$ be the free group in two generators, $x$ and $y$ (which is clearly finitely generated, since $G=\langle \{x,y\}\rangle$ ), and let $S$ be the subset consisting of all elements of $G$ of the form $y^{n}xy^{-n)$ for some natural number $n$ . $\langle S\rangle$ is isomorphic to the free group in countably infinitely many generators, and so cannot be finitely generated. However, every subgroup of a finitely generated abelian group is in itself finitely generated. In fact, more can be said: the class of all finitely generated groups is closed under extensions. To see this, take a generating set for the (finitely generated) normal subgroup and quotient. Then the generators for the normal subgroup, together with preimages of the generators for the quotient, generate the group.

## Examples

• The multiplicative group of integers modulo 9, U9 = {1, 2, 4, 5, 7, 8}, is the group of all integers relatively prime to 9 under multiplication mod 9. Note that 7 is not a generator of U9, since
$\{7^{i}{\bmod {9))\ |\ i\in \mathbb {N} \}=\{7,4,1\},$ while 2 is, since
$\{2^{i}{\bmod {9))\ |\ i\in \mathbb {N} \}=\{2,4,8,7,5,1\}.$ • On the other hand, Sn, the symmetric group of degree n, is not generated by any one element (is not cyclic) when n > 2. However, in these cases Sn can always be generated by two permutations which are written in cycle notation as (1 2) and (1 2 3 ... n). For example, the 6 elements of S3 can be generated from the two generators, (1 2) and (1 2 3), as shown by the right hand side of the following equations (composition is left-to-right):
e = (1 2)(1 2)
(1 2) = (1 2)
(1 3) = (1 2)(1 2 3)
(2 3) = (1 2 3)(1 2)
(1 2 3) = (1 2 3)
(1 3 2) = (1 2)(1 2 3)(1 2)
• Infinite groups can also have finite generating sets. The additive group of integers has 1 as a generating set. The element 2 is not a generating set, as the odd numbers will be missing. The two-element subset {3, 5} is a generating set, since (−5) + 3 + 3 = 1 (in fact, any pair of coprime numbers is, as a consequence of Bézout's identity).
• The dihedral group of an n-gon (which has order 2n) is generated by the set {r, s}, where r represents rotation by 2π/n and s is any reflection across a line of symmetry.
• The cyclic group of order $n$ , $\mathbb {Z} /n\mathbb {Z}$ , and the $n$ th roots of unity are all generated by a single element (in fact, these groups are isomorphic to one another).
• A presentation of a group is defined as a set of generators and a collection of relations between them, so any of the examples listed on that page contain examples of generating sets.

## Free group

 Main article: Free group

The most general group generated by a set $S$ is the group freely generated by $S$ . Every group generated by $S$ is isomorphic to a quotient of this group, a feature which is utilized in the expression of a group's presentation.

## Frattini subgroup

An interesting companion topic is that of non-generators. An element $x$ of the group $G$ is a non-generator if every set $S$ containing $x$ that generates $G$ , still generates $G$ when $x$ is removed from $S$ . In the integers with addition, the only non-generator is 0. The set of all non-generators forms a subgroup of $G$ , the Frattini subgroup.

## Semigroups and monoids

If $G$ is a semigroup or a monoid, one can still use the notion of a generating set $S$ of $G$ . $S$ is a semigroup/monoid generating set of $G$ if $G$ is the smallest semigroup/monoid containing $S$ .

The definitions of generating set of a group using finite sums, given above, must be slightly modified when one deals with semigroups or monoids. Indeed, this definition should not use the notion of inverse operation anymore. The set $S$ is said to be a semigroup generating set of $G$ if each element of $G$ is a finite sum of elements of $S$ . Similarly, a set $S$ is said to be a monoid generating set of $G$ if each non-zero element of $G$ is a finite sum of elements of $S$ .

For example, {1} is a monoid generator of the set of natural numbers $\mathbb {N}$ . The set {1} is also a semigroup generator of the positive natural numbers $\mathbb {N} _{>0)$ . However, the integer 0 can not be expressed as a (non-empty) sum of 1s, thus {1} is not a semigroup generator of the natural numbers.

Similarly, while {1} is a group generator of the set of integers $\mathbb {Z}$ , {1} is not a monoid generator of the set of integers. Indeed, the integer −1 cannot be expressed as a finite sum of 1s.