The harmonic mean (H) of n numbers ( x_{1}, x_{2}, x_{3}, ... , x_{n} ), also called subcontrary mean, is given by the formula below.

If n is the number of numbers, it is found by dividing the number of numbers by the reciprocal of each number.

Suppose there are two numbers x

H =

2
1/x_{1} + 1/x_{2}

Suppose there are 3 numbers x

H =

3
1/x_{1} + 1/x_{2} + 1/x_{3}

**Example #1:**Find the harmonic mean of 3 and 4

H =

2
1/3 + 1/4

H =

2
4/12 + 3/12

H =

2
7/12

H =

2 × 12
7

H =

24
7

= 3.4285
**Example #2:**Find the harmonic mean of 1, 2, 4, and 10

H =

4
1/1 + 1/2 + 1/4 + 1/10

H =

4
20/20 + 10/20 + 5/20 + 2/20

H =

4
37/20

H =

4 × 20
37

H =

80
37

= 2.1621
A car travels with a speed of 40 miles per hour for the first half of the way. Then, the car travels with a speed of 60 miles per hour for the second half of the way. What is the average speed?

Average speed =

total distance
total time

First notice that it is not possible to use directly the speed formula since we do not know for how long the car kept driving with a speed of 40 m/h and then 60 m/h. However, with some manipulation, we can still tackle the problem.

Let d be the first half of the total distance.

t_{1} =

d
40

Let t

Let d be the second half of the total distance.

t_{2} =

d
60

Total time = t

Total distance = d + d = 2d

Now replace these in the formula

Average speed =

total distance
total time

Average speed =

2d
d/40 + d/60

Average speed =

2d
d(1/40 + 1/60)

Cancel d and the average speed =

2
(1/40 + 1/60)

Now, you can see that it looks like we are calculating the harmonic mean for 2 numbers by using the formula above.

H = average speed =

2
(3/120 + 2/120)

H = average speed =

2
(5/120)

H = average speed =

2 × 120
5

H = average speed =

240
5

= 48 miles per hour
This is going to challenge you a bit. However, do not give up. Keep reading and you will get it! Furthermore, make sure you perfectly understand fractions before reading this section of the lesson.

**Here is our strategy:**

**Step 1.** Express the harmonic mean of two or three numbers in a different way.

**Step 2.** Examine carefully step 1 by looking for patterns and make a generalization using the summation symbols and the product symbols.

**Rewriting the harmonic mean of two numbers**

$$ H = \frac{2}{ \frac{1}{x_1} + \frac{1}{x_2} } $$

$$ H = \frac{2}{ \frac{x_2 + x_1}{x_1 \times x_2} } $$

$$ H = \frac{2 \times x_1x_2 }{ x_2 + x_1 } $$

$$ H = \frac{2 \times x_1x_2 }{ \frac{x_1x_2}{x_1} + \frac{x_1x_2}{x_2} } $$

At this point, notice that we rewrote the denominator x_{2} + x_{1}. Why did we do that? We did this because we want the x_{1}x_{2} to appear in three different places (once on top and twice at the bottom)

This will help us to factor the bottom part of the complex fraction as you can see below.

$$ H = \frac{2 \times x_1x_2 }{ x_1x_2(\frac{1}{x_1} + \frac{1}{x_2}) } $$

**Rewriting the harmonic mean of three numbers**

$$ H = \frac{3}{ \frac{1}{x_1} + \frac{1}{x_2} + \frac{1}{x_3} } $$

$$ H = \frac{3}{ \frac{x_2x_3 + x_1x_3 + x_1x_2}{x_1 \times x_2 \times x_3} } $$

$$ H = \frac{3 \times x_1x_2x_3 }{ x_2x_3 + x_1x_3 + x_1x_2 } $$

$$ H = \frac{3 \times x_1x_2x_3 }{ \frac{x_1x_2x_3}{x_1} + \frac{x_1x_2x_3}{x_2} + \frac{x_1x_2x_3}{x_3} } $$

Notice again that we rewrote the denominator x_{2}x_{3} + x_{1}x_{3} + x_{1}x_{2}. Why did we do that? We did this because we want the x_{1}x_{2}x_{3} to appear in four different places (once on top and three times at the bottom)

Again, this will help us to factor the bottom part of the complex fraction as you can see below.

$$ H = \frac{3 \times x_1x_2x_3 }{ x_1x_2x_3(\frac{1}{x_1} + \frac{1}{x_2} + \frac{1}{x_3}) } $$

**Summary**

For 2 or 3 numbers, here is what we have so far!

$$ H = \frac{2 \times x_1x_2 }{ x_1x_2(\frac{1}{x_1} + \frac{1}{x_2}) } $$

$$ H = \frac{3 \times x_1x_2x_3 }{ x_1x_2x_3(\frac{1}{x_1} + \frac{1}{x_2} + \frac{1}{x_3}) } $$

For n numbers, here is what we will have then!

$$ H = \frac{n \times x_1x_2x_3 ... x_n }{ x_1x_2x_3 ... x_n(\frac{1}{x_1} + \frac{1}{x_2} + \frac{1}{x_3} +... + \frac{1}{x_n}) } $$

For n numbers, we can make the formula look a little better or more generalized by using the summation symbol and the product symbol mentioned earlier. Using the product symbol, we get:

$$ H = \frac{n \times \prod_{j=1}^n x_j }{ \prod_{j=1}^n x_j(\frac{1}{x_1} + \frac{1}{x_2} + \frac{1}{x_3} +... + \frac{1}{x_n}) } $$

And using also the summation symbol, we get:

$$ H = \frac{n \times \prod_{j=1}^n x_j }{ \prod_{j=1}^n x_j(\sum_{i=1}^n \frac{1}{x_i}) } $$

$$ H = \frac{n \times \prod_{j=1}^n x_j }{ (\sum_{i=1}^n \frac{\prod_{j=1}^n x_j}{x_i}) } $$

See an example of harmonic mean related to the stock market.