In mathematics and more precisely in group theory, the commuting probability (also called degree of commutativity or commutativity degree) of a finite group is the probability that two randomly chosen elements commute. It can be used to measure how close to abelian a finite group is. It can be generalized to infinite groups equipped with a suitable probability measure, and can also be generalized to other algebraic structures such as rings. Definition Let be a finite group. We define as the averaged number of pairs of elements of which commute: where denotes the cardinality of a finite set . If one considers the uniform distribution on , is the probability that two randomly chosen elements of commute. That is why is called the commuting probability of . Results The finite group is abelian if and only if . One has where is the number of conjugacy classes of . If is not abelian, then (this result is sometimes called the 5/8 theorem) and this upper bound is sharp: there is an infinity of finite groups such that , the smallest one is the dihedral group of order 8. There is no uniform lower bound on . In fact, for every positive integer , there exists a finite group such that . If is not abelian but simple, then (this upper bound is attained by , the alternating group of degree 5). The set of commuting probabilities of finite groups is reverse-well-ordered, and the reverse of its order type is known to be either or . Generalizations The commuting probability can be defined for others algebraic structures such as finite rings. The commuting probability can be defined for infinite compact groups; the probability measure is then, after a renormalisation, the Haar measure. References Finite groups