Section 1 · 8 min read

Monoids and groups

Algebraic structures from closure to groups, identity and inverse calculations, cyclic groups, element orders, subgroups and Lagrange's theorem.

On this page
  1. The hierarchy of structures
  2. Identity and inverse under a custom operation
  3. Order of elements and cyclic groups
  4. Subgroups and Lagrange's theorem
  5. Worked examples
  6. Common traps
  7. Quick revision

GATE questions on groups are usually one mark and test definitions: is this structure a group, what is the identity or inverse under an unusual operation, how many generators does a cyclic group have, which orders are possible for subgroups or elements. Each needs only a few facts, applied carefully.

The hierarchy of structures

Let SS be a set and ∗* a binary operation on it.

Structure Closure Associative Identity Inverses
Groupoid (magma) yes
Semigroup yes yes
Monoid yes yes yes
Group yes yes yes yes
Abelian group group axioms plus a∗b=b∗aa * b = b * a

Each row adds one axiom to the row above. A monoid is a semigroup with an identity element.

Standard examples

Structure What it is Why not higher
(N,+)(\mathbb{N}, +) with N={1,2,… }\mathbb{N} = \{1, 2, \dots\} semigroup no identity
(N∪{0},+)(\mathbb{N} \cup \{0\}, +) monoid no inverses
(Z,−)(\mathbb{Z}, -) groupoid subtraction is not associative
(Z,+)(\mathbb{Z}, +), (Q,+)(\mathbb{Q}, +), (R,+)(\mathbb{R}, +) abelian groups
(Z,×)(\mathbb{Z}, \times) monoid only ±1\pm 1 have inverses
(Q∖{0},×)(\mathbb{Q} \setminus \{0\}, \times) abelian group
(Σ∗,⋅)(\Sigma^*, \cdot), strings under concatenation monoid, identity ε\varepsilon no inverses, not commutative
(P(S),∪)(\mathcal{P}(S), \cup) monoid, identity ∅\emptyset no inverses
(P(S),⊕)(\mathcal{P}(S), \oplus) (symmetric difference) abelian group, identity ∅\emptyset, A−1=AA^{-1} = A
(Zn,+n)(\mathbb{Z}_n, +_n) abelian group of order nn
(Zn∖{0},×n)(\mathbb{Z}_n \setminus \{0\}, \times_n) group iff nn is prime otherwise not closed
(U(n),×n)(U(n), \times_n), units mod nn abelian group of order φ(n)\varphi(n)
n×nn \times n invertible real matrices under multiplication group, not abelian for n≥2n \ge 2

Basic facts in any group

  • The identity is unique, and each element has a unique inverse.
  • (ab)−1=b−1a−1(ab)^{-1} = b^{-1}a^{-1} (order reverses).
  • Cancellation: ab=ac⇒b=cab = ac \Rightarrow b = c. So every row and every column of a group's operation table is a permutation of the elements (the Latin square property).
  • If every element satisfies a2=ea^2 = e, the group is abelian.
  • Every group with at most 5 elements is abelian. The smallest non-abelian group is S3S_3, with 6 elements.

Identity and inverse under a custom operation

GATE likes operations such as a∗b=a+b−ka * b = a + b - k or a∗b=a+b+aba * b = a + b + ab. The method is always the same.

  1. Identity: solve a∗e=aa * e = a for ee, and confirm ee does not depend on aa.
  2. Inverse: solve a∗b=ea * b = e for bb.
  3. Associativity: expand (a∗b)∗c(a * b) * c and a∗(b∗c)a * (b * c) and compare. Also check that the set is closed.

For a∗b=a+b+aba * b = a + b + ab, note 1+(a∗b)=(1+a)(1+b)1 + (a * b) = (1 + a)(1 + b). This shows the operation is ordinary multiplication in disguise after the shift x↦1+xx \mapsto 1 + x, so it is associative and commutative, the identity is 00, and −1-1 must be excluded because 1+(−1)=01 + (-1) = 0 has no multiplicative inverse.

Order of elements and cyclic groups

The order of aa, written o(a)o(a), is the smallest k≥1k \ge 1 with ak=ea^k = e. In (Zn,+n)(\mathbb{Z}_n, +_n) the "power" aka^k means ka mod nka \bmod n, and o(a)=ngcd⁡(a,n).o(a) = \frac{n}{\gcd(a, n)}.

Properties:

  • o(a)=o(a−1)o(a) = o(a^{-1}), and o(ab)=o(ba)o(ab) = o(ba).
  • am=ea^m = e iff o(a)∣mo(a) \mid m.
  • o(ak)=o(a)gcd⁡(k,o(a))o(a^k) = \dfrac{o(a)}{\gcd(k, o(a))}.

A group is cyclic if some element gg generates it: G={gk}G = \{g^k\}. Facts:

  • Every cyclic group is abelian. The converse fails (Klein four group Z2×Z2\mathbb{Z}_2 \times \mathbb{Z}_2).
  • A cyclic group of order nn has exactly φ(n)\varphi(n) generators. In Zn\mathbb{Z}_n these are the kk with gcd⁡(k,n)=1\gcd(k, n) = 1.
  • Every subgroup of a cyclic group is cyclic. For each divisor dd of nn there is exactly one subgroup of order dd, and exactly φ(d)\varphi(d) elements of order dd.
  • Every group of prime order is cyclic.
  • Zm×Zn\mathbb{Z}_m \times \mathbb{Z}_n is cyclic iff gcd⁡(m,n)=1\gcd(m, n) = 1.

Euler's totient: for n=p1a1⋯pkakn = p_1^{a_1} \cdots p_k^{a_k}, φ(n)=n∏i(1−1pi).\varphi(n) = n \prod_{i}\left(1 - \frac{1}{p_i}\right). Examples: φ(12)=4\varphi(12) = 4, φ(36)=12\varphi(36) = 12, φ(60)=16\varphi(60) = 16, φ(p)=p−1\varphi(p) = p - 1 for prime pp.

Subgroups and Lagrange's theorem

H⊆GH \subseteq G is a subgroup if it is a group under the same operation. Tests:

  • One-step test: HH nonempty and a,b∈H⇒ab−1∈Ha, b \in H \Rightarrow ab^{-1} \in H.
  • For finite HH: nonempty and closed under the operation is enough.

Lagrange's theorem. If GG is finite and HH is a subgroup, then ∣H∣|H| divides ∣G∣|G|. The number of distinct cosets is ∣G∣/∣H∣|G| / |H|.

Consequences:

  • The order of every element divides ∣G∣|G|, so a∣G∣=ea^{|G|} = e.
  • A group of prime order has only the trivial subgroups.
  • Fermat's little theorem is the case G=U(p)G = U(p): ap−1≡1(modp)a^{p-1} \equiv 1 \pmod p.

The converse of Lagrange is false in general: the alternating group A4A_4 has order 12 but no subgroup of order 6. It is true for cyclic groups.

The union of two subgroups is a subgroup only if one contains the other. The intersection of two subgroups is always a subgroup.

Worked examples

Worked example 1: Identity and inverse

On Z\mathbb{Z} define a∗b=a+b−4a * b = a + b - 4. Find the identity and the inverse of 9.

  1. a∗e=a+e−4=aa * e = a + e - 4 = a gives e=4e = 4.
  2. 9∗b=9+b−4=49 * b = 9 + b - 4 = 4 gives b=−1b = -1.

Check associativity: (a∗b)∗c=a+b+c−8=a∗(b∗c)(a * b) * c = a + b + c - 8 = a * (b * c). Closure holds in Z\mathbb{Z}. So (Z,∗)(\mathbb{Z}, *) is an abelian group with identity 4, and in general a−1=8−aa^{-1} = 8 - a.

Worked example 2: Orders in a cyclic group

In (Z20,+20)(\mathbb{Z}_{20}, +_{20}), find the order of 8 and the number of elements of order 10.

  1. o(8)=20/gcd⁡(8,20)=20/4=5o(8) = 20 / \gcd(8, 20) = 20 / 4 = 5. Check: 5⋅8=40≡05 \cdot 8 = 40 \equiv 0.
  2. Elements of order 10: φ(10)=4\varphi(10) = 4. They are 2,6,14,182, 6, 14, 18, the kk with gcd⁡(k,20)=2\gcd(k, 20) = 2.

Worked example 3: Is it a group?

Is {1,2,4,5,7,8}\{1, 2, 4, 5, 7, 8\} under multiplication mod 9 a group?

These are exactly the residues coprime to 9, so the set is U(9)U(9), which has order φ(9)=6\varphi(9) = 6 and is closed. Identity is 1. Inverses: 2⋅5=10≡12 \cdot 5 = 10 \equiv 1, 4⋅7=28≡14 \cdot 7 = 28 \equiv 1, 8⋅8=64≡18 \cdot 8 = 64 \equiv 1. It is a group. Powers of 2: 2,4,8,7,5,12, 4, 8, 7, 5, 1, so 2 generates it and U(9)U(9) is cyclic of order 6.

Worked example 4: Possible subgroup orders

A group GG has order 30. Can it have a subgroup of order 4? An element of order 15?

  • 4∤304 \nmid 30, so no subgroup of order 4.
  • 15∣3015 \mid 30, so Lagrange does not rule out an element of order 15, and Z30\mathbb{Z}_{30} has one (the element 2). Lagrange only gives necessary conditions.

Worked example 5: Counting monoid structure

Let Σ={a,b}\Sigma = \{a, b\}. Which of these are monoids: (Σ∗,⋅)(\Sigma^*, \cdot), (Σ+,⋅)(\Sigma^+, \cdot), ({strings of even length},⋅)(\{\text{strings of even length}\}, \cdot)?

  • Σ∗\Sigma^* with concatenation: associative, identity ε\varepsilon. Monoid.
  • Σ+\Sigma^+ excludes ε\varepsilon, so there is no identity. Semigroup only.
  • Even length strings: concatenation of two even strings is even, and ε\varepsilon has length 0. Monoid. Still not a group since abab has no inverse.

Common traps

  • Forgetting closure. {1,2,3,4,5}\{1, 2, 3, 4, 5\} under ×6\times_6 fails because 2×3≡02 \times 3 \equiv 0.
  • Assuming abelian implies cyclic. Z2×Z2\mathbb{Z}_2 \times \mathbb{Z}_2 is abelian and not cyclic.
  • Using the converse of Lagrange. A divisor of ∣G∣|G| need not be a subgroup order (except in cyclic groups).
  • Checking only a∗e=aa * e = a but not that ee is the same for all aa, or not checking that ee lies in the set.
  • Writing (ab)−1=a−1b−1(ab)^{-1} = a^{-1}b^{-1} in a non-abelian group.
  • Counting generators of Zn\mathbb{Z}_n as n−1n - 1. Only elements coprime to nn generate; the count is φ(n)\varphi(n).
  • Treating (Zn∖{0},×n)(\mathbb{Z}_n \setminus \{0\}, \times_n) as a group for composite nn.

Quick revision

  • Semigroup = closure + associativity. Monoid adds identity. Group adds inverses.
  • Strings under concatenation: monoid. P(S)\mathcal{P}(S) under ⊕\oplus: group.
  • Identity and inverse are unique; (ab)−1=b−1a−1(ab)^{-1} = b^{-1}a^{-1}.
  • a2=ea^2 = e for all aa implies abelian. All groups of order at most 5 are abelian.
  • In Zn\mathbb{Z}_n: o(a)=n/gcd⁡(a,n)o(a) = n / \gcd(a, n); generators number φ(n)\varphi(n).
  • Prime order implies cyclic implies abelian.
  • Lagrange: subgroup order and element order divide ∣G∣|G|. Converse false in general (A4A_4).
  • Zm×Zn\mathbb{Z}_m \times \mathbb{Z}_n cyclic iff gcd⁡(m,n)=1\gcd(m, n) = 1.
  • (Zn∖{0},×n)(\mathbb{Z}_n \setminus \{0\}, \times_n) is a group iff nn is prime; U(n)U(n) always is.

Further reading

Test this section