# Haar measure

In mathematical analysis, the Haar measure assigns an "invariant volume" to subsets of locally compact topological groups, consequently defining an integral for functions on those groups.
This measure was introduced by Alfréd Haar in 1933, though its special case for Lie groups had been introduced by Adolf Hurwitz in 1897 under the name "invariant integral". Haar measures are used in many parts of analysis, number theory, group theory, representation theory, statistics, probability theory, and ergodic theory.

## Preliminaries

Let $(G,\cdot )$ be a locally compact Hausdorff topological group. The $\sigma$-algebra generated by all open subsets of $G$ is called the Borel algebra. An element of the Borel algebra is called a Borel set. If $g$ is an element of $G$ and $S$ is a subset of $G$, then we define the left and right translates of $S$ by g as follows:
* Left translate: $gS=\{g\cdot s\,:\,s\in S\}.$
* Right translate: $Sg=\{s\cdot g\,:\,s\in S\}.$
Left and right translates map Borel sets onto Borel sets.
A measure $\mu$ on the Borel subsets of $G$ is called left-translation-invariant if for all Borel subsets $S\subseteq G$ and all $g\in G$ one has
    $\mu (gS)=\mu (S).$
A measure $\mu$ on the Borel subsets of $G$ is called right-translation-invariant if for all Borel subsets $S\subseteq G$ and all $g\in G$ one has
    $\mu (Sg)=\mu (S).$

## Haar's theorem

There is, up to a positive multiplicative constant, a unique countably additive, nontrivial measure $\mu$ on the Borel subsets of $G$ satisfying the following properties:
* The measure $\mu$ is left-translation-invariant: $\mu (gS)=\mu (S)$ for every $g\in G$ and all Borel sets $S\subseteq G$.
* The measure $\mu$ is finite on every compact set: $\mu (K)<\infty$ for all compact $K\subseteq G$.
* The measure $\mu$ is outer regular on Borel sets $S\subseteq G$: $\mu (S)=\inf\{\mu (U):S\subseteq U,U{\text{ open}}\}.$
* The measure $\mu$ is inner regular on open sets $U\subseteq G$: $\mu (U)=\sup\{\mu (K):K\subseteq U,K{\text{ compact}}\}.$
Such a measure on $G$ is called a left Haar measure. It can be shown as a consequence of the above properties that $\mu (U)>0$ for every non-empty open subset $U\subseteq G$. In particular, if $G$ is compact then $\mu (G)$ is finite and positive, so we can uniquely specify a left Haar measure on $G$ by adding the normalization condition $\mu (G)=1$.
In complete analogy, one can also prove the existence and uniqueness of a right Haar measure on $G$. The two measures need not coincide.
Some authors define a Haar measure on Baire sets rather than Borel sets. This makes the regularity conditions unnecessary as Baire measures are automatically regular. Halmos uses the nonstandard term "Borel set" for elements of the $\sigma$-ring generated by compact sets, and defines Haar measures on these sets.
The left Haar measure satisfies the inner regularity condition for all $\sigma$-finite Borel sets, but may not be inner regular for all Borel sets. For example, the product of the unit circle (with its usual topology) and the real line with the discrete topology is a locally compact group with the product topology and a Haar measure on this group is not inner regular for the closed subset $\{1\}\times [0,1]$. (Compact subsets of this vertical segment are finite sets and points have measure $0$, so the measure of any compact subset of this vertical segment is $0$. But, using outer regularity, one can show the segment has infinite measure.)
The existence and uniqueness (up to scaling) of a left Haar measure was first proven in full generality by André Weil. Weil's proof used the axiom of choice and Henri Cartan furnished a proof that avoided its use. Cartan's proof also establishes the existence and the uniqueness simultaneously. A simplified and complete account of Cartan's argument was given by Alfsen in 1963. The special case of invariant measure for second-countable locally compact groups had been shown by Haar in 1933.

## Examples

* If $G$ is a discrete group, then the compact subsets coincide with the finite subsets, and a (left and right invariant) Haar measure on $G$ is the counting measure.
* The Haar measure on the topological group $(\mathbb {R} ,+)$ that takes the value $1$ on the interval $[0,1]$ is equal to the restriction of Lebesgue measure to the Borel subsets of $\mathbb {R}$. This can be generalized to $(\mathbb {R} ^{n},+).$
* In order to define a Haar measure $\mu$ on the circle group $\mathbb {T}$, consider the function $f$ from $[0,2\pi ]$ onto $\mathbb {T}$ defined by $f(t)=(\cos(t),\sin(t))$. Then $\mu$ can be defined by $\mu (S)={\frac {1}{2\pi }}m(f^{-1}(S)),$ where $m$ is the Lebesgue measure on $[0,2\pi ]$. The factor $(2\pi )^{-1}$ is chosen so that $\mu (\mathbb {T} )=1$.
* If $G$ is the group of positive real numbers under multiplication then a Haar measure $\mu$ is given by $\mu (S)=\int _{S}{\frac {1}{t}}\,dt$ for any Borel subset $S$ of positive real numbers. For example, if $S$ is taken to be an interval $[a,b]$, then we find $\mu (S)=\log(b/a)$. Now we let the multiplicative group act on this interval by a multiplication of all its elements by a number $g$, resulting in $gS$ being the interval $[g\cdot a,g\cdot b].$ Measuring this new interval, we find $\mu (gS)=\log((g\cdot b)/(g\cdot a))=\log(b/a)=\mu (S).$
* If $G$ is the group of nonzero real numbers with multiplication as operation, then a Haar measure $\mu$ is given by $\mu (S)=\int _{S}{\frac {1}{|t|}}\,dt$ for any Borel subset $S$ of the nonzero reals.
* For the general linear group $G=GL(n,\mathbb {R} )$, any left Haar measure is a right Haar measure and one such measure $\mu$ is given by $\mu (S)=\int _{S}{1 \over |\det(X)|^{n}}\,dX$ where $dX$ denotes the Lebesgue measure on $\mathbb {R} ^{n^{2}}$ identified with the set of all $n\times n$-matrices. This follows from the change of variables formula.
* Generalizing the previous three examples, if the group $G$ is represented as an open submanifold of $\mathbb {R} ^{n}$ with smooth group operations, then a left Haar measure on $G$ is given by ${\frac {1}{|J_{(x\cdot )}(e_{1})|}}d^{n}x$, where $e_{1}$ is the group identity element of $G$, $J_{(x\cdot )}(e_{1})$ is the Jacobian determinant of left multiplication by $x$ at $e_{1}$, and $d^{n}x$ is the Lebesgue measure on $\mathbb {R} ^{n}$. This follows from the change of variables formula. A right Haar measure is given in the same way, except with $J_{(\cdot x)}(e_{1})$ being the Jacobian of right multiplication by $x$.
* For the orthogonal group $G=O(n)$, its Haar measure can be constructed as follows (as the distribution of a random variable). First sample $A\sim N(0,1)^{n\times n}$, that is, a matrix with all entries being IID samples of the normal distribution with mean zero and variance one. Next use Gram–Schmidt process on the matrix; the resulting random variable takes values in $O(n)$ and it is distributed according to the probability Haar measure on that group. Since the special orthogonal group $SO(n)$ is an open subgroup of $O(n)$ the restriction of Haar measure of $O(n)$ to $SO(n)$ gives a Haar measure on $SO(n)$ (in random variable terms this means conditioning the determinant to be 1, an event of probability 1/2).
* The same method as for $O(n)$ can be used to construct the Haar measure on the unitary group $U(n)$. For the special unitary group $G=SU(n)$ (which has measure 0 in $U(n)$), its Haar measure can be constructed as follows. First sample $A$ from the Haar measure (normalized to one, so that it's a probability distribution) on $U(n)$, and let $e^{i\theta }=\det A$, where $\theta$ may be any one of the angles, then independently sample $k$ from the uniform distribution on $\{1,...,n\}$. Then $e^{-i{\frac {\theta +2\pi k}{n}}}A$ is distributed as the Haar measure on $SU(n)$.
* Let $G$ be the set of all affine linear transformations $A:\mathbb {R} \to \mathbb {R}$ of the form $r\mapsto xr+y$ for some fixed $x,y\in \mathbb {R}$ with $x>0.$ Associate with $G$ the operation of function composition $\circ$, which turns $G$ into a non-abelian group. $G$ can be identified with the right half plane $(0,\infty )\times \mathbb {R} =\left\{(x,y)~:~x,y\in \mathbb {R} ,x>0\right\}$ under which the group operation becomes $(s,t)\circ (u,v)=(su,sv+t).$ A left-invariant Haar measure $\mu _{L}$ (respectively, a right-invariant Haar measure $\mu _{R}$) on $G=(0,\infty )\times \mathbb {R}$ is given by $\mu _{L}(S)=\int _{S}{\frac {1}{x^{2}}}\,dx\,dy$ and $\mu _{R}(S)=\int _{S}{\frac {1}{x}}\,dx\,dy$ for any Borel subset $S$ of $G=(0,\infty )\times \mathbb {R} .$ This is because if $S\subseteq (0,\infty )\times \mathbb {R}$ is an open subset then for $(s,t)\in G$ fixed, integration by substitution gives $\mu _{L}((s,t)\circ S)=\int _{(s,t)\circ S}{\frac {1}{x^{2}}}\,dx\,dy=\int _{S}{\frac {1}{(su)^{2}}}|(s)(s)-(0)(0)|\,du\,dv=\mu _{L}(S)$ while for $(u,v)\in G$ fixed, $\mu _{R}(S\circ (u,v))=\int _{S\circ (u,v)}{\frac {1}{x}}\,dx\,dy=\int _{S}{\frac {1}{su}}|(u)(1)-(v)(0)|\,ds\,dt=\mu _{R}(S).$
* On any Lie group of dimension $d$ a left Haar measure can be associated with any non-zero left-invariant $d$-form $\omega$, as the Lebesgue measure $|\omega |$; and similarly for right Haar measures. This means also that the modular function can be computed, as the absolute value of the determinant of the adjoint representation.
* Shaded area is one square unit. A representation of the Haar measure of positive real numbers in terms of area under the positive branch of the standard hyperbola xy = 1 uses Borel sets generated by intervals [a,b], b > a > 0. For example, a = 1 and b = Euler’s number e yields and area equal to log (e/1) = 1. Then for any positive real number c the area over the interval [ca, cb] equals log (b/a) so the area in invariant under multiplication by positive real numbers. Note that the area approaches infinity both as a approaches zero and b gets large. Use of this Haar measure to define a logarithm function anchors a at 1 and considers area over an interval in [b,1], with 0 < b < 1, as negative area. In this way the logarithm can take any real value even though measure is always positive or zero.
* If $G$ is the group of non-zero quaternions, then $G$ can be seen as an open subset of $\mathbb {R} ^{4}$. A Haar measure $\mu$ is given by $\mu (S)=\int _{S}{\frac {1}{(x^{2}+y^{2}+z^{2}+w^{2})^{2}}}\,dx\,dy\,dz\,dw$ where $dx\wedge dy\wedge dz\wedge dw$ denotes the Lebesgue measure in $\mathbb {R} ^{4}$ and $S$ is a Borel subset of $G$.
* If $G$ is the additive group of $p$-adic numbers for a prime $p$, then a Haar measure is given by letting $a+p^{n}O$ have measure $p^{-n}$, where $O$ is the ring of $p$-adic integers.

## Construction of Haar measure
### A construction using compact subsets

The following method of constructing Haar measure is essentially the method used by Haar and Weil.
For any subsets $S,T\subseteq G$ with $S$ nonempty define $[T:S]$ to be the smallest number of left translates of $S$ that cover $T$ (so this is a non-negative integer or infinity). This is not additive on compact sets $K\subseteq G$, though it does have the property that $[K:U]+[L:U]=[K\cup L:U]$ for disjoint compact sets $K,L\subseteq G$ provided that $U$ is a sufficiently small open neighborhood of the identity (depending on $K$ and $L$). The idea of Haar measure is to take a sort of limit of $[K:U]$ as $U$ becomes smaller to make it additive on all pairs of disjoint compact sets, though it first has to be normalized so that the limit is not just infinity. So fix a compact set $A$ with non-empty interior (which exists as the group is locally compact) and for a compact set $K$ define
    $\mu _{A}(K)=\lim _{U}{\frac {[K:U]}{[A:U]}}$
where the limit is taken over a suitable directed set of open neighborhoods of the identity eventually contained in any given neighborhood; the existence of a directed set such that the limit exists follows using Tychonoff's theorem.
The function $\mu _{A}$ is additive on disjoint compact subsets of $G$, which implies that it is a regular content. From a regular content one can construct a measure by first extending $\mu _{A}$ to open sets by inner regularity, then to all sets by outer regularity, and then restricting it to Borel sets. (Even for open sets $U$, the corresponding measure $\mu _{A}(U)$ need not be given by the lim sup formula above. The problem is that the function given by the lim sup formula is not countably subadditive in general and in particular is infinite on any set without compact closure, so is not an outer measure.)

### A construction using compactly supported functions

Cartan introduced another way of constructing Haar measure as a Radon measure (a positive linear functional on compactly supported continuous functions), which is similar to the construction above except that $A$, $K$, and $U$ are positive continuous functions of compact support rather than subsets of $G$. In this case we define $[K:U]$ to be the infimum of numbers $c_{1}+\cdots +c_{n}$ such that $K(g)$ is less than the linear combination $c_{1}U(g_{1}g)+\cdots +c_{n}U(g_{n}g)$ of left translates of $U$ for some $g_{1},\ldots ,g_{n}\in G$. As before we define
    $\mu _{A}(K)=\lim _{U}{\frac {[K:U]}{[A:U]}}$.
The fact that the limit exists takes some effort to prove, though the advantage of doing this is that the proof avoids the use of the axiom of choice and also gives uniqueness of Haar measure as a by-product. The functional $\mu _{A}$ extends to a positive linear functional on compactly supported continuous functions and so gives a Haar measure. (Note that even though the limit is linear in $K$, the individual terms $[K:U]$ are not usually linear in $K$.)

### A construction using mean values of functions

Von Neumann gave a method of constructing Haar measure using mean values of functions, though it only works for compact groups. The idea is that given a function $f$ on a compact group, one can find a convex combination ∑a$_i$f(g$_i$g){\textstyle \sum a_{i}f(g_{i}g)} (where ∑a$_i$=1{\textstyle \sum a_{i}=1}) of its left translates that differs from a constant function by at most some small number $\epsilon$. Then one shows that as $\epsilon$ tends to zero the values of these constant functions tend to a limit, which is called the mean value (or integral) of the function $f$.
For groups that are locally compact but not compact this construction does not give Haar measure as the mean value of compactly supported functions is zero. However something like this does work for almost periodic functions on the group which do have a mean value, though this is not given with respect to Haar measure.

### A construction on Lie groups

On an n-dimensional Lie group, Haar measure can be constructed easily as the measure induced by a left-invariant n-form. This was known before Haar's theorem.

## The right Haar measure

It can also be proved that there exists a unique (up to multiplication by a positive constant) right-translation-invariant Borel measure $\nu$ satisfying the above regularity conditions and being finite on compact sets, but it need not coincide with the left-translation-invariant measure $\mu$. The left and right Haar measures are the same only for so-called unimodular groups (see below). It is quite simple, though, to find a relationship between $\mu$ and $\nu$.
Indeed, for a Borel set $S$, let us denote by $S^{-1}$ the set of inverses of elements of $S$. If we define
    $\mu _{-1}(S)=\mu (S^{-1})\quad$
then this is a right Haar measure. To show right invariance, apply the definition:
    $\mu _{-1}(Sg)=\mu ((Sg)^{-1})=\mu (g^{-1}S^{-1})=\mu (S^{-1})=\mu _{-1}(S).\quad$
Because the right measure is unique, it follows that $\mu _{-1}$ is a multiple of $\nu$ and so
    $\mu (S^{-1})=k\nu (S)\,$
for all Borel sets $S$, where $k$ is some positive constant.

### The modular function

The left translate of a right Haar measure is a right Haar measure. More precisely, if $\nu$ is a right Haar measure, then for any fixed choice of a group element g,
    $S\mapsto \nu (g^{-1}S)\quad$
is also right invariant. Thus, by uniqueness up to a constant scaling factor of the Haar measure, there exists a function $\Delta$ from the group to the positive reals, called the Haar modulus, modular function or modular character, such that for every Borel set $S$
    $\nu (g^{-1}S)=\Delta (g)\nu (S).\quad$
Since right Haar measure is well-defined up to a positive scaling factor, this equation shows the modular function is independent of the choice of right Haar measure in the above equation.
The modular function is a continuous group homomorphism from G to the multiplicative group of positive real numbers. A group is called unimodular if the modular function is identically $1$, or, equivalently, if the Haar measure is both left and right invariant. Examples of unimodular groups are abelian groups, compact groups, discrete groups (e.g., finite groups), semisimple Lie groups and connected nilpotent Lie groups. An example of a non-unimodular group is the group of affine transformations
    ${\big \x\mapsto ax+b:a\in \mathbb {R} \setminus \{0\},b\in \mathbb {R} {\big \}}=\left\{{\begin{bmatrix}a&b\\0&1\end{bmatrix}}\right\}$
on the real line. This example shows that a solvable Lie group need not be unimodular. In this group a left Haar measure is given by ${\frac {1}{a^{2}}}da\wedge db$, and a right Haar measure by ${\frac {1}{|a|}}da\wedge db$.

## Measures on homogeneous spaces

If the locally compact group $G$ acts transitively on a homogeneous space $G/H$, one can ask if this space has an invariant measure, or more generally a semi-invariant measure with the property that $\mu (gS)=\chi (g)\mu (S)$ for some character $\chi$ of $G$. A necessary and sufficient condition for the existence of such a measure is that the restriction $\chi |_{H}$ is equal to $\Delta |_{H}/\delta$, where $\Delta$ and $\delta$ are the modular functions of $G$ and $H$ respectively. In particular an invariant measure on $G/H$ exists if and only if the modular function $\Delta$ of $G$ restricted to $H$ is the modular function $\delta$ of $H$.

### Example

If $G$ is the group $SL_{2}(\mathbb {R} )$ and $H$ is the subgroup of upper triangular matrices, then the modular function of $H$ is nontrivial but the modular function of $G$ is trivial. The quotient of these cannot be extended to any character of $G$, so the quotient space $G/H$ (which can be thought of as 1-dimensional real projective space) does not have even a semi-invariant measure.

## Haar integral

Using the general theory of Lebesgue integration, one can then define an integral for all Borel measurable functions $f$ on $G$. This integral is called the Haar integral and is denoted as:
    $\int f(x)\,d\mu (x)$
where $\mu$ is the Haar measure.
One property of a left Haar measure $\mu$ is that, letting $s$ be an element of $G$, the following is valid:
    $\int _{G}f(sx)\ d\mu (x)=\int _{G}f(x)\ d\mu (x)$
for any Haar integrable function $f$ on $G$. This is immediate for indicator functions:
    $\int {\mathit {1}}_{A}(tg)\,d\mu =\int {\mathit {1}}_{t^{-1}A}(g)\,d\mu =\mu (t^{-1}A)=\mu (A)=\int {\mathit {1}}_{A}(g)\,d\mu ,$
which is essentially the definition of left invariance.

## Uses

In the same issue of Annals of Mathematics and immediately after Haar's paper, the Haar theorem was used to solve Hilbert's fifth problem restricted to compact groups by John von Neumann.
Unless $G$ is a discrete group, it is impossible to define a countably additive left-invariant regular measure on all subsets of $G$, assuming the axiom of choice, according to the theory of non-measurable sets.

### Abstract harmonic analysis

The Haar measures are used in harmonic analysis on locally compact groups, particularly in the theory of Pontryagin duality. To prove the existence of a Haar measure on a locally compact group $G$ it suffices to exhibit a left-invariant Radon measure on $G$.

### Mathematical statistics

In mathematical statistics, Haar measures are used for prior measures, which are prior probabilities for compact groups of transformations. These prior measures are used to construct admissible procedures, by appeal to the characterization of admissible procedures as Bayesian procedures (or limits of Bayesian procedures) by Wald. For example, a right Haar measure for a family of distributions with a location parameter results in the Pitman estimator, which is best equivariant. When left and right Haar measures differ, the right measure is usually preferred as a prior distribution. For the group of affine transformations on the parameter space of the normal distribution, the right Haar measure is the Jeffreys prior measure. Unfortunately, even right Haar measures sometimes result in useless priors, which cannot be recommended for practical use, like other methods of constructing prior measures that avoid subjective information.
Another use of Haar measure in statistics is in conditional inference, in which the sampling distribution of a statistic is conditioned on another statistic of the data. In invariant-theoretic conditional inference, the sampling distribution is conditioned on an invariant of the group of transformations (with respect to which the Haar measure is defined). The result of conditioning sometimes depends on the order in which invariants are used and on the choice of a maximal invariant, so that by itself a statistical principle of invariance fails to select any unique best conditional statistic (if any exist); at least another principle is needed.
For non-compact groups, statisticians have extended Haar-measure results using amenable groups.

## Weil's converse theorem

In 1936, André Weil proved a converse (of sorts) to Haar's theorem, by showing that if a group has a left invariant measure with a certain separating property, then one can define a topology on the group, and the completion of the group is locally compact and the given measure is essentially the same as the Haar measure on this completion.