# Harmonic mean

The harmonic mean (frequently abbreviated HM) is a special kind of mean (like arithmetic mean and geometric mean). The harmonic mean of a set of $n$ positive real numbers $x_1, x_2... x_n$ is defined to be: $\frac{n} {\frac{1}{x_1}+\frac{1}{x_2}+...+\frac{1}{x_n}}$.

The restriction to positive numbers is necessary to avoid division by zero. For instance, if we tried to take the harmonic mean of the set $\{-2, 3, 6\}$ we would be trying to calculate $\frac 3{\frac 13 + \frac 16 - \frac 12} = \frac 30$, which is obviously problematic.

The harmonic mean is a part of a frequently used inequality, the Arithmetic mean-Geometric mean-Harmonic mean inequality. The Inequality states that for a set of positive numbers $x_1, x_2,\ldots,x_n$: $\frac{x_1+x_2+\ldots+x_n}{n}\ge \sqrt[n]{x_1\cdot x_2 \cdots x_n}\ge \frac{n} {\frac{1}{x_1}+\frac{1}{x_2}+...+\frac{1}{x_n}}$

In the line of power of means, the harmonic mean is the mean of the -1 power.

Harmonic mean is commonly used to find the average of rates.