Ratio math

From Xenharmonic Wiki
Jump to navigation Jump to search

This page describes the way we manipulate ratios arithmetically. Some of it is just math, and some of it is specific to music.

I am not trying to format this particularly nicely, since a lot of these kinds of discussions come up on Facebook and similar places, and you may as well see it ugly here so you understand it when it's ugly there.

About ratios

Ratios are just one way of writing various kinds of numbers.

1/1, 2/1, 3/1, 4/1, 5/1, and so on are the same as 1, 2, 3, 4, 5, and so on. Put differently, when there is no bottom number (denominator), it is as if there was a denominator equal to 1.

Ratios can be reduced by dividing both top and bottom by the same numbers until you cannot reduce them anymore. So:

54/24 = 27 / 12 [dividing top and bottom by 2] = 9 / 4 [dividing top and bottom by 3]

… so 54/24 can be reduced to 9/4.

(You can do this faster if you get used to prime factorization:

54/24 = 3*3*3*2 / 3*2*2*2 = 3*3 / 2*2 [by dividing top and bottom by 3*2] = 9/4.)

All of these numbers mean the same thing: 2, 2/1, 4/2, 8/4, 16/8. The top (numerator) is double the bottom (denominator).

It is legitimate to write things like 2/1 = 2 or 54/24 = 9/4

Stacking ratios and finding their differences

When we "add intervals", or stack them, we're actually multiplying their ratios.

Multiplying ratios means multiplying the tops (numerators) and the bottoms (denominators).

(x/y) * (a/b) = xa / yb

So if we took a 5/4 major third and stacked a 6/5 minor third on top of it, the outer interval would be

(5/4) * (6/5) = 5*6 / 4*5 = 30 / 20 = 3/2.

3/2 is a perfect fifth, so that should make sense: The major third C-E with a minor third E-G stacked on top of it encompasses the perfect fifth C-G.


When we are finding the difference between intervals, we're actually dividing their ratios.

Remember that dividing by a ratio is the same as multiplying by its reciprocal (flip, then multiply).

(x/y) / (a/b) = (x/y) * (b/a) = xb / ya

When we take the difference between the perfect fifth, 3/2, and the major third, 5/4, we should get a minor third.

(3/2) / (5/4) = (3/2) * (4/5) = 12/10 = 6/5.

Octave reduction

Main article: Octave reduction

When a number is larger than the octave, which is 2/1 (or equivalently just "2"), we octave-reduce it by dividing by 2/1.

9/4 is greater than 8/4, so it is greater than 2.

To octave-reduce, divide by 2.

(9/4) / (2/1) = (9/4) * (1/2) = 9*1 / 4*2 = 9/8.


Let us do it again, using 8/3.

(8/3) / (2/1) = (8/3) * (1/2) = (8*1) / (2*3) = 8/6 = 4/3.

As you can see, you can divide the top number in half (8/3 goes to 4/3) or double the bottom number (9/4 goes to 9/8) to have the same effect and avoid the annoying arithmetic.


Same kind of thing when a number is smaller than 1: Multiply by 2 until you get somewhere between 1 (the root) and 2 (the octave).

2/3 is less than 1.

2/3 * 2/1 = 2*2 / 3*1 = 4/3.

As you can see, you could also just double the numerator (top).


Let us do it again, using 5/12.

5/12 * 2 = 10/12, which is still less than 1.

10/12 * 2 = 20/12, which is between 1 (12/12) and 2 (24/12).

Reduce 20/12 to get 5/3.

As you can see, you could just cut the denominator in half.


Whichever way you are going, keep going until the ratio is between 1 and 2.