Skip to content
GATEiit

GATE CSE · Engineering Mathematics

Monoids and groups

Semigroups, monoids, groups and abelian groups: checking the axioms for a given operation, identities and inverses, order of an element, cyclic groups and generators, subgroups and Lagrange's theorem.

Before you start

  • Sets and functions →

    A binary operation is a function S×S→S; closure means the image stays inside S.

  • Modular arithmetic, gcd and Euler's totient

    The groups GATE uses most are Zn under addition and units modulo n under multiplication.

Concept notes

1. From closure to groups: the ladder of structures

Take a set S with a binary operation ∗. Each axiom added gives a named structure:

Structure Axioms
Groupoid (magma) closure: a∗b∈S
Semigroup + associativity: (a∗b)∗c=a∗(b∗c)
Monoid + identity e: e∗a=a∗e=a
Group + inverse for every a: a∗a−1=a−1∗a=e
Abelian group + commutativity: a∗b=b∗a

Standard examples:

Set and operation Strongest structure
(Z,−) groupoid only (not associative)
(N+,+) (positive integers) semigroup (no identity)
(N,+) with 0; (Z,×) monoid
strings over Σ under concatenation monoid, identity is the empty string ε
(Z,+), (Q∖{0},×), (Zn,+n) abelian group
invertible n×n real matrices under ×, n≥2 non-abelian group

To test a strange operation such as a∗b=a+b−3, check each axiom in order. Find the identity by solving a∗e=a, then the inverse by solving a∗x=e.

2. Basic facts true in every group

  • The identity is unique, and each element has a unique inverse.
  • Cancellation: ab=ac⇒b=c and ba=ca⇒b=c. So the equation ax=b has exactly one solution x=a−1b.
  • Socks and shoes: (ab)−1=b−1a−1, and (a−1)−1=a.
  • In a finite group's Cayley table, every element appears exactly once in each row and each column (a Latin square). A table with a repeat in a row is not a group.
  • If x2=e for every x, the group is abelian: ab=(ab)−1=b−1a−1=ba.
  • Every group of order 1 to 5 is abelian. The smallest non-abelian group has order 6 (the symmetries of a triangle, S3).
  • There are exactly two groups of order 4 up to isomorphism: the cyclic group Z4 and the Klein group V4, in which every non-identity element has order 2.
  • A group of even order has an odd number of elements of order 2, so at least one.

A monoid's identity is also unique, but in a monoid only some elements may have inverses. The invertible elements of any monoid form a group, for example the units {1,−1} of (Z,×).

3. Order of an element and cyclic groups

The order of a group ∣G∣ is its number of elements. The order of an element o(a) is the smallest k≥1 with ak=e (in additive notation, ka=0).

  • am=e if and only if o(a)∣m.
  • o(ak)=o(a)gcd⁡(k,o(a)). In (Zn,+) this reads o(k)=ngcd⁡(k,n).

A group is cyclic if some element g (a generator) gives every element as a power: G=⟨g⟩. Every cyclic group is abelian, and every subgroup of a cyclic group is cyclic.

For a cyclic group of order n:

Question Answer
Number of generators φ(n)
Generators of Zn the k with gcd⁡(k,n)=1
Elements of order d φ(d) if d∣n, otherwise 0
Number of subgroups the number of divisors of n, one subgroup of each order d∣n

Euler's totient: φ(n)=n∏p∣n(1−1p), so φ(12)=4 and φ(20)=8.

The group of units U(n)={k:1≤k<n, gcd⁡(k,n)=1} under multiplication mod n has order φ(n). It may or may not be cyclic: U(10) is cyclic (generated by 3), U(8)={1,3,5,7} is not (every element has order 2).

⟨1⟩ = Z12⟨2⟩, order 6⟨3⟩, order 4⟨4⟩, order 3⟨6⟩, order 2⟨0⟩ = {0}
Subgroup lattice of the cyclic group Z12: exactly one subgroup for each divisor of 12.

4. Subgroups and Lagrange's theorem

A subgroup H≤G is a subset that is itself a group under the same operation.

Subgroup tests:

  • One-step: H non-empty and a,b∈H⇒ab−1∈H.
  • Finite: a non-empty finite subset closed under the operation is a subgroup.

Lagrange's theorem: if G is finite and H≤G, then ∣H∣ divides ∣G∣. The index [G:H]=∣G∣/∣H∣ is the number of left cosets aH, which partition G into equal-sized blocks.

Consequences:

  • o(a) divides ∣G∣, because ⟨a⟩ is a subgroup of order o(a). So a∣G∣=e.
  • A group of prime order p is cyclic, and every non-identity element generates it.
  • Fermat's little theorem follows: ap−1≡1(modp) for p∤a.

The converse is false: a divisor d of ∣G∣ need not be the order of a subgroup. The alternating group A4 has order 12 but no subgroup of order 6. For cyclic groups the converse does hold.

Other facts asked as true/false:

  • The intersection of two subgroups is a subgroup.
  • The union H∪K is a subgroup only when H⊆K or K⊆H.
  • {e} and G are the trivial subgroups of every group.

Formulas to remember

Order of an element of Z_n
o(k)=ngcd⁡(k,n)
Order of a power
o(ak)=o(a)gcd⁡(k,o(a))
Generators of a cyclic group of order n
φ(n)=n∏p∣n(1−1p)
Elements of order d in a cyclic group
φ(d),d∣n
Lagrange's theorem
∣G∣=[G:H]⋅∣H∣
Order divides group order
a∣G∣=e
Inverse of a product
(ab)−1=b−1a−1

Common mistakes

  • Writing (ab)−1=a−1b−1; the order reverses: b−1a−1.
  • Assuming the converse of Lagrange: a divisor of the group order need not be the order of a subgroup (except in cyclic groups).
  • Taking the identity of an odd operation to be 0 or 1 by habit instead of solving a∗e=a.
  • Counting generators of Zn as n−1; it is φ(n).
  • Forgetting to check associativity: closure, identity and inverses alone do not make a group.
  • Assuming every abelian group is cyclic; the Klein four-group is abelian but not cyclic.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Is this operation a group?

conceptual

On S=R∖{−1} define a∗b=a+b+ab. Is (S,∗) a group? Is it abelian?

  1. Step 1: Rewrite the operation in a friendlier form and check closure.

    Try it on paper first.

Example 2: Orders and generators in Z12

numerical

In (Z12,+12), find the order of 8, all generators, and the number of elements of order 4.

  1. Step 1: Use $o(k) = n/\gcd(k,n)$ for $k = 8$.

    Try it on paper first.

Example 3: Using Lagrange on U(8)

numerical

U(8)={1,3,5,7} under multiplication mod 8. Find the order of each element. Is U(8) cyclic?

  1. Step 1: What orders are possible?

    Try it on paper first.

Example 4: Filling a Cayley table of order 3

conceptual

G={e,a,b} is a group with identity e. Find a⋅a, a⋅b and b⋅b.

  1. Step 1: What can $a \cdot b$ be? Use the Latin-square rule.

    Try it on paper first.

Previous year questions

11 official GATE CSE questions on this topic, newest first.

Practise these 11 PYQs →

Topic test

10 questions: up to 4 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE CSE syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.