  We show that a compact group $G$ has finite conjugacy classes, i.e., is an
FC-group if and only if its center $Z(G)$ is open if and only if its commutator
subgroup $G'$ is finite. Let $d(G)$ denote the Haar measure of the set of all
pairs $(x,y)$ in $G \times G$ for which $[x,y] = 1$; this, formally, is the
probability that two randomly picked elements commute. We prove that $d(G)$ is
always rational and that it is positive if and only if $G$ is an extension of
an FC-group by a finite group. This entails that $G$ is abelian by finite. The
proofs involve measure theory, transformation groups, Lie theory of arbitrary
compact groups, and representation theory of compact groups. Examples and
references to the history of the discussion are given at the end of the paper.
