MATH-322 · Lesson 2 of 12 · 23 min

Groups: definitions and first examples

Lesson 1 met groups informally as collections of symmetries. This lesson gives the formal definition, proves the first consequences of it and builds a stock of examples. The examples matter as much as the theorems. A definition this short covers an enormous range of objects, and the way to develop intuition is to keep several very different groups in mind and test every new statement against them.

Binary operations

A binary operation on a set \(G\) is a function \(G \times G \to G\). It takes an ordered pair \((a, b)\) of elements of \(G\) and returns an element of \(G\), which we usually write as \(a * b\), \(a \cdot b\), \(ab\) or, when the operation is like addition, \(a + b\). The requirement that the answer lies in \(G\) is called closure. Subtraction is a binary operation on the integers but not on the positive integers, because \(2 - 5\) is not positive. Division is a binary operation on the nonzero rational numbers but not on all rationals, because division by 0 is not allowed.

The definition

A group is a set \(G\) together with a binary operation \(*\) on \(G\) satisfying three axioms.

  • Associativity: \((a * b) * c = a * (b * c)\) for all \(a, b, c \in G\).
  • Identity: there is an element \(e \in G\) with \(e * a = a * e = a\) for all \(a \in G\).
  • Inverses: for every \(a \in G\) there is an element \(b \in G\) with \(a * b = b * a = e\).

The group is abelian if in addition \(a * b = b * a\) for all \(a, b\). The number of elements of \(G\) is its order, written \(|G|\); a group is finite if its order is finite. When the operation is clear we write \(ab\) for \(a * b\) and call the operation multiplication even when it is nothing like multiplication of numbers. For abelian groups we often use additive notation instead: the operation is \(+\), the identity is \(0\) and the inverse of \(a\) is \(-a\).

Associativity has a useful consequence. Because \((ab)c = a(bc)\), any product \(a_1 a_2 \cdots a_n\) has the same value however it is bracketed, so we can omit the brackets. This general associativity law follows from the three-element case by induction on \(n\); we use it without further comment. The order of the factors still matters unless the group is abelian.

A first collection of examples

The number systems give the first examples. Each of \(\mathbb{Z}\), \(\mathbb{Q}\), \(\mathbb{R}\) and \(\mathbb{C}\) is an abelian group under addition, with identity 0. The nonzero elements \(\mathbb{Q}^\times\), \(\mathbb{R}^\times\) and \(\mathbb{C}^\times\) are abelian groups under multiplication, with identity 1. The integers under multiplication are not a group, because 2 has no integer inverse. The set \(\{1, -1\}\) is a group under multiplication, and so is \(\{1, i, -1, -i\}\), the fourth roots of unity in \(\mathbb{C}\).

Some groups to keep in mind
SetOperationIdentityInverse of aAbelian?
\(\mathbb{Z}\)addition0\(-a\)yes
\(\mathbb{R}^\times\)multiplication1\(1/a\)yes
\(\{1, i, -1, -i\}\)multiplication1\(\bar a\)yes
\(\mathbb{Z}_n\)addition mod \(n\)0\(n - a\) (or 0)yes
\(GL_2(\mathbb{R})\)matrix product\(I\)\(A^{-1}\)no
\(D_n\)compositionidentity mapundo the motionno for \(n \ge 3\)
\(S_n\)compositionidentity permutationinverse bijectionno for \(n \ge 3\)

The general linear group \(GL_n(\mathbb{R})\) is the set of invertible \(n \times n\) real matrices under matrix multiplication. Matrix multiplication is associative, the identity matrix \(I\) is the identity, and invertible matrices have inverses by definition. A product of invertible matrices is invertible, because \(\det(AB) = \det A \det B \ne 0\), so the operation is closed. For \(n \ge 2\) the group is not abelian. The special linear group \(SL_n(\mathbb{R})\) of matrices with determinant 1 is also a group under multiplication.

The integers modulo \(n\), written \(\mathbb{Z}_n = \{0, 1, \dots, n - 1\}\), form an abelian group under addition modulo \(n\): add as usual and take the remainder on division by \(n\). Lesson 3 studies these groups in detail. The symmetric group \(S_n\) is the group of all permutations of \(\{1, 2, \dots, n\}\) under composition, with \(n!\) elements; lesson 4 is devoted to it. The dihedral group \(D_n\) of symmetries of a regular \(n\)-gon is the subject of lesson 5.

Nonexamples teach as much

It is worth checking each axiom carefully, because many natural structures fail one of them.

  • The natural numbers \(\{0, 1, 2, \dots\}\) under addition have an identity but no inverses for positive numbers.
  • The integers under subtraction are closed, but subtraction is not associative: \((5 - 3) - 1 = 1\) while \(5 - (3 - 1) = 3\). There is also no two-sided identity, since \(0 - a \ne a\).
  • All \(2 \times 2\) real matrices under multiplication have an identity, but singular matrices have no inverse.
  • The set \(\{0, 1, 2, 3\}\) under multiplication modulo 4 is closed and has identity 1, but 2 has no inverse, because \(2x \bmod 4\) is always 0 or 2.

The first theorems

Several facts that look obvious need proof from the axioms, and the proofs show how the axioms are used.

Theorem (uniqueness of the identity). A group has exactly one identity element. Proof: suppose \(e\) and \(e'\) are both identities. Then \(e = ee'\) because \(e'\) is an identity, and \(ee' = e'\) because \(e\) is an identity. So \(e = e'\).

Theorem (uniqueness of inverses). Each element \(a\) has exactly one inverse. Proof: suppose \(b\) and \(c\) are both inverses of \(a\). Then \(b = be = b(ac) = (ba)c = ec = c\). This justifies the notation \(a^{-1}\).

Theorem (cancellation). If \(ab = ac\) then \(b = c\), and if \(ba = ca\) then \(b = c\). Proof: multiply \(ab = ac\) on the left by \(a^{-1}\) to get \(a^{-1}(ab) = a^{-1}(ac)\); by associativity this is \((a^{-1}a)b = (a^{-1}a)c\), that is \(eb = ec\), so \(b = c\). The right law is the same with multiplication on the right.

Cancellation must be done on the correct side. From \(ab = ca\) you cannot conclude \(b = c\) unless the group is abelian. In \(D_3\), for example, \(r s_0 = s_0 r^2\) but \(r \ne r^2\).

Theorem (solving equations). For any \(a, b \in G\) the equation \(ax = b\) has exactly one solution \(x = a^{-1}b\), and \(ya = b\) has exactly one solution \(y = ba^{-1}\). Proof: \(a(a^{-1}b) = (aa^{-1})b = b\), so \(a^{-1}b\) is a solution, and any solution satisfies \(ax = a(a^{-1}b)\), so by cancellation \(x = a^{-1}b\).

Corollary (Latin square property). In the Cayley table of a finite group, every element appears exactly once in each row and once in each column. Proof: the row of \(a\) lists \(ax\) for all \(x\); since \(ax = b\) has exactly one solution for each \(b\), each \(b\) appears exactly once. The same argument with \(ya = b\) handles columns.

Two more small facts: \((a^{-1})^{-1} = a\), because \(a\) satisfies the defining equations \(a^{-1}a = aa^{-1} = e\) for the inverse of \(a^{-1}\), and inverses are unique; and \((ab)^{-1} = b^{-1}a^{-1}\), proved in lesson 1.

Powers

For an element \(a\) and a positive integer \(n\), define \(a^n = a a \cdots a\) with \(n\) factors, \(a^0 = e\) and \(a^{-n} = (a^{-1})^n\). The usual laws \(a^m a^n = a^{m+n}\) and \((a^m)^n = a^{mn}\) hold for all integers \(m\) and \(n\); the proofs are inductions with a little case analysis for negative exponents. But \((ab)^n = a^n b^n\) is false in general; it holds for all \(n\) if \(ab = ba\). In additive notation the power \(a^n\) becomes the multiple \(na = a + a + \cdots + a\).

Worked problem

When does squaring distribute?

Prove that a group \(G\) is abelian if and only if \((ab)^2 = a^2b^2\) for all \(a, b \in G\).

Show solution
  1. If \(G\) is abelian, then \((ab)^2 = abab = aabb = a^2b^2\), moving \(b\) past \(a\).
  2. Conversely, suppose \((ab)^2 = a^2b^2\) for all \(a, b\). Write it out: \(abab = aabb\).
  3. Cancel \(a\) on the left: \(bab = abb\). Then cancel \(b\) on the right: \(ba = ab\).
  4. Since \(a\) and \(b\) were arbitrary, \(G\) is abelian.

Answer: \((ab)^2 = a^2b^2\) for all \(a, b\) holds exactly when the group is abelian; the proof uses left and right cancellation.

Groups of small order

The Latin square property lets us find every possible group table of small order. A group of order 1 is just \(\{e\}\), the trivial group. In a group of order 2, \(\{e, a\}\), the product \(aa\) cannot be \(a\) (the row of \(a\) already has \(a\) under \(e\)), so \(a^2 = e\). In a group of order 3, \(\{e, a, b\}\), the Latin square property forces \(a^2 = b\), \(ab = e\) and \(b^2 = a\); the group is \(\{e, a, a^2\}\) with \(a^3 = e\). So up to renaming there is exactly one group of each order 1, 2 and 3.

Order 4 is the first case with a choice. Let the group be \(\{e, a, b, c\}\). Either some element has \(x^2 \ne e\), or every element squares to the identity. In the first case we get the cyclic group \(\{e, a, a^2, a^3\}\), the same as \(\mathbb{Z}_4\) or the rotations of a square. In the second case \(ab\) must be \(c\) and the table is forced; this is the Klein four-group \(V\), the same as the symmetries of a non-square rectangle. The two tables are genuinely different: \(\mathbb{Z}_4\) has an element of order 4 and \(V\) does not. Lesson 8 makes 'the same group' precise with the notion of isomorphism.

Two 4 by 4 Cayley tables side by side. The left table, for the cyclic group of order 4, has each row shifted one place from the row above, so its identity entries form a broken diagonal. The right table, for the Klein four-group, has e down the whole main diagonal because every element is its own inverse.
The two groups of order 4: the cyclic group and the Klein four-group, with the identity entries shaded

The code below checks a proposed table for the group axioms. It confirms that both order-4 tables are groups and catches a table that looks plausible, every row and column a permutation, but is not associative.

Checking the group axioms on a finite table; a Latin square need not be a group
from itertools import product

def is_group(elems, table):
    """table[(a, b)] = a*b. Returns (ok, reason)."""
    if any(table[(a, b)] not in elems for a, b in product(elems, elems)):
        return False, "not closed"
    for a, b, c in product(elems, elems, elems):
        if table[(table[(a, b)], c)] != table[(a, table[(b, c)])]:
            return False, f"not associative: ({a}{b}){c} != {a}({b}{c})"
    ids = [e for e in elems if all(table[(e, x)] == x == table[(x, e)] for x in elems)]
    if not ids:
        return False, "no identity"
    e = ids[0]
    for a in elems:
        if not any(table[(a, b)] == e == table[(b, a)] for b in elems):
            return False, f"{a} has no inverse"
    return True, f"group with identity {e}"

def from_rows(elems, rows):
    return {(a, b): rows[i][j] for i, a in enumerate(elems) for j, b in enumerate(elems)}

E = "eabc"
z4 = from_rows(E, ["eabc", "abce", "bcea", "ceab"])   # a generates: a^2=b, a^3=c
v4 = from_rows(E, ["eabc", "aecb", "bcea", "cbae"])   # every element squares to e
bad = from_rows("eabcd", ["eabcd", "aecdb", "bcdea", "cdabe", "dbeac"])  # a Latin square
for name, elems, t in [("Z4", E, z4), ("Klein V", E, v4), ("Latin square", "eabcd", bad)]:
    print(f"{name:13s}", is_group(elems, t))
Output
Z4            (True, 'group with identity e')
Klein V       (True, 'group with identity e')
Latin square  (False, 'not associative: (aa)b != a(ab)')

The last example is a warning. The Latin square property is necessary for a table to be a group, but not sufficient: the \(5 \times 5\) table in the code has identity \(e\) and every row and column a permutation, yet it fails associativity. In fact every group of order 5 is cyclic, as lesson 7 shows, and this table is not the cyclic one.

Direct products

Groups can be combined to make larger groups. If \(G\) and \(H\) are groups, the direct product \(G \times H\) is the set of ordered pairs \((g, h)\) with the componentwise operation \((g_1, h_1)(g_2, h_2) = (g_1g_2, h_1h_2)\). The identity is \((e_G, e_H)\) and the inverse of \((g, h)\) is \((g^{-1}, h^{-1})\); associativity holds in each component. The order of \(G \times H\) is \(|G| \cdot |H|\). For example \(\mathbb{Z}_2 \times \mathbb{Z}_2\) has four elements, each of which added to itself gives \((0, 0)\), so it has the same table as the Klein four-group. On the other hand \(\mathbb{Z}_2 \times \mathbb{Z}_3\) turns out to be cyclic of order 6, as lesson 3 explains.

Common mistakes

  • MistakeCancelling on the wrong side: concluding \(b = c\) from \(ab = ca\).

    InsteadCancellation needs the same element on the same side; \(ab = ca\) gives nothing in a nonabelian group.

  • MistakeUsing \((ab)^n = a^nb^n\) in a nonabelian group.

    InsteadThat law needs \(ab = ba\); in general \((ab)^2 = abab\).

  • MistakeForgetting to check closure.

    InsteadThe odd integers under addition fail closure: \(1 + 1 = 2\) is even.

  • MistakeChecking only a left identity or a left inverse.

    InsteadThe definition asks for two-sided identities and inverses; for a group, one-sided versions turn out to suffice, but that is a theorem to prove, not an assumption.

  • MistakeBelieving every Latin square is a group table.

    InsteadAssociativity is a separate condition; the code above shows a Latin square of order 5 that fails it.

Summary and key terms

  • A group is a set with an associative binary operation, an identity and inverses; it is abelian if the operation is commutative.
  • Number systems under addition, nonzero numbers under multiplication, \(\mathbb{Z}_n\), \(GL_n(\mathbb{R})\), \(S_n\) and \(D_n\) are basic examples.
  • The identity and each inverse are unique; cancellation holds on each side; \(ax = b\) has the unique solution \(x = a^{-1}b\).
  • Each element appears exactly once in every row and column of a Cayley table.
  • There is one group of each order 1, 2, 3 and two of order 4: the cyclic group and the Klein four-group.
  • The direct product \(G \times H\) of two groups is a group of order \(|G||H|\) under componentwise multiplication.
binary operation
A function \(G \times G \to G\).
order of a group
The number of elements, \(|G|\).
trivial group
The group \(\{e\}\) with one element.
cancellation law
\(ab = ac \implies b = c\), and \(ba = ca \implies b = c\).
general linear group
\(GL_n(\mathbb{R})\), the invertible \(n \times n\) real matrices under multiplication.
Klein four-group
The group of order 4 in which every element squares to the identity.
direct product
\(G \times H\) with the componentwise operation.
additive notation
Writing the operation of an abelian group as \(+\), the identity as 0 and the inverse as \(-a\).

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Is the set of \(2 \times 2\) real matrices with determinant 2 a group under multiplication?

    Show answer

    No: \(\det(AB) = 4\), so the set is not closed, and the identity matrix (determinant 1) is not in it.

  2. Define \(a * b = a + b + 1\) on \(\mathbb{Z}\). Is \((\mathbb{Z}, *)\) a group?

    Show answer

    Yes. It is associative (both bracketings give \(a + b + c + 2\)), the identity is \(-1\), and the inverse of \(a\) is \(-a - 2\).

  3. Prove that if \(x^2 = x\) in a group then \(x = e\).

    Show answer

    Write \(xx = xe\) and cancel \(x\) on the left.

  4. In a group, show that \(ab = e\) implies \(ba = e\).

    Show answer

    From \(ab = e\), \(b = a^{-1}\) by uniqueness of solutions of \(ax = e\). Then \(ba = a^{-1}a = e\).

  5. Find the inverse of \((2, 1)\) in \(\mathbb{Z}_5 \times \mathbb{Z}_3\).

    Show answer

    \((3, 2)\), since \(2 + 3 \equiv 0 \pmod 5\) and \(1 + 2 \equiv 0 \pmod 3\).

  6. Show that a group of even order has an element \(a \ne e\) with \(a^2 = e\).

    Show answer

    Pair each element with its inverse. Elements with \(a \ne a^{-1}\) pair off, so an even number of elements satisfy \(a = a^{-1}\). That set contains \(e\), so it has at least one more element.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz