IAE Academy

GATE CS

Monoids and groups

A group is a set with one associative operation that has an identity and gives every element an inverse. The skills this topic needs are testing these properties for an operation given by a formula or a table, and using Lagrange's theorem, element orders and cyclic groups to count elements and subgroups quickly.

7 previous-year questions · 7 solved · 6 practice questions

Binary operations and their properties

A binary operation on a set assigns to each ordered pair with an element . It is closed on if for all (defining a binary operation as a map builds closure in). Check closure first; many failures happen here (for example, subtraction on , since ). Conventions used below: is the identity, is the number of elements of , under addition modulo , ( factors) for , and . In additive notation is written and is written .

Properties to check, in order

  1. Closure: for all .

  2. Associativity: for all .

  3. Identity: some has for all . If an identity exists it is unique.

  4. Inverses: for each there is with . In a monoid (so in a group) an inverse, when it exists, is unique.

  5. Commutativity: for all (needed only for an abelian group).

Operation given by a formula. To find the identity, solve for , confirm that does not depend on and lies in , and check too unless is commutative. To find an inverse, solve for , check , and check too unless is commutative. One counterexample disproves a property; proving one needs an argument for all elements.

Operation given by a table (rows and columns listed in the same order). Closure: every entry belongs to the set. Commutativity: the table is symmetric about the main diagonal. Identity: one element whose row repeats the header row and whose column repeats the header column. Inverses: for each element some has , so the entries sit in symmetric positions and every row and column contains . Associativity cannot be read off the table; it must be checked on triples or known from how the operation is defined.

EXAM TIP

A table in which every row and every column contains each element exactly once (a Latin square) does not by itself make a group, because associativity may fail. Conversely, a missing identity or a row or column with a repeated entry rules out a group quickly.

NUMBER OF BINARY OPERATIONS ON AN N-ELEMENT SET

A binary operation on a set of elements is a filled table, each of its entries chosen from the elements. A commutative one is fixed by the entries on and above the main diagonal. For : in all, commutative.

Semigroups, monoids and groups

What each structure requires

Structure

Closure

Associative

Identity

Inverses

Commutative

Semigroup

Yes

Yes

No

No

No

Monoid

Yes

Yes

Yes

No

No

Group

Yes

Yes

Yes

Yes

No

Abelian group

Yes

Yes

Yes

Yes

Yes

"No" means the property is not required, not that it must fail. Every group is a monoid and every monoid is a semigroup.

Common examples

Set and operation

Closed and associative

Identity

Every element invertible

Verdict

under

Yes

None

No

Semigroup

Even integers under

Yes

None

No

Semigroup

under

Yes

0

No

Monoid

under

Yes

0

Yes

Abelian group

under

Yes

1

No (only )

Monoid

under mod ,

Yes

1

No ( has none)

Monoid

Nonzero rationals under

Yes

1

Yes

Abelian group

real matrices under

Yes

No (singular ones)

Monoid, not commutative

Invertible real matrices under

Yes

Yes

Group, not abelian

Strings over an alphabet of two or more symbols under concatenation

Yes

empty string

No

Monoid, not commutative (with one symbol it is commutative)

INVERSE OF A PRODUCT

Holds in every group; note the reversed order. If the group is abelian the order does not matter. Also .

Cancellation holds in a group: , and . It can fail in a monoid: in under , but . In a group the equations and have the unique solutions and , so every row and every column of a finite group's table contains each element exactly once. The identity is the only element with (cancel one ). A group in which for every is abelian: .

Subgroups and Lagrange's theorem

A non-empty subset of a group is a subgroup if is itself a group under the operation of . Every group has the trivial subgroup and the whole group as subgroups; a subgroup other than is called proper. The order of a group is , the number of its elements.

Subgroup tests for a non-empty subset H

  1. Two-step test: and .

  2. One-step test: (write in additive groups).

  3. If is finite (in particular if is finite), closure alone is enough: .

LAGRANGE'S THEOREM

For a finite group and any subgroup ; is the number of distinct left cosets of in .

A left coset of is . All cosets have exactly elements, and two cosets are equal or disjoint, so they split into equal blocks. That is the whole idea behind Lagrange's theorem. Right cosets split the same way and also number .

EXAM TIP

The converse of Lagrange's theorem is false: a group of order need not have a subgroup of order (the group has none). Lagrange can only rule orders out. Partial converses that do hold: if a prime divides , then has an element of order , and so a subgroup of order (Cauchy's theorem); and a finite cyclic group, or more generally a finite abelian group, has a subgroup of every order dividing .

SIZE OF A PRODUCT SET

For subgroups of a finite group, where . is a subgroup if and only if (always true in an abelian group).

The intersection of two subgroups is always a subgroup. The union of two subgroups is a subgroup only when one of them contains the other; in particular, no group is the union of two proper subgroups.

Order of an element and cyclic groups

The order of an element , written , is the smallest positive integer with (in additive notation, ). If no such exists, the order is infinite. The set is a subgroup with exactly elements (infinitely many if is infinite). A group is cyclic if for some , called a generator.

ORDER OF AN ELEMENT DIVIDES THE GROUP ORDER

In every finite group, by Lagrange applied to . Also .

ORDER OF A POWER

Holds in any group. In the element has order . If has order , the element generates exactly when .

More facts about element orders

  1. and for all .

  2. In a finite group, elements with pair off as . So a group of even order has an odd number of elements of order , and at least one.

NUMBER OF GENERATORS OF A CYCLIC GROUP

For a cyclic group of order , where is Euler's totient (the count of with and ).

EULER'S TOTIENT

The product runs over the distinct primes dividing . For a prime , and .

SUBGROUPS OF A CYCLIC GROUP

A cyclic group of order has exactly one subgroup for each positive divisor of , so the number of subgroups equals the number of divisors of . Every subgroup of a cyclic group is cyclic, and the group has exactly elements of order for each .

The infinite cyclic group. is cyclic and infinite. It has only two generators, and , and its subgroups are for , all of them cyclic.

ORDER IN A DIRECT PRODUCT

In with finite and . Consequently is cyclic if and only if .

EXAM TIP

To count elements of a given order in a cyclic group of order : first check that the order divides (if not, the answer is ), then the answer is . The identity is the only element of order . Check: , since every element has exactly one order.

Standard groups and small groups

Integers modulo under addition. is a cyclic abelian group of order generated by . Units modulo under multiplication (). under multiplication modulo is an abelian group with elements. It is not always cyclic: in , , and , so every element has order at most . is cyclic exactly for with an odd prime and . For , without under multiplication modulo is a group exactly when is prime.

Isomorphism. Two groups and are isomorphic, written , if some bijection satisfies for all ; they are the same group with the elements renamed. A map with this property that need not be a bijection is a homomorphism; it sends the identity of to the identity of and to . An isomorphism preserves the order of every element. Every cyclic group of order is isomorphic to , and every infinite cyclic group to .

Groups of small order

Order

Groups up to isomorphism

Notes

1

trivial group

only

2, 3, 5, 7 (prime)

only

every group of prime order is cyclic

4

and

both abelian; the second has no element of order 4

6

and

(permutations of three objects) is not abelian; it is the smallest non-abelian group

8

, , , and two non-abelian groups (the symmetries of a square and the quaternion group)

five groups, three of them abelian

From the table: every group of order at most is abelian, and a non-abelian group has order at least .

GROUPS OF PRIME ORDER

Any non-identity element has order dividing , so order , hence generates . Every non-identity element is a generator, giving generators.

CYCLIC IMPLIES ABELIAN

Since . The converse is false: is abelian and not cyclic.

WORKED EXAMPLE

On define . Show that is an abelian group, and find its identity and the inverse of .

Solution
  1. Closure: is an integer.

  2. Associativity: .

  3. Identity: solve , so and , which is independent of ; also .

  4. Inverse: solve , so and , which is an integer; is commutative, so as well.

  5. Commutativity: . So it is an abelian group. For the inverse is ; check: .

Answer: Identity ; the inverse of is .

WORKED EXAMPLE

Let be a cyclic group of order with generator . Find the number of elements of order , the order of , and the number of subgroups of .

Solution
  1. Elements of order : divides , so there are of them.

  2. Order of : .

  3. Subgroups: one for each divisor of , namely , which is divisors.

Answer: 4 elements of order 8; ; 8 subgroups.

EXAM TIP

Quick check that a group is not cyclic: find two different elements of order (a cyclic group has at most one), or a non-commuting pair. Quick check that an element order is impossible: it must divide . In the order of the group is , not unless is prime.

PREVIOUS-YEAR QUESTIONS

7 questions from the CS papers

Try each question first, then open the answer. We placed each question under a topic ourselves; the exam paper does not label topics.

See these papers in full: GATE CSE 2025 Set 1 · GATE CSE 2024 Set 1 · GATE CSE 2024 Set 2 · GATE CSE 2023 · GATE CSE 2022 · GATE CSE 2020 · GATE CSE 2018

GATE 2025 CS1 Q.49

GATE 2025 · CS1Q.49 · 2 marks · MSQ

is the set of non-negative integers. Let be the set of functions from to itself. For any two functions , we define

for every number in . Which of the following is/are CORRECT about the mathematical structure ?

  1. (A)

    is an Abelian group.

  2. (B)

    is an Abelian monoid.

  3. (C)

    is a non-Abelian group.

  4. (D)

    is a non-Abelian monoid.

Answer and solution
See the question in the paper
GATE 2025 CS1 Q.49: answer and solution

GATE 2024 CS1 Q.52

GATE 2024 · CS1Q.52 · 2 marks · MSQ

Consider the operators ◊ and □ defined by , , for positive integers. Which of the following statements is/are TRUE?

  1. (A)

    Operator ◊ obeys the associative law

  2. (B)

    Operator □ obeys the associative law

  3. (C)

    Operator ◊ over the operator □ obeys the distributive law

  4. (D)

    Operator □ over the operator ◊ obeys the distributive law

Answer and solution
See the question in the paper
GATE 2024 CS1 Q.52: answer and solution

GATE 2023 CS Q.51

GATE 2023 · CSQ.51 · 2 marks · MSQ

Let be a set and denote the powerset of . Define a binary operation on as follows:

Let . Which of the following statements about is/are correct?

  1. (A)

    is a group.

  2. (B)

    Every element in has an inverse, but is NOT a group.

  3. (C)

    For every , the inverse of is the complement of .

  4. (D)

    For every , the inverse of is .

Answer and solution
See the question in the paper
GATE 2023 CS Q.51: answer and solution

GATE 2022 CS Q.27

GATE 2022 · CSQ.27 · 1 mark · MSQ

Which of the following statements is/are TRUE for a group ?

  1. (A)

    If for all , , then is commutative.

  2. (B)

    If for all , , then is commutative. Here, is the identity element of .

  3. (C)

    If the order of is , then is commutative.

  4. (D)

    If is commutative, then a subgroup of need not be commutative.

Answer and solution
See the question in the paper
GATE 2022 CS Q.27: answer and solution

PRACTICE

6 questions to test yourself

PRACTICE 11 mark · MCQ

Which of the following is a group under the stated operation?

  1. (A)

    under addition

  2. (B)

    under multiplication

  3. (C)

    under multiplication modulo

  4. (D)

    The nonzero rational numbers under multiplication

Answer and solution

Answer: (D)

  1. A has no identity ( is not in the set).

  2. B has an identity but has no integer inverse.

  3. C is not closed: , which is not in the set.

  4. D is closed, associative, has identity , and is the inverse of . So D.

PRACTICE 21 mark · NAT

How many generators does a cyclic group of order have?

Answer and solution

Answer:

  1. The number of generators is .

  2. , so .

PRACTICE 32 marks · NAT

The set is a group under multiplication modulo . How many elements of order does it have?

Answer and solution

Answer:

  1. An element has order exactly when and .

  2. , , .

  3. , , , , none equal to .

  4. So there are elements: .

PRACTICE 42 marks · MCQ

In the group let be the smallest subgroup containing both and . How many elements does have?

  1. (A)

    3

  2. (B)

    5

  3. (C)

    6

  4. (D)

    10

Answer and solution

Answer: (B)

  1. contains , so ; and and are multiples of , so already contains both. Hence .

  2. .

  3. Its order is . So B.

PRACTICE 51 mark · NAT

How many commutative binary operations can be defined on the set ?

Answer and solution

Answer:

  1. A binary operation on is a table with entries , , , , each or .

  2. Commutativity forces , so the operation is fixed by the entries , , .

  3. Each has choices: , which matches with .

PRACTICE 62 marks · MSQ

For which of the following numbers is it true that NO group of order has a subgroup of order ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution

Answer: (A), (D)

  1. By Lagrange's theorem the order of a subgroup must divide .

  2. and do not divide , so no group of order has a subgroup of either order.

  3. The cyclic group has the subgroups of order and of order , so and do occur (even though has no subgroup of order ). So A and D.

OFFICIAL GATE 2027 SYLLABUS WORDING

Copied from the GATE 2027 syllabus; see all 2027 syllabi.

GATE CS

Monoids, Groups

Preparing in Kolkata? IAE Academy's course for GATE CSE.