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".^{[1]}^{[2]} Haar measures are used in many parts of analysis, number theory, group theory, representation theory, statistics, probability theory, and ergodic theory.

Let be a locally compact Hausdorff topological group. The -algebra generated by all open subsets of is called the Borel algebra. An element of the Borel algebra is called a Borel set. If is an element of and is a subset of , then we define the left and right translates of by *g* as follows:

- Left translate:
- Right translate:

Left and right translates map Borel sets onto Borel sets.

A measure on the Borel subsets of is called *left-translation-invariant* if for all Borel subsets and all one has

A measure on the Borel subsets of is called *right-translation-invariant* if for all Borel subsets and all one has

There is, up to a positive multiplicative constant, a unique countably additive, nontrivial measure on the Borel subsets of satisfying the following properties:

- The measure is left-translation-invariant: for every and all Borel sets .
- The measure is finite on every compact set: for all compact .
- The measure is outer regular on Borel sets :
- The measure is inner regular on open sets :

Such a measure on is called a *left Haar measure.* It can be shown as a consequence of the above properties that for every non-empty open subset . In particular, if is compact then is finite and positive, so we can uniquely specify a left Haar measure on by adding the normalization condition .

In complete analogy, one can also prove the existence and uniqueness of a *right Haar measure* on . 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^{[3]} rather confusingly uses the term "Borel set" for elements of the -ring generated by compact sets, and defines Haar measures on these sets.

The left Haar measure satisfies the inner regularity condition for all -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 . (Compact subsets of this vertical segment are finite sets and points have measure , so the measure of any compact subset of this vertical segment is . 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.^{[4]} Weil's proof used the axiom of choice and Henri Cartan furnished a proof that avoided its use.^{[5]} 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.^{[6]} The special case of invariant measure for second-countable locally compact groups had been shown by Haar in 1933.^{[1]}

- If is a discrete group, then the compact subsets coincide with the finite subsets, and a (left and right invariant) Haar measure on is the counting measure.
- The Haar measure on the topological group that takes the value on the interval is equal to the restriction of Lebesgue measure to the Borel subsets of . This can be generalized to
- In order to define a Haar measure on the circle group , consider the function from onto defined by . Then can be defined by
where is the Lebesgue measure on . The factor is chosen so that .
- If is the group of positive real numbers under multiplication then a Haar measure is given by
for any Borel subset of positive real numbers. For example, if is taken to be an interval , then we find . Now we let the multiplicative group act on this interval by a multiplication of all its elements by a number , resulting in being the interval Measuring this new interval, we find
- If is the group of nonzero real numbers with multiplication as operation, then a Haar measure is given by
for any Borel subset of the nonzero reals.
- For the general linear group , any left Haar measure is a right Haar measure and one such measure is given by
where denotes the Lebesgue measure on identified with the set of all -matrices. This follows from the change of variables formula.
- Generalizing the previous three examples, if the group is represented as an open submanifold of with smooth group operations, then a left Haar measure on is given by , where is the group identity element of , is the Jacobian determinant of left multiplication by at , and is the Lebesgue measure on . This follows from the change of variables formula. A right Haar measure is given in the same way, except with being the Jacobian of right multiplication by .
- For the orthogonal group , its Haar measure can be constructed as follows (as the distribution of a random variable). First sample , 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 and it is distributed according to the probability Haar measure on that group.
^{[7]}Since the special orthogonal group is an open subgroup of the restriction of Haar measure of to gives a Haar measure on (in random variable terms this means conditioning the determinant to be 1, an event of probability 1/2). - The same method as for can be used to construct the Haar measure on the unitary group . For the special unitary group (which has measure 0 in ), its Haar measure can be constructed as follows. First sample from the Haar measure (normalized to one, so that it's a probability distribution) on , and let , where may be any one of the angles, then independently sample from the uniform distribution on . Then is distributed as the Haar measure on .
- Let be the set of all affine linear transformations of the form for some fixed with Associate with the operation of function composition , which turns into a non-abelian group. can be identified with the right half plane under which the group operation becomes A left-invariant Haar measure (respectively, a right-invariant Haar measure ) on is given by
andfor any Borel subset of This is because if is an open subset then for fixed, integration by substitution giveswhile for fixed,
- On any Lie group of dimension a left Haar measure can be associated with any non-zero left-invariant -form , as the
*Lebesgue measure*; 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. - The unit hyperbola can be taken as a group under multiplication defined as with split-complex numbers The usual area measure in the crescent serves to define hyperbolic angle as the area of its hyperbolic sector. The Haar measure of the unit hyperbola is generated by the hyperbolic angle of segments on the hyperbola. For instance, a measure of one unit is given by the segment running from (1,1) to (e,1/e), where e is Euler's number. Hyperbolic angle has been exploited in mathematical physics with rapidity standing in for classical velocity.
- If is the group of non-zero quaternions, then can be seen as an open subset of . A Haar measure is given by
where denotes the Lebesgue measure in and is a Borel subset of .
- If is the additive group of -adic numbers for a prime , then a Haar measure is given by letting have measure , where is the ring of -adic integers.

The following method of constructing Haar measure is essentially the method used by Haar and Weil.

For any subsets with nonempty define to be the smallest number of left translates of that cover (so this is a non-negative integer or infinity). This is not additive on compact sets , though it does have the property that for disjoint compact sets provided that is a sufficiently small open neighborhood of the identity (depending on and ). The idea of Haar measure is to take a sort of limit of as 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 with non-empty interior (which exists as the group is locally compact) and for a compact set define

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 is additive on disjoint compact subsets of , which implies that it is a regular content. From a regular content one can construct a measure by first extending to open sets by inner regularity, then to all sets by outer regularity, and then restricting it to Borel sets. (Even for open sets , the corresponding measure 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.)

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 , , and are positive continuous functions of compact support rather than subsets of . In this case we define to be the infimum of numbers such that is less than the linear combination of left translates of for some . As before we define

- .

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 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 , the individual terms are not usually linear in .)

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 on a compact group, one can find a convex combination (where ) of its left translates that differs from a constant function by at most some small number . Then one shows that as tends to zero the values of these constant functions tend to a limit, which is called the mean value (or integral) of the function .

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.

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.

It can also be proved that there exists a unique (up to multiplication by a positive constant) right-translation-invariant Borel measure satisfying the above regularity conditions and being finite on compact sets, but it need not coincide with the left-translation-invariant measure . 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 and .

Indeed, for a Borel set , let us denote by the set of inverses of elements of . If we define

then this is a right Haar measure. To show right invariance, apply the definition:

Because the right measure is unique, it follows that is a multiple of and so

for all Borel sets , where is some positive constant.

The *left* translate of a right Haar measure is a right Haar measure. More precisely, if is a right Haar measure, then for any fixed choice of a group element *g*,

is also right invariant. Thus, by uniqueness up to a constant scaling factor of the Haar measure, there exists a function from the group to the positive reals, called the **Haar modulus**, **modular function** or **modular character**, such that for every Borel set

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 , 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.^{[citation needed]} An example of a non-unimodular group is the group of affine transformations

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 , and a right Haar measure by .

If the locally compact group acts transitively on a homogeneous space , one can ask if this space has an invariant measure, or more generally a semi-invariant measure with the property that for some character of . A necessary and sufficient condition for the existence of such a measure is that the restriction is equal to , where and are the modular functions of and respectively.^{[8]}
In particular an invariant measure on exists if and only if the modular function of restricted to is the modular function of .

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

Using the general theory of Lebesgue integration, one can then define an integral for all Borel measurable functions on . This integral is called the **Haar integral** and is denoted as:

where is the Haar measure.

One property of a left Haar measure is that, letting be an element of , the following is valid:

for any Haar integrable function on . This is immediate for indicator functions:

which is essentially the definition of left invariance.

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.^{[9]}

Unless is a discrete group, it is impossible to define a countably additive left-invariant regular measure on *all* subsets of , assuming the axiom of choice, according to the theory of non-measurable sets.

The Haar measures are used in harmonic analysis on locally compact groups, particularly in the theory of Pontryagin duality.^{[10]}^{[11]}^{[12]} To prove the existence of a Haar measure on a locally compact group it suffices to exhibit a left-invariant Radon measure on .

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.^{[13]} 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.^{[14]}

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.^{[15]}

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,^{[3]} 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.