Order of Elements in Groups Explained: Formulas and Worked Examples

Learn how to find an element's order using direct powers, gcd formulas, cycle lengths and Lagrange's theorem. Each worked result is checked against its generated subgroup.

KnowledgeGate Team

Exam prep & CS education

Updated 17 Aug 20266 min read

Students often confuse the order of an element with the order of its group. Another common error is stopping at any exponent that produces the identity, without checking whether it is the smallest positive exponent. The fix is one habit and two formulas. The habit: take powers until the identity first returns, then confirm that count by listing the subgroup those powers generate. The formulas: n/gcd(a,n) for additive Z_n, and the LCM of the cycle lengths for a permutation written in disjoint cycles.

What the order of an element means

Let G be a group with identity e. The order of a in G, written ord(a) or |a|, is the least positive m such that a^m = e. If none exists, a has infinite order. In an additive group, replace this with the least positive m such that ma = 0.

Keep three ideas separate:

  • |G| counts every element in the group.

  • ord(a) counts distinct powers of a before the identity returns.

  • The identity has order 1 because e^1 = e.

In Z under addition, no positive m makes m x 5 = 0, so 5 has infinite order. Place these terms in the wider algebra map with Group Theory: Groups, Rings and Fields for GATE CS.

Why the generated cyclic subgroup gives the answer

The generated subgroup is <a> = {e, a, a^2, ...}. If ord(a) = m, then e, a, ..., a^(m-1) are distinct. Otherwise a^i = a^j for some i < j < m, giving a^(j-i) = e too early. At a^m = e, the list restarts. Therefore:

ord(a) = |<a>|.

For a finite group, Lagrange's theorem on <a> <= G says ord(a) divides |G|. If |G| = 24, candidates are {1, 2, 3, 4, 6, 8, 12, 24}. Divisibility does not guarantee that every candidate occurs.

If a^r = e and ord(a) = m, then m divides r. Thus a^12 = e leaves 1, 2, 3, 4, 6, 12; find the least working exponent.

Direct powers worked example in U(20)

Consider the multiplicative group of units modulo 20:

U(20) = {1, 3, 7, 9, 11, 13, 17, 19}.

The operation is multiplication modulo 20, the identity is 1, and |U(20)| = 8. Reduce successive powers of 3:

  • 3^1 = 3

  • 3^2 = 9

  • 3^3 = 27 ≡ 7 (mod 20)

  • 3^4 = 81 ≡ 1 (mod 20)

The first identity occurs at exponent 4, so ord(3) = 4. Also, <3> = {1, 3, 9, 7} has four elements and 4 divides 8.

Similarly, 9^1 = 9 and 9^2 = 81 ≡ 1 (mod 20), so ord(9) = 2. Since 19 ≡ -1 (mod 20), 19^2 ≡ 1 (mod 20) and ord(19) = 2. Asking for ord(4) here is a different mistake: gcd(4,20) = 4, so 4 has no inverse modulo 20 and never belongs to U(20) at all.

A power cycle of 3 in U(20) running 1, 3, 9, 7 and back to 1, with ord(3) = 4.

Additive groups: use n/gcd(a,n) in Z_n

In additive Z_n, the order of [a] is the least positive k satisfying ka ≡ 0 (mod n), meaning n divides ka. Let d = gcd(a,n), with a = da' and n = dn'. Since gcd(a',n') = 1, n' divides ka' first when k = n' = n/d. Hence:

ord([a]) = n/gcd(a,n).

In Z_18, ord([3]) = 18/gcd(3,18) = 18/3 = 6. The check is 3, 6, 9, 12, 15, 0. For [4], ord([4]) = 18/gcd(4,18) = 18/2 = 9, checked by 4, 8, 12, 16, 2, 6, 10, 14, 0.

Element

gcd(a,18)

Order in Z_18

[0]

18

1

[1]

1

18

[2]

2

9

[3]

3

6

[4]

2

9

[5]

1

18

[6]

6

3

[9]

9

2

The identity is an important edge case: gcd(0,18) = 18, so the formula gives 18/18 = 1, not 0.

Permutations and powers of elements

For disjoint cycles, a permutation's order is the LCM of their lengths. For sigma = (1 4 2)(3 5) in S_5, these are 3 and 2, so ord(sigma) = lcm(3,2) = 6. At power 2, the 3-cycle remains; at power 3, the transposition remains; at power 6, both reset.

Use the shortcut only for disjoint cycles. The overlapping (1 2)(2 3) compose to a 3-cycle under either common convention, though its orientation changes. Its order is 3, not lcm(2,2) = 2.

For finite ord(a), another useful formula is:

ord(a^k) = ord(a)/gcd(ord(a),k).

If ord(a) = 18 and k = 12, then ord(a^12) = 18/gcd(18,12) = 18/6 = 3. Check: (a^12)^3 = a^36 = (a^18)^2 = e, while a^12 != e and a^24 = a^6 != e because 18 divides neither exponent.

A permutation figure for (1 4 2)(3 5) with cycle lengths 3 and 2, giving ord = lcm(3, 2) = 6.

Traps that give the wrong order, and a five-step routine

Trap

Why it fails

Correct move

Confusing ord(a) with |G|

Subgroup size differs from group size

Find the first identity return

Accepting a convenient exponent

It may be a multiple of the order

Test smaller divisors first

Writing powers in an additive group

The operation is addition

Use repeated sums and ma = 0

Including a non-unit in U(n)

It lacks a modular inverse

Check gcd(a,n) = 1

Multiplying disjoint cycle lengths

Product is not the general rule

Take their LCM

Reversing Lagrange's theorem

A divisor need not occur

Treat divisors as candidates

In U(20), 3^8 = e does not make the order 8, since 3^4 = e. In Z_18, [3] has order 6, not 18. For (1 4 2)(3 5), use lcm(3,2) = 6. The product happens to agree because 3 and 2 are coprime.

Use this five-step routine:

  1. Identify the operation and identity.

  2. Confirm that the element belongs to the group.

  3. For a finite group, list relevant divisors of |G|.

  4. Test from smallest to largest, or use the applicable formula.

  5. Show that your answer gives the identity and no smaller positive exponent does.

How GATE-style questions test element order

Question forms include operation tables, orders in Z_n or U(n), disjoint cycles, Lagrange filters and ord(a^k). Given an operation table, read the element's own row repeatedly and count the steps back to the identity. Additive modulo n suggests n/gcd(a,n); disjoint cycles suggest LCM; a known finite order suggests the power formula; a Lagrange filter narrows the answer to divisors of the group size; otherwise list powers.

Speed drill: in a group of order 30, let a^10 = e and a^5 != e. The order divides both 30 and 10, so it is in {1, 2, 5, 10}. The second fact removes 1 and 5, leaving 2 or 10. It cannot distinguish them because order 2 also gives a^5 = a != e. Those two facts filter the answer without deciding it. A question wanting a single value must also rule out a^2 = e, which would leave 10.

Recognising the cue before you start computing is what makes these questions quick. Use Discrete Mathematics MCQs for broader revision, follow the GATE CS Exam Preparation route for the wider subject, and move to GATE Test Series: Mocks and Topic-wise Tests when you want timed practice.

Order of elements: the short version and next step

  • Order is the first return to the identity.

  • ord(a) = |<a>|, and in a finite group it divides |G|.

  • In Z_n, ord([a]) = n/gcd(a,n).

  • Disjoint permutation cycles use LCM.

  • ord(a^k) = ord(a)/gcd(ord(a),k).

The checked answers are ord(3) = 4 in U(20), ord([4]) = 9 in Z_18, ord((1 4 2)(3 5)) = 6, and ord(a^12) = 3 when ord(a) = 18. Once you can reproduce all four, GATE Guidance by Sanchit Sir is the structured next step.