It is well known that if $G$ is a finite group, then the probability that two elements commutte is either $1$ (if $G$ is abelian) or less than or equal to $\frac58$.


If instead $K$ is a compact group, there exists a unique probability over $K$ that is left-invariant (Haar measure). The same problem as above still makes sense: What is the probability that two elements commutte ? In general, this probability can be non-trivial, because $K$ may have several connected components, being a (semi-)direct product of its neutral component $K\_0$ with a finite group. If $K\_0$ is abelian (a torus), then we are led back to the finite-case result.


So let me assume that $K=K\_0$, that is $K$ is connected. Is it possible that the probability that two elements commutte be non-trivial, namely $0<p<1$ ?



Probability of commutation in a compact group
Edit: let me reformulate my answer since I apparently didn't answer the right question.


(a) if $K$ is a compact Lie group, the commuting probability is positive iff $K\_0$ is abelian. As you noticed, $\Leftarrow$ is trivial.


Conversely, assume that $K\_0$ is not abelian. We can view $K$ as Zariski-closed in matrix group, all its (Lie) components are also Zariski-closed, and are the irreducible components. Hence, if by contradiction the set of commuting pairs has positive measure (or equivalently has nonempty interior, or equivalently has dimension $2\dim K$), then it contains a product of two cosets: $aK\_0\times bK\_0$ for some $a,b\in K$. So $agbh=bhag$ for all $g,h\in K\_0$.


Putting $g,h=1$, we get $ab=ba$. Putting $h=1$, we get $agb=bag=1$ for all $h$ which using $ab=ba$ yields $gb=bg$ for all $g\in K\_0$. Putting $g=1$, we get $abh=bha$ for all $h$, which using $ab=ba$ yields $ah=ha$ for all $h\in K\_0$. Thus $a,b$ commute and centralize $K\_0$. So the formula simplifies as $hg=gh$ for all $g,h\in K\_0$.


(b) let $K$ be a compact connected group with positive commuting probability. The property passes to Lie quotients of $K$, which are therefore abelian (the argument in the connected Lie case is contained in the above: the set of commuting pairs is a proper subset). Since $K$ is projective limit of its Lie quotients, it follows that $K$ is abelian.


If $K/K\_0$ is finite, we reach the conclusion that $K\_0$ is abelian.


