This page contains a sampling of the limericks from my textbook Algebra: For the Enthusiastic Beginner. There are more than 100 limericks the book! I’ll gradually add them to this page. I’ve included a little math lesson with each one here, so they’re educational in addition to being (hopefully) fun!

If you like these limericks, here’s another set you can have some fun with: physics limericks.

1. Pythagorean theorem

The Pythagorean theorem says that the sides of a right triangle satisfy a^2+b^2=c^2, where a and b are the legs, and c is the hypotenuse. Who knows how many other combinations Pythagoras tried before he found the right one!

Pythagoras wept and despaired
As he added the legs and compared. 
Then he jumped up with glee, 
“Though they don’t add to c,
It’s a match if the lengths are all squared!”

2. Exponents

When multiplying a number by itself many times, as with 2\cdot 2\cdot 2\cdot 2\cdot 2=32, a much quicker way to write the product is to use an exponent, as in 2^5=32. The 5 on the upper-right is the exponent, and it tells you how many copies of the given number (2 here) you’re multiplying together. For a number like 3^{1000}, it would take a looong time to write out all 1000 factors in 3\cdot 3\cdot 3\cdots. But it’s super quick to just write 3^{1000}. 

If a product takes hours to write,
And ends up a frightening sight,
Proceed by erasing
The factors, and placing
An exponent up on the right.

3. Product notation

There are many ways to write the product of a and b, for example: a\times b, or a\cdot b, or (a)(b), or ab. The last of these works with letters, but not numbers, because if you write the product of 5 and 7 as 57, any reasonable person will interpret this as the number 57 (fifty seven). But with letters, writing the product of a and b as ab is perfectly fine. And in fact it is encouraged, because it is the most concise of the above four forms. 

For products of letters, we’ve seen
A convention that’s really quite clean.
Of all the notations
For multiplications,
The best is: put nothing between!

4. Commutative law

The commutative law for addition says that a+b=b+a. That is, the order doesn’t matter. For example, both 7 + 4 and 4 + 7 are equal to 11. If you add 4 apples to 7 apples, you get 11. And if you add 7 apples to 4 apples, you also get 11.

The commutative law also holds for multiplication: a\cdot b=b\cdot a. Again the order doesn’t matter. For example, both 5\cdot 3 and 3\cdot 5 are equal to 15. If you have 5 groups of 3 apples, you have 15. And if you have 3 groups of 5 apples, you also have 15. Equivalently, when using the base-times-height formula for the area of a rectangle, it doesn’t matter which of the two side lengths you choose as the base (with the other one being the height).

However, not every operation is commutative. The order matters for subtraction: 7 – 4 = 3 is different from 4 – 7 = -3. And it also matters for division: 12/3 = 4 is different from 3/12 = 1/4. And there are plenty of other things in life where the order matters…

When putting on socks and your shoes,
The order you must wisely choose.
But for products (sums too), 
We don’t care what you do, 
Either ab, ba — you can’t lose!

5. Logs

An interpretation of the quotient 12/3 is: How many 3’s do you need to add together to make 12? That is, how many 3’s fit into 12 additively? The answer is 4, since 3 + 3 + 3 + 3 = 12.

Logs are similar, except that the addition in the above question is replaced with multiplication. So \log_2 8 is the answer to the question: How many 2’s do you need to multiply together to make 8? That is, how many 2’s fit into 8 multiplicatively? The answer is 3, since 2\cdot 2\cdot 2=8.

Similarly, \log_3 81=4, because you need to multiply four 3’s together to make 81. That is, 3\cdot 3\cdot 3\cdot 3=81. In contrast, 81/3=27, because you need to add 27 3’s together to make 81.

So if you ask, “How many 5’s fit into a number?” the question is ambiguous, because you need to say whether you mean additively or multiplicatively.

How many 2’s fit in 8?
The answer is up for debate.
If you want to keep score,
For addition, it’s four,
But when multiplied, three work just great!

6. Systems of equations (three types)

Consider the system of equations, 2x-y=3 and x+3y=5. There are many ways to solve this system (that is, find the values of x and y that make both equations be true). One method is to solve for x in terms of y in one equation, then plug the result into the other, then solve the resulting equation for y. Plugging this value of y back into either of the given equations yields x. (There are other variations on this strategy; see Limerick #21.) You can show that the solution is x=2 and y=1.

There is also a geometric method: Since the two given equations both represent lines, our task is to find where these lines intersect. The intersection point (x,y) then satisfies both equations. If you’re given two arbitrary lines, there are three basic possibilities for what they can look like:

  1. Consistent: The lines cross each other, which means there is one intersection point, and hence one solution. In this case, we say the two equations are consistent. The 2x-y=3 and x+3y=5 lines above fall into this category.
  2. Inconsistent: The lines are parallel, which means they never intersect, so there is no solution. In this case, we say the two equations are inconsistent. An example of this case is the two lines 5x+2y=3 and 5x+2y=7. These lines have the same slope, but different y intercepts, so they are parallel.
  3. Degenerate: The two lines are actually the same line (right on top of each other), which means every point on them is an “intersection” point, so there is an infinite number of solutions. In this case, we say the two equations are degenerate. An example of this case is the two lines 3x-7y=5 and 6x-14y=10. The second equation is the same as the first one, simply multiplied by 2. 

Each style of system thou hast
Hath solutions whose numbers contrast.
Consistent has one, 
Inconsistent has none,
And degenerate? That number’s vast!

7. Summation notation

The \sum (the Greek letter sigma) summation notation provides a compact way of writing a sum of many terms. The notation is best understood via some examples:

\sum_{k=1}^6 k^2=1^2+2^2+3^2+4^2+5^2+6^2=91

\sum_{k=1}^5 (2k-1)=1+3+5+7+9=25

\sum_{k=3}^7 2^k=2^3+2^4+2^5+2^6+2^7=248

In the first of these sums \sum_{k=1}^6 k^2 tells us to add up the values of k^2 as k runs from 1 to 6. People often drop the “k=” and simply write \sum_1^6 k^2. The lower number is always the starting value of k, and the upper number is the ending value. You can use any letter you want, so the first sum above can also be written as, for example, \sum_{n=1}^6 n^2 or \sum_1^6 n^2. The letters i, j, k, and n are common ones that are used in sums.

If you ever get confused about what a particular sum means, just start plugging values of k into the given expression. For example, in the second sum above, plugging k=1 into 2k-1 yields 1, and then k=2 yields 3, and k=3 yields 5, and so on.

The \sum notation might seem a bit “mathy” and scary at first, but once you get used to it, it will save you a lot of writing. Imagine if a sum has 1000 terms – that wouldn’t be fun to write out!

This fancy new sigma notation
Is a helpful compact innovation.
Though at first it seems frightening,
It’s really enlightening — 
It shortens a lengthy summation!

8. Pi is transcendental

Rational numbers are ones that can be written as fractions a/b, where a and b are integers, like 4/7 and 13/8. Irrational numbers are ones that cannot be written this way. It turns out that \sqrt{2} is irrational. The digits of irrational numbers go on forever with no pattern.

Transcendental numbers (which include pi) are even less orderly than irrational numbers, in that not only do their digits go on forever with no pattern, the numbers can’t be written as the solution to an algebraic equation (effectively an equation with integer coefficients, such as 2x^7-3x^5-6x+1=0). In contrast, the irrational (but not transcendental) number \sqrt{2} is the solution to the equation x^2-2=0. No such equation has pi as a solution. All transcendental numbers are irrational, but not all irrational numbers (for example, \sqrt{2}) are transcendental.

She grimaced and let out a sigh,
When he said, “I’ll transcribe all of pi.”
Her reply wasn’t gentle:
“But pi’s transcendental!
So don’t even give it a try!”

9. Solving for x

When solving an equation for x (or whatever variable you’re trying to find), the key fact to take advantage of is: If you start with two things that are equal, and you make equal changes to both, then the results are again equal. For example, if two buckets contain equal amounts of water (say, 5 gallons), and you add equal amounts to both (say, 2 gallons), then the resulting amounts are again equal (7 gallons). You might wonder how such a trivial and obvious claim could be of much use when solving equations. The answer is that it is useful only if you choose the changes wisely.

Consider, for example, the equation 3x-11=4. The equals sign tells us that the two things on either side of the equation are equal (provided that x takes on the correct value). We can therefore make the same change to both sides of the equation, and we’ll end up with another true equation. For example, we can add 17 to both sides. This yields 3x+6=21. This equation is completely correct, but also completely useless. We’re no closer to solving for x. This is because our choice of the equal change (adding 17) was unwise.

wise change is to add 11 to both sides, because the 11’s then cancel on the left, leaving us with 3x=15. We’re now closer to solving for x (which basically means getting x all alone on one side of the equation). The next (wise) thing we want to do is divide both sides of the equation by 3. The 3’s cancel on the left, and we obtain x=5. We have now isolated x on one side of the equation, which means that we have successfully solved for x. An example of an unwise second step would be to divide both sides by, say, 7. The would yield a true but useless equation.

When solving an equation, at every stage in the process there is an infinite number of equal changes you can make to both sides (adding something, multiplying by something, squaring, and so on). But only one (or perhaps a few) changes are useful. For the 3x-11=4 equation, our first step could alternatively be to divide by 3. This yields x-11/3=4/3. We can then add 11/3 to both sides to obtain x=11/3+4/3=5. In general, there are at most a couple wise choices at any given stage, but an infinite number of unwise ones. Your goal is to make whatever equal changes will help you gradually get x all alone on one side. 

Though it seems like a trivial claim,
In fact it’s the key to the game:
The same change to equals 
Results in their sequels
Again being one and the same.

There are zillions of things you can do
That will make your equations be true.
But alas, just a few
Will be useful to you.
All the others won’t give you a clue!

10. Logs: Change-of-base rule

For logs, the change-of-base rule says that for any base c (positive and not equal to 1),

\log_b a= \displaystyle {\log_c a\over \log_c b}

To prove this, let \log_b a=x. Then from the definition of a log, this relation is equivalent to b^x=a. If we take the log base c (where c is arbitrary) of both sides of this equation, and apply the power rule to the lefthand side, which says that \log_c(b^x)=x\log_c b, we can solve for x to obtain

\log_c(b^x)=\log_c a \ \ \Longrightarrow \ \ x\log_c b=\log_c a \ \ \Longrightarrow \ \ x=\displaystyle {\log_c a\over \log_c b}

And since x was originally defined as \log_b a, we have proved the above result.

This proof makes it clear that we’re free
To rewrite the log a, base b.
It’s log a divided
By log b, provided 
They both have the same base of c.

The change-of-base rule allows you to use your calculator to find the value of logs like \log_3 7. Your calculator doesn’t have a log-base-3 button. But it does have a log-base-10 button. So if you choose the new base to be 10, then \log_3 7 equals (\log_{10}7)/(\log_{10}3). You can now use the log button (base 10) to find the logs of 7 and 3, and then divide them. The result is (0.845)/(0.477)=1.77. So \log_3 7=1.77. As a double check, this relation is equivalent to 3^{1.77}=7 \ \Longrightarrow \ 6.99=7, which is true (up to rounding errors).

11. Slope of a perpendicular line

If you’re given a line with slope m, the slope of a line perpendicular to it is the negative reciprocal of m, that is, -1/m.  So you need to invert the m to obtain 1/m, and then throw in a minus sign. The inversion and the negative sign make sense, because if you have a very steep and upward slope of, say, 6, then a perpendicular line has a very shallow (consistent with the 1/m inversion) and downward (consistent with the minus sign) slope of âˆ’1/6. In terms of rises-over-runs, if you need to move over 1 and up 6 in order to stay on the given line, you need to move over 6 and down 1 to stay on a perpendicular line.

The negative-reciprocal result for the perpendicular slope can be proved with similar triangles. But plotting a few lines (in desmos.com, for example) should convince you. Note that for any given line, there is an infinite number of perpendicular lines, depending on what their y intercepts are. But they all have the same negative-reciprocal slope.

What slope should you use to design
A nice perpendicular line?
It’s easy – fear not,
Take the slope that you’ve got,
And invert it while changing the sign.

12. Distributive law

Let’s say that you have a box with two bowls in it. One bowl contains 7 apples, and the other contains 5. So you have 12 apples in all. What if you add on 2 more identical boxes with the same contents, so that you now have 3 such boxes? How many apples do you have in all? Well, you originally had 7+5=12 apples in the one box, and you now have 3 boxes, so you have 3\cdot (7+5)=3\cdot 12=36 apples in all.

However, there is another way to do the counting: You can count by bowls. Within the 3 boxes, you have 3 bowls that each contain 7 apples (which means 3\cdot 7=21 apples), and you also have 3 bowls that each contain 5 apples (which means 3\cdot 5=15 apples). So you have 21+15=36 apples in all. The statement that the two different methods of counting agree is: 

3(7+5)=3\cdot 7+3\cdot 5

The lefthand side does the counting by boxes, and the righthand side does it by bowls. Now, there was nothing special about the numbers 3, 7, and 5 here. So in general if you have a boxes, each of which contains one bowl with b apples, and one bowl with c apples, then the equation expressing the equality of the two different ways of counting the apples, analogous to the above equation, is 

a(b+c)=ab+ac

This is called the distributive law. It also works with any number of terms in the parentheses, by the same reasoning but now with more bowls in the boxes. For example, with three bowls in each box, we have 

a(b+c+d)=ab+ac+ad

The distributive law a(b+c)=ab+ac tells you that the letter outside the parentheses gets multiplied by each of the letters inside, and then you add the results. (We say that the a gets “distributed” into the parentheses.) Just make sure you don’t multiply the two letters (b and cinside the parentheses. That would correspond to multiplying the numbers of apples in each bowl, which doesn’t make any sense.  

If you’re wondering what will become
Of the product of a and a sum,
Take the product ab,
And then add on ac.
But the bc – stay far away from!

13. Sequences and series

The words sequence and series both start with the letter s, so it’s easy to get them confused. A sequence (which has essentially the same meaning as a progression) is a list of numbers satisfying some pattern or rule. In an arithmetic sequence, every number is obtained from the preceding one by adding on the same amount. An example is 7, 10, 13, 16, 19, where the common amount is 3. Another type of sequence is a geometric one, where every number is obtained from the preceding one by multiplying by the same factor. An example is 3, 6, 12, 24, 48, where the common factor is 2.

series is the sum of a sequence. So the sum of the above arithmetic series is 7+10+13+16+19=65. And the sum of the above geometric series is 3+6+12+24+48=93. In short, a sequence is simply a list of numbers with commas between them, whereas a series is a sum:

Sequence: \ 7, \ \ 10, \ \ 13, \ \ 16, \ \ 19

Series: \ 7+10+13+16+19=65

Though they both have a similar spread,
There’s a difference in how they are read.
A sequence, we’ve seen,
Has some commas between,
While a series has plusses instead.

14. Sherlock Holmes

This limerick appears in the book, although it would take too long to explain here why it is in fact related to math. (You’ll just have to read the book!) It is the limerick form of Sherlock Holmes’ famous quote, “When you have eliminated the impossible, whatever remains, however improbable, must be the truth.”

When options have all been inspected,
And impossible answers rejected,
In the words of a sleuth,
What remains is the truth,
Independent of how unexpected. 

15. Pascal’s triangle, binomial coefficients

If you expand (a+b)^2 with FOIL, you will obtain a^2+ab+ba+b^2=a^2+2ab+b^2. What about higher powers of a+b, like (a+b)^3 or (a+b)^4, etc.? For (a+b)^3 you can write it as (a+b)(a+b)^2 and then substitute in the above a^2+2ab+b^2 expression for (a+b)^2. You can then distribute the a and the b into the a^2+2ab+b^2 expression. The result is a^3+3a^2b+3ab^2+b^3, as you can verify. 

Having calculated (a+b)^3, you can then substitute that into the relation (a+b)^4=(a+b)(a+b)^3 and expand the product. This will give you (a+b)^4=a^4+4a^3b+6a^2b^2+4ab^3+b^4, as you can verify. 

You could theoretically continue in this manner to obtain (a+b)^n for any n. However, if n is large, it would take you a looong time to do the calculations. But if you do this for a couple more values of n and collect the results (you should definitely do it for n=4 and n=5), you will find that the coefficients of the various terms in the expansions take the following form (including the simple (a+b)^0=1 case):

\begin{array}{rccccccccccccc} n=0:& & & & & & & 1\\ n=1:& & & & & & 1 & & 1\\ n=2:& & & & & 1 & & 2 & & 1\\ n=3:& & & & 1 & & 3 & & 3 & & 1\\ n=4:& & & 1 & & 4 & & 6 & & 4 & & 1\\ n=5:& & 1 & & 5 & & 10 & & 10 & & 5 & & 1\\ \end{array}

This triangle of numbers is know as Pascal’s triangle, and the numbers are called binomial coefficients. An inspection of the triangle tells you that each number is the sum of the two numbers above it (or just one number, if it’s at the end of a row). The reason for this is evident if you look back at the expansions you did for small values of n. You will find that any given coefficient can be traced to two specific coefficients in the preceding expansion. More precisely, the desired coefficient equals the sum of the other two. (For example, 3=1+2, and 10=6+4.) Hence the sum rule in Pascal’s triangle. 

There happens to be a formula that gives you the value of any binomial coefficient, and this formula has all sorts of interesting properties. But for relatively small values of n (say, up to 10), you don’t need to know the formula, because it takes only a minute to write down Pascal’s triangle, which will give you whatever coefficients you need. And more importantly, you certainly don’t need to multiply out lengthy expressions which, given how messy they become, might cause you to throw in the towel. Instead, all you need is Pascal’s triangle.

It might seem like expansions will lead
To a mess that will make you concede.
But it doesn’t take hours
To calculate powers.
A triangle’s all that you need!

16. Adding fractions

When adding fractions that have the same denominator, like 7/8 + 3/8, you simply need to add the numerators, while keeping the same denominator. This yields (7 + 3)/8 = 10/8, which can be simplified to 5/4. This procedure makes sense, because the fraction 7/8 instructs you to divide a pie into 8 pieces and then take 7 of them. Likewise for 3/8, where you take 3 of the one-eighth pieces. So when you add the two fractions, you end up with 10 of the one-eighth pieces. That is, you have 10/8 of a pie.

But what if the denominators are different, as in 7/8 + 3/5? To add these, we need to make the denominators be the same, by multiplying each fraction by 1 in a helpful a/a form. (Multiplying by 1 doesn’t change anything, so we’re free to do that. But we can’t multiply by something other than 1, of course, because that would change the value of the fractions.) If we choose a/a to be 5/5 for the first fraction and 8/8 for the second, then the denominators become the same, allowing us to add the numerators:

\displaystyle {7\over 8}+{3\over 5}={7\over 8}\cdot {5\over 5}+{3\over 5}\cdot {8\over 8}={35\over 40}+{24\over 40}={59\over 40}

Note that we alternatively could have chosen one of the a/a fractions to be, say, 47/47. This equals 1, so it’s a legal thing to do. But the point is that it isn’t useful, because it doesn’t help us in our goal of making the denominators be equal. 

In the above example, the denominators 8 and 5 didn’t have any common factors, so our a/a fractions were 5/5 and 8/8. That is, each a was the denominator of the other fraction. If instead the denominators do have a common factor, as with 7/6 + 5/4, then it still works perfectly fine to let the a/a fractions be 4/4 and 6/6. These make the common denominator be 24, so the sum is (28 + 30)/24 = 58/24 = 29/12. However, we can get by with smaller a‘s, because 2/2 and 3/3 also accomplish the goal of making the denominators be the same. The common denominator is now 12, and the sum is (14 + 15)/12 = 29/12. 12 is the least common denominator (LCD). It isn’t necessary to use the LCD; any common denominator is fine. You could even make the a/a fractions be 400/400 and 600/600, which yield a common denominator of 2400. But if you use the LCD, you won’t need to cancel as many factors when you simplify your fraction in the end.

If you’re adding more than two fractions, it’s the same process: You want to make all the denominators be the same, by multiplying the fractions by 1 in helpful a/a forms. You can then simply add the numerators. The product of all the denominators is guaranteed to be a common denominator, although you can usually get by with a smaller number.

When adding up fractions, we claim
There’s really just one simple aim:
Multiply each
By a 1, as we teach,
So the bottoms all end up the same.

17. Associative law

The associate law for addition says that (a+b)+c=a+(b+c). That is, it doesn’t matter how you group the terms in the sum. You can first add a and b, and then add c. Or you can first add b and c, and then add a. (You can also first add a and c, and then add b.) Therefore, since the grouping doesn’t matter, we can simply write the sum as a+b+c, with no need for any parentheses. Any grouping you pick is fine. If you have three bowls with 7, 4, and 8 apples, you’re going to end up with 19 apples, no matter how you put them together. 

The associative law also holds for multiplication: (ab)c=a(bc). Again the grouping doesn’t matter. The geometrical interpretation of this law is that if you have a large box whose side lengths are 3 little boxes, by 4 little boxes, by 5 little boxes, then there are 3\cdot 4\cdot 5=60 little boxes within the overall box, no matter how you look at it. The interpretation of (3\cdot 4)\cdot 5 is that you have 5 layers of 3\cdot 4=12 little boxes. The interpretation of 3\cdot (4\cdot 5) is that you have 3 layers of 4\cdot 5=20 little boxes.

So for both addition and multiplication, it doesn’t matter how you group things. There are also plenty of real-life examples where the grouping doesn’t matter. . .

I’m here at the ice cream cafe,
And I ordered a triple today.
Those spoonfuls they scooped,
I don’t care how they’re grouped.
I’ll enjoy them the same, any way!

18. Solving by reversing the steps

When solving an equation for x, your goal is to get x all alone on one side, so that you end up with an equation that looks like “x = something.” However, if the equation is complicated, it might not be obvious how to do this. Fortunately there is a no-fail method that works in the special (and thankfully very common) case where x appears just once in the equation. The method can best be understood through an example.

Consider the equation (3x+1)/2-5=6. Starting with x, the lefthand side instructs you to proceed through the following operations (in this order):

(1) Multiply by 3,
(2) Add 1,
(3) Divide by 2,
(4) Subtract 5.

We want to find the value of x for which the result of these operations in 6. The no-fail method is to undo the given operations, in the reverse order. By “undo” we mean perform the inverse operation (on both sides; you must always make equal changes to both sides; see Limerick #9), where addition is the inverse of subtraction (and vice versa), multiplication is the inverse of division (and vice versa), squaring is the inverse of taking a square root (and vice versa, remembering the usual “\pm“), and so on. For the above list, the “undoing” (inverse) operations, in reverse order, are:

(1) Add 5,
(2) Multiply by 2,
(3) Subtract 1,
(4) Divide by 3.

Don’t forget that for each of these operations, you must perform it on both sides of the equation. The four operations gradually isolate x on the lefthand side. And on the righthand side, they change the 6 to 11, then to 22, then to 21, then to 7:

\displaystyle {3x+1\over 2}-5=6 \ \ \Longrightarrow \ \ {3x+1\over 2}=11 \ \ \Longrightarrow \ \ 3x+1=22 \ \ \Longrightarrow \ \ 3x=21 \ \ \Longrightarrow \ \ x=7

So 7 is the desired answer. You can (and should!) quickly verify that this value of x satisfies the original equation. 

The above equation might have seemed a bit complicated at first glance, but with a little practice, you’ll find that solving equations of this sort isn’t so difficult, provided that you list out all the steps and stay organized. If you encounter an equation involving eight steps instead of the four we listed above, there’s no need to panic, because the only difference is that you’ll now just end up with lists of operations that are twice as long, and a chain of equations that is twice as long as the above chain. The process will therefore take you a little longer, but there won’t be anything terribly difficult about it. You just need to systematically march through your list of the eight “undoing” steps.

For equations that aren’t very terse,
Remember the words of this verse:
If you need an assist,
Simply make a nice list,
And then run all the steps in reverse.

Remember that undoing the operations involves two kinds of reversals: You need to reverse (1) the order of the operations, and also (2) the type of each operation — for example, adding instead of subtracting, multiplying instead of dividing, etc. 

19. Math is cool

Math is cool. And knowing math, like the Pythagorean theorem, is cool too.

It’s quick to spot which kids are cool,
As they saunter the halls of the school.
Who’s got the swagger? Us!
We know Pythagoras! 
Sure, we’re all square, but we rule!”

20. Means

The arithmetic mean (AM) of two numbers a and b is their average: \mu=(a+b)/2. For example, the AM of 7 and 19 is (7 + 19)/2 = 13. The AM is halfway between the two given numbers. That is, it is the same distance from each: 13 is 6 away from both 7 and 19. This is true in general because

\displaystyle \mu-a={a+b\over 2}-a={b-a\over 2} \ \ \ {\rm and\ also} \ \ \ b-\mu=b-{a+b\over 2}={b-a\over 2}

This common distance of (b-a)/2 is simply half of the b-a distance between the two numbers. Said in another way, a, \mu, and b always take the form of a, a+d, and a+2d, where d is the common distance (which is (b-a)/2). Whatever number d you add to a to obtain \mu, you add the same number to \mu to obtain b.

The geometric mean (GM) of two numbers a and b is defined to be g=\sqrt{ab}. For example, the GM of 6 and 24 is \sqrt{6\cdot 24}=\sqrt{144}=12. The GM is “halfway” between the two given numbers, in a multiplicative sense. That is, it differs by the same factor from each: 12 is 2 times 6, and 24 is 2 times 12. This is true in general because

\displaystyle {g\over a}={\sqrt{ab}\over a}=\sqrt{b\over a} \ \ \ {\rm and\ also} \ \ \ {b\over g}={b\over \sqrt{ab}}=\sqrt{b\over a}

This common ratio \sqrt{b/a} is the square root of the ratio b/a of the two numbers. Said in another way, a, g, and b always take the form of a, ar, and ar^2, where r is the common ratio (which is \sqrt{b/a}). Whatever number r you multiply a by to obtain g, you multiply g by the same number to obtain b.

To summarize, the AM of two numbers is halfway between them in an additive sense; it is the same distance from each. And the GM is halfway between the numbers in a multiplicative sense; it is the same factor away from each. If you ask for the number that is “halfway” between two given numbers, most people will probably assume you mean additively. But technically the word “halfway” is a little ambiguous, because you could mean additively or multiplicatively. Additively, the number that is halfway between 10 and 1000 is 505 (495 away from each), but multiplicatively it is 100 (a factor of 10 away from each). The meaning of “halfway” is usually clear from the context, but be sure to specify, if there’s any chance of confusion. 

What do we mean by the mean,
This number that’s halfway between?
For 32, 8,
You can have a debate:
Is it 20, or only 16?

21. Systems of equations (three strategies)

Consider the system of equations, 2x-y=3 and x+3y=5. In Limerick #6, we mentioned that there are many ways to solve this system for x and y. In more detail, there are three basic strategies:

  1. Use one equation (whichever is more convenient) to solve for one of the variables in terms of the other (it doesn’t matter which, but let’s say you solve for x in terms of y). Then plug the result into the other equation. This yields an equation involving only y. So you’ve reduced the problem to one variable and one equation, which you know how to solve. After solving for y, you can plug the value back into either of the given equations to solve for x. Both options will give the same answer, assuming you haven’t made a mistake.
  2. Solve for one of the variables in terms of the other (again it doesn’t matter which, but let’s say you solve for x in terms of y) in both of the equations. Then set the two results equal. This yields an equation involving only y, and you can proceed as above.
  3. Find a helpful combination of the equations (for example, 7 times one equation plus 4 times the other) that makes one of the variables disappear (cancel). This again yields a problem with one variable and one equation, and you can proceed as above. 

All three of these strategies involve eliminating one of the variables, thereby reducing the problem to one variable and one equation, which you know how to solve. Once you’ve solved for that variable, you can plug its value into either of the given equations and solve for the variable you had eliminated. In the end, all three methods are pretty much the same; they’re simply organized a little differently.

If the system you’re given contains
Two letters, here’s how to make gains:
Just do what you may
To make one go away,
And then solve for whichever remains. 

22. Logs: Product rule

The log of a product is the sum of the logs. That is, 

\log_a bc=\log_a b+\log_a c

To prove this, let \log_a b=x and \log_a c=y. Then from the definition of the log, we have a^x=b and a^y=c. Plugging these forms of b and c into \log_a bc gives

\log_a bc=\log_a(a^xa^y)=\log_a a^{x+y}=x+y=\log_a b+\log_a c,

as desired. As an example, the product rule says that \log_2(8\cdot 32)=\log_2 8+\log_2 32. And indeed, the lefthand side of this equation equals \log_2(2^3\cdot 2^5)=\log_2 2^8=8, and the righthand side also equals \log_2 2^3+\log_2 2^5=3+5=8. The product rule makes sense: It says that the number of factors of a that fit multiplicatively into the product bc equals the number that fit into b plus the number that fit into c. This is clear in the example we just did.

The method of proof we used above can be applied in the same manner (as you should verify) to quickly show that the product rule also holds for the product of any number of numbers. That is,

\log_a bcde\cdots = \log_a b+\log_a c+\log_a d+\log_a e+\cdots

The log of the product bc
Is the sum of the logs, we agree.
This rule is still true
For more letters than two,
Such as d, e, and even past z!

23. FOIL

The FOIL method (which stands for First, Outside, Inside, Last) tells you how to expand the product (a+b)(c+d). The procedure is to multiply the first terms in each set of parentheses (ac), then the outside ones (ad), then the inside (bc), and then the last (bd). And then add them. So 

(a+b)(c+d)=ac+ad+bc+bd

The FOIL method boils down to a double application of the distributive law (see Limerick #12). This is true because if we treat c+d as a single thing (let’s call it e), then the distributive law gives (a+b)e=ae+be. If we then replace e with c+d and use the distributive law again (twice) on the righthand side, we arrive at the desired result:

(a+b)(c+d)=a(c+d)+b(c+d)=(ac+ad)+(bc+bd)

There’s really no need to recoil
From double distributive toil.
Don’t rip out your hairs,
Just do products in pairs.
It’s as simple as spelling out FOIL!

24. Composition of functions

When two functions are composed, they act one after the other. That is, the composition of two functions f(x) and g(x), with g acting first, is f(g(x)). This “function of a function” instructs you to plug a given value of x into g, and then take the value g(x) that pops out and plug that into f to obtain f(g(x)).

For example, let f(x)=x^2 and g(x)=x+5. Then f(g(x))=f(x+5)=(x+5)^2=x^2+10x+25. The action of f is to square whatever is plugged into it, which is x+5 in the present case.

We can also compose the functions in the other order, with f acting first, and then g. This yields g(f(x))=g(x^2)=x^2+5. The action of g is to add 5 to whatever is plugged into it, which is x^2 in the present case.

In Limerick #4, we noted that addition and multiplication are commutative. That is, the order in which you add things doesn’t matter, and likewise if you multiply things. However, from the two different results for f(g(x)) and g(f(x)) we found above, the order apparently does matter when composing functions. In some cases it actually doesn’t, as with, for example, f(x)=3x and g(x)=5x (the result is 15x for both orders), or with f(x)=x^2 and g(x)=x^3 (the result is x^6 for both orders). But in general the order does matter.  So in general, the action of composing functions is noncommutative. 

Take note of the functions’ positions
When they’re acting within compositions.
f and g don’t commute,
So their order’s not moot,
Like it is when you’re doing additions.

25. Checking your answer

Whenever you solve an equation for x (or whatever variable(s) you’re trying to find), you should always plug it back into the original equation, to check that it is indeed a solution. Algebra mistakes are inevitable sooner or later, so you can never be 100% certain your solution is correct, unless you plug it back in. Of course, there’s a chance you might make a mistake in your plugging-in process too. So it’s technically possible that you have a wrong answer that you incorrectly think satisfies the equation. But the probability of a double error like that is small.

No one is immune to algebra mistakes. Even math teachers who have been doing algebra for 50 years can make mistakes. (Someone who has been walking for 50 years can still trip!) So you should use every tool at your disposal to reduce the chance that a mistake goes unnoticed. One such tool is plugging your answer back into the original equation.

After solving, resist the temptation
To go nuts with a huge celebration.
Your x, you can’t trust,
So without fail you must
Plug it in to obtain confirmation.

26. Logs: Slide rules

The product rule for logs (namely \log_a bc=\log_a b+\log_a c) in Limerick #22 is the fundamental ingredient that allows slide rules to work. (You can find nice pictures of slide rules on the web.) The log scale on a slide rule marks off distances that are equal to the log values of numbers. For example, one inch might correspond to \log_2 2=1, and two inches to \log_2 4=2, and three inches to \log_2 8=3, and so on. (The base doesn’t matter. It could very well be base 10.) The slide rule has (at least) two identical rulers that can slide with respect to each other. By sliding one part relative to the other, you can easily add distances.

For example, you can add the one inch corresponding to \log_2 2 to the two inches corresponding to \log_2 4 by aligning the start of the \log_2 4 interval on Ruler B with the end of the \log_2 2 interval on Ruler A, or vice versa. This gives you three inches. And then on Ruler A you can quickly read off that three inches corresponds to \log_2 8. So just by looking at physical distances on the slide rule, you can determine that \log_2 2+\log_2 4=\log_2 8. By itself, this equation doesn’t tell us anything. But if we combine it with the product rule, which tells us that \log_2 2+\log_2 4=\log_2(2\cdot 4), we conclude that the product 2\cdot 4 equals 8.

Of course, this particular example doesn’t tell us anything we didn’t already know. 2 times 4 certainly equals 8. But if we work with messier numbers like, say, 2.73 and 3.19, we can use the slide rule to show (again by looking at physical distances) that \log_2 2.73+\log_2 3.19 equals \log_2 8.71. Combining this result with the product rule, which tells us that \log_2 2.73+\log_2 3.19=\log_2[(2.73)(3.19)] we conclude that the product (2.73)(3.19) equals 8.71. Or at least approximately. It all comes down to how accurately you can read off the markings (and the spaces between them) on the slide rule. In any case, you’re not going to get accuracy to more than a few digits. Calculators are far superior for accuracy, of course. But before calculators existed, slide rules were indispensable. With the help of the product rule, they trade the difficult task of multiplication for the easy task of addition, which you can do by simply looking at physical distances on the slide rule.

A slide rule succeeds in its mission
With the sleight of a skillful magician.
Its reformulation
Of multiplication
Replaces the task with addition!