In mathematics, the order of a finite group is the number of its elements. If a group is not finite, one says that its order is infinite. The order of an element of a group (also called period length or period) is the order of the subgroup generated by the element. If the group operation is denoted as a multiplication, the order of an element  of a group, is thus the smallest positive integer  such that , where  denotes the identity element of the group, and  denotes the product of  copies of . If no such  exists, the order of  is infinite. 

The order of a group  is denoted by  or , and the order of an element  is denoted by  or , instead of  where the brackets denote the generated group.

Lagrange's theorem states that for any subgroup  of a finite group , the order of the subgroup divides the order of the group; that is,  is a divisor of . In particular, the order  of any element is a divisor of .

Example
The symmetric group S3 has the following multiplication table.
{| class="wikitable"
|-
!   •
! e || s || t || u || v || w
|-
! e
| e || s || t || u || v || w
|-
! s
| s || e || v || w || t || u
|-
! t
| t || u || e || s || w || v
|-
! u
| u || t || w || v || e || s
|-
! v
| v || w || s || e || u || t
|-
! w
| w || v || u || t || s || e
|}

This group has six elements, so . By definition, the order of the identity, , is one, since . Each of , , and  squares to , so these group elements have order two: . Finally,  and  have order 3, since , and .

Order and structure
The order of a group G and the orders of its elements give much information about the structure of the group. Roughly speaking, the more complicated the factorization of |G|, the more complicated the structure of G.

For  |G| = 1, the group is trivial. In any group, only the identity element a = e has ord(a) = 1. If every non-identity element in G is equal to its inverse (so that a2 = e), then ord(a) = 2; this implies G is abelian since . The converse is not true; for example, the (additive) cyclic group Z6 of integers modulo 6 is abelian, but the number 2 has order 3:

.

The relationship between the two concepts of order is the following: if we write

for the subgroup generated by a, then

For any integer k, we have
ak = e   if and only if   ord(a) divides k.

In general, the order of any subgroup of G divides the order of G. More precisely: if H is a subgroup of G, then
ord(G) / ord(H) = [G : H], where [G : H] is called the index of H in G, an integer. This is Lagrange's theorem. (This is, however, only true when G has finite order. If ord(G) = ∞, the quotient ord(G) / ord(H) does not make sense.)

As an immediate consequence of the above, we see that the order of every element of a group divides the order of the group. For example, in the symmetric group shown above, where ord(S3) = 6, the possible orders of the elements are 1, 2, 3 or 6.

The following partial converse is true for finite groups: if d divides the order of a group G and d is a prime number, then there exists an element of order d in G (this is sometimes called Cauchy's theorem). The statement does not hold for composite orders, e.g. the Klein four-group does not have an element of order four). This can be shown by inductive proof. The consequences of the theorem include: the order of a group G is a power of a prime p if and only if ord(a) is some power of p for every a in G.

If a has infinite order, then all non-zero powers of a have infinite order as well. If a has finite order, we have the following formula for the order of the powers of a:
ord(ak) = ord(a) / gcd(ord(a), k)
for every integer k. In particular, a and its inverse a−1 have the same order.

In any group, 

There is no general formula relating the order of a product ab to the orders of a and b. In fact, it is possible that both a and b have finite order while ab has infinite order, or that both a and b have infinite order while ab has finite order. An example of the former is a(x) = 2−x, b(x) = 1−x with ab(x) = x−1 in the group . An example of the latter is a(x) = x+1, b(x) = x−1 with ab(x) = x. If ab = ba, we can at least say that ord(ab) divides lcm(ord(a), ord(b)). As a consequence, one can prove that in a finite abelian group, if m denotes the maximum of all the orders of the group's elements, then every element's order divides m.

Counting by order of elements
Suppose G is a finite group of order n, and d is a divisor of n.  The number of order d elements in G is a multiple of φ(d) (possibly zero), where φ is Euler's totient function, giving the number of positive integers no larger than d and coprime to it.  For example, in the case of S3, φ(3) = 2, and we have exactly two elements of order 3. The theorem provides no useful information about elements of order 2, because φ(2) = 1, and is only of limited utility for composite d such as d = 6, since φ(6) = 2, and there are zero elements of order 6 in S3.

In relation to homomorphisms
Group homomorphisms tend to reduce the orders of elements: if f: G → H is a homomorphism, and a is an element of G of finite order, then ord(f(a)) divides ord(a). If f is injective, then ord(f(a)) = ord(a). This can often be used to prove that there are no homomorphisms or no injective homomorphisms, between two explicitly given groups. (For example, there can be no nontrivial homomorphism h: S3 → Z5, because every number except zero in Z5 has order 5, which does not divide the orders 1, 2, and 3 of elements in S3.) A further consequence is that conjugate elements have the same order.

Class equation
An important result about orders is the class equation; it relates the order of a finite group G to the order of its center Z(G) and the sizes of its non-trivial conjugacy classes:

where the di are the sizes of the non-trivial conjugacy classes; these are proper divisors of |G| bigger than one, and they are also equal to the indices of the centralizers  in G of the representatives of the non-trivial conjugacy classes. For example, the center of S3 is just the trivial group with the single element e, and the equation reads |S3| = 1+2+3.

See also
 Torsion subgroup

Notes

References
 Dummit, David; Foote, Richard. Abstract Algebra, , pp. 20, 54–59, 90
 Artin, Michael. Algebra, , pp. 46–47

Group theory
Algebraic properties of elements