We’ll start with this basic question from Joy in 1995:

What is 4/5 x 10? What is the answer to this fraction? Here the problem is 4/5 x 10. Please explain.

Doctor Ken answered, offering the method that usually feels most comfortable to beginners:

When I multiply fractions, I like towrite _both_ of the numbers as fractions. So I would take your problem and notice that 10 = 10/1, so we have 4 4 10 - x 10 = - x--5 51

Any whole number can be written this way; \(\frac{10}{1}\) means 10 pieces, each of which is a whole.

Then we have to remember how tomultiply two fractions. When we multiply two fractions together, we multiply everything in the top together, and then everything in the bottom together. Then we take what we get and put it in a new fraction. So we get 4 10 4 x 10 - x -- =------5 1 5 x 1

What we have here are 40 pieces, each of which is a fifth:

This, of course, is just what we did last week. As we saw, we could do the multiplications and call the answer \(\frac{40}{5}\) and then just do the division to get the answer, 8; but, as we also saw last week, we can simplify before multiplying:

This, technically, is our answer, but we can make it simpler in a couple of ways. First, notice that 5 x 1 = 5. So we can write the fraction as 4 x 10 4 x 10 ------ = ------ 5 x 15Now we do the tricky part. Notice that 10 = 2 x 5. So let's replace 10 in the top by 2 x 5, to get 4 x 10 4 x2 x 5------ = --------- 5 5 Now when we have the same thing in the top as we do in the bottom, we cancancelthem both out, but (this is very important) we can only do it when the top and bottom each have multiplication separating the parts, not addition or subtraction or anything else!! So if the top had been 4 + 2 + 5, we wouldn't have been able to cancel anything. In this case though, we're fine. So we get 4 x 2x 54 x 2 --------- = ----- = 4 x 2 = 8.51

This is an important part that wasn’t mentioned last week: Some students get so used to “canceling” that they do it everywhere, even when the two numbers are not in a numerator and a denominator, or when they are being added rather than multiplied. I often have to remind students, “Only cancel factors” or “Only cancel top with bottom”.

So the answer to our problem is 8. This may seem like a lot of work, but if you do it enough, you'll get really good at it, andyou'll start doing it in your head. To let you know what you have to look forward to when you get good at these, when I looked at this problem, I knew the answer in less than a second!

This, too, is important: You don’t usually write all the steps. But it will be important to write *every step that you might get wrong*, based on your own experience. I call this “driving defensively”.

For a slightly different perspective on the same type of problem, consider this question from a few months later:

Multiplying Fractions and a Whole Number Right now I'm multiplying fractions and whole numbers. It's kind of hard to give an example. I'll try to give you some.

When you ask for help, it’s a good idea to show both the specific kind of problem you are working on, and where you get stuck. We will often do a similar example if you provide one of your own, but seeing where you struggle can help us design our examples to illustrate the point you need work on.

Doctor Sydney first asked for clarification of the type of problems Ethan wanted, then continued, picking an example to demonstrate:

Hello, Ethan! Sorry it took a while for me to get back to you--I've not been at the computer for a few days! Okay, well I'm glad we've found examples of the kinds of problems you are working on, but I'm not sure exactly where you are having problems. So, why don't we do an example problem, okay? How about the problem: 3 --- x 4 = ? 5 When you are multiplying a fraction and a whole number, all you do, ismultiply the numerator of the fraction (the number on top) by the whole number, and put that number over the denominator (the number on bottom). So, for this problem, we would simply multiply 3 by 4 and put it over 5. Since 3 times 4 is 12, our answer would be 12/5 (You may want to simplify this into a compound fraction; write back if you aren't sure how!). Does that make sense?

If you noticed in the previous answer that the 1 on the bottom didn’t really do anything, then you were thinking well! We used that method mostly to show *why* the whole number ends up multiplying the numerator; once you realize that, you can skip writing the 1 and just write the whole number on top.

I have sometimes described this in terms of a house: The numerator is the ground floor (first floor in America), while the denominator is the basement. A whole number, on the ground outside, is nominally at the same level as the ground floor, and can walk right in, despite the appearance of front steps.

Here’s the work: $$\frac{3}{5}\times 4=\frac{3\times 4}{5}=\frac{12}{5}$$ We covered converting between improper fractions like this and mixed numbers, in the post

Improper Fractions and Mixed Numbers: Converting

In this case, we would divide 12 by 5, getting a quotient of 2 and a remainder of 2. The remainder is the number of extra fifths, so the answer is \(2\frac{2}{5}\):

Here is another thing to think about when you are doing these problems -- when would you multiply a fraction by a whole number in real life? Can you think of examples where this would be useful? What if you and 4 other friends got a pizza so that each of you wanted 1/5 of the pizza. If the pizza has 8 slices, how can you figure out how many slices of pizza each of you should get?

That’s actually a tricky one! You each get \(\frac{1}{5}\) of 8 pieces, so you multiply: $$\frac{1}{5}\times 8=\frac{1\times 8}{5}=\frac{8}{5}=1\frac{3}{5}$$ pieces. Have fun cutting them! (In practice, I’d give each person 1 piece, leaving 3 more pieces; then I’d cut \(\frac{3}{5}\) from each of them to give to A, B, and C, leaving \(\frac{2}{5}\) of each of the 3 pieces; then I’d give one of those and half of the last to D and E. Or maybe I just let them fight over it.)

Moving on to mixed numbers, here is a question from 1996:

Multiplying Fractions I don't know where to begin. I need help with problems such as this one: 3 1/4 x 3/4 = I'm trying to get my G.E.D. and I'm stuck on fractions so if you have anything on fractions that could help me do them easier I would really appreciate hearing about them.

Doctor Syd answered:

Hello, Dennis! We're glad you wrote. Fractions can be very tricky, indeed. My 23-year-old sister still grumbles about having to learn fractions, in fact! But if you can learn a few strategies, things will go much more smoothly. I will write fractions in the form p/q, with the slanted bar, in this message, but when you do it, it will be easier to see if you canwrite the fractions with a horizontal bar...

We generally write fractions using the “slash” to make typing easier, but it’s worth mentioning that the horizontal bar makes it easier to keep track of what you are doing. I have seen students who wrote all fractions by hand like \({}^2{\mskip -4mu/\mskip -3mu}_3\), which interfered with multiplying.

We’ll be rewriting our mixed number as an improper fraction; the post mentioned above shows how to do this, but Doctor Syd put it all in his answer:

Okay...In problems where you are asked to multiply two fractions together, the best strategy is toget both fractions into the form p/q. How do we write 3 1/4? Well, 3 1/4 means we have 3 + 1/4 of whatever we have, right? And, 3 = 3/1 So, how do we add these two fractions? We find a common denominator! The least common denominator of two numbers is the smallest number such that both numbers divide it. So, in our case, the smallest number such that 1 and 4 divide that number is just 4, right? So, we want both of the fractions we are adding up tohave a 4 in the denominator. To get a 4 in the denominator of the 3/1 fraction, we multiply by 4/4 which is just 1, so this should not change the number. So, 3 = 3/1 * 4/4. To multiply two fractions together, you just multiply the numbers in the numerators (the numbers above the division line) and the numbers in the denominators (the numbers below the division line). So, in this case we get that 3 = 3/1 * 4/4 = 12/4 Now we are ready to figure out this: 3 + 1/4 = ? We can now rewrite this as: 12/4 + 1/4 = ? To add two fractions with the same denominator, you just add the numbers in the numerator andkeep the denominator the same. So, 12/4 + 1/4 = 13/4. Thus our answer is 13/4.

In summary, we did this: $$3\frac{1}{4}=3+\frac{1}{4}=\frac{3}{1}+\frac{1}{4}=\frac{3\times 4}{1\times 4}+\frac{1}{4}=\frac{12}{4}+\frac{1}{4}=\frac{12+1}{4}=\frac{13}{4}$$ We’ll look at a quicker way soon.

Now we have to multiply \(\frac{13}{4}\times\frac{3}{4}\):

So,back to the original problem(stick with me, here! I know the explanation may seem long, but after you practice these methods on some problems it will be much better, I guarantee!) To find out what 3 1/4 * 3/4 is, we rewrite the problem as: 13/4 * 3/4 Now, we've already practiced multiplying two fractions of this form, so follow that procedure, and you should get your answer!

Finishing up: $$\frac{13}{4}\times\frac{3}{4}=\frac{13\times 3}{4\times 4}=\frac{39}{16}=2\frac{7}{16}$$

What if they’re *both* mixed numbers? Consider this 1998 question:

Multiplying Mixed Numbers Could you please explain how to multiply fractions? For example: 2 4/7 x 5 1/6 Thank you, Devon Dunphy

I answered this one, using the same method and then explaining some extra features:

Hi, Devon. Fractions can be a lot of fun once you've made friends with them, but they can be a little scary when you first meet them. These two look pretty ugly, so we'd betterstraighten them up before we try to work with them. In order to give you a chance to practice with your own problem, I won't do exactly your problem, but one like it: 2 3/7 x 3 2/3

We’ll see a better reason to “straighten up” the mixed numbers than just to make them less scary; but we’ll also see that we can just tough it out and leave them as they are, if we are brave enough.

I first showed the long way as we saw it before:

To make them look neater, we first change the mixed numbers into improper fractions. You probably remember how to do that. You want to turn 2 3/7 into some number of sevenths, so you remember that2 is just 14 sevenths, and add them: 3 14 3 17 2 --- = --- + --- = --- 7 7 7 7 The same way, 2 9 2 11 3 --- = --- + --- = --- 3 3 3 3

But you don’t have to write all that out:

Note: When you're used to it, you can try my way, which is to start at the denominator,multiplyby the number clockwise from it (the whole number) andaddthe next number clockwise (the numerator). This way, we get: 3 x 3 + 2 = 11 by following the arrow: +--------> | + 2 -> 11 | 3 --- -- | x 3 -> 3 +----- But that's just a trick to avoid extra writing.

Okay, so regardless of how you change the mixed numbers into improper fractions, our problem is really: 20 11 --- x --- 7 3 Now how do you multiply fractions? The "rule" says youmultiply the numeratorsto get the numerator of the product, and youmultiply the denominatorsto get the denominator of the product: a c a x c - x - = ----- b d b x d So in this case, we multiply 20 x 11 and 7 x 3: 20 11 20 x 11 220 --- x --- = ------- = --- 7 3 7 x 3 21

I had chosen an example that wouldn’t involve canceling; Devon’s problem does.

Often, you'll find something to cancel out to put the result in lowest terms; I recommend doing that before you actually multiply anything, to save work. In this case, we don't find anything to cancel, so we'll try the cancelling trick in the next example.

I followed this by explaining the rule using pictures, for an example of multiplication of two proper fractions, much like what we did last week, including canceling. Here is Devon’s: $$\require{cancel}2 \frac{4}{7}\times 5 \frac{1}{6}=\frac{18}{7}\times \frac{31}{6}=\frac{\overset{3}{\cancel{18}}}{7}\times \frac{31}{\cancel{6}}=\frac{93}{7}=13\frac{2}{7}$$

Now for a different perspective, from 2003:

Multiplying Mixed NumbersWhy can you notmultiply mixed numbers without changing them into improper fractions? I understand that it is easier and I understand the process, but is there a theory?

When someone asks, “Why can’t I do it this other way?”, I generally suggest they try and see. They will either discover why it’s a bad idea, or find that it can be done. This one, though, might be a lot to ask a student to discover for herself.

Doctor Douglas answered:

Hi Natasha, Thanks for writing to the Math Forum. You can indeed multiply mixed numbers without converting them to improper fractions. 3 1/2 x 4 1/5 = (3 + 1/2) x (4 + 1/5) = (3 x 4) + (1/2 x 4) + (3 x 1/5) + (1/2 x 1/5) = 12 + 2 + 3/5 + 1/10 = 14 + 6/10 + 1/10 = 14 7/10

Here we wrote the mixed numbers as sums and distributed, multiplying each term of the first number by each term of the second. We can illustrate what is happening with a picture:

Here, we multiplied the whole parts, \(3\times 4=12\); and the first fraction times the whole, \(\frac{1}{2}\times 4=\frac{4}{2}=2\); and the whole times the second fraction, \(3\times\frac{1}{5}=\frac{3}{5}\); and the two fractions, \(\frac{1}{2}\times\frac{1}{5}=\frac{1}{10}\). Then we added: $$12+2+\frac{3}{5}+\frac{1}{10}=14+\frac{6}{10}+\frac{1}{10}=14\frac{7}{10}$$

Doing it this way (multiplying all the terms out using thedistributive propertyof multiplication over addition) was probablymore workthanconverting: 3 1/2 x 4 1/5 = 7/2 x (21/5) = (7 x 21)/(2 x 5) = 147/10 = 14 7/10

Here we had just two multiplications instead of four multiplications and three additions of fractions. Definitely easier! On the other hand, the numbers got bigger.

But there might be situations where doing the conversion is more work. For example, we could have the following situation: let there be two years where some monetary quantity increases by 2% the first year and decreases by 2% the following year. Then the total overall percentage change is (1 + 2%)(1 - 2%) = (1 + 2/100)(1 - 2/100) = 102/100)(98/100) = (102 x 98)/(100 x 100) = 9996/10000 = 0.9996 or a 0.04 % drop overall. Notice how we had to execute the multiplication 102 x 98.

This time, the numbers got considerably bigger!

We could also have done the following: (1 + A)(1 - A) = 1x1 + A - A - AxA = 1 - AxA = 1 - (0.02)(0.02) = 1 - 0.0004 = 0.9996 which is a lot easier in terms of the number crunching, especially if we don't have access to a calculator. So there may be times where the conversion of a mixed number to a fraction may not be the most efficient way to proceed.

Here he used some algebraic thinking to come up with a shortcut. And that shortcut involved the distributive method. We could also write this out without the algebra: $$\left(1+\frac{2}{100}\right)\left(1-\frac{2}{100}\right) = 1-\frac{2}{100}+\frac{2}{100}-\frac{4}{10000} = 1-\frac{4}{10000} = \frac{9996}{10000}$$

We’ll close with a very similar question from 2004:

Multiplying Mixed NumbersWhy do you need toconvert mixed numbers to improper fractions before multiplying them together? I teach 5th grade mathematics, and the children asked me about this.We understand that you have to do it, but what is the mathematical theory behind this operation? I have looked in numerous math resources and cannot find an explanation.

Of course, what they’re expecting is an explanation of why the improper fraction method is valid and valuable. But as we now know, there are two sides to the question. I answered:

Hi, Jane. This is an excellent question! Like many things in math, converting to improper fractionsisn't really NECESSARY, just CONVENIENT(though you might not think so until you finish reading this!).

Call it *relatively* convenient. Students often don’t realize that the hard work we teach is easier than the harder work we don’t teach! So it’s good from time to time to teach the harder work. Here, I’ll make a point not quite made in that last answer:

You can multiply mixed numbersdirectlyif you want,just the same way you multiply whole numbers. The key is the distributive property: to multiply a sum, you can multiply each part of the sum and then add. With whole numbers, this looks like 25 * 32 = (20 + 5)*32 = 20*32 + 5*32 = 20*(30 + 2) + 5*(30 + 2) = 20*30 + 20*2 + 5*30 + 5*2 = 600 + 40 + 150 + 10 = 800

The routine multiplication algorithm, which older generations were just told to do because it was right, is now taught with more emphasis on the reason; but I imagine many students still don’t really understand what’s going on. An occasion like this, where a class has asked “why”, is a chance to point out many connections.

This is really what we are doing when we write 32 * 25 ---- 160 <- 5*32 64 <- 20*32 ---- 800

Multiplying digit by digit is really just distribution, hidden by the notation.

With mixed numbers, you can do the same thing if you want: (2 1/2)*(1 1/5) = (2 + 1/2)*(1 + 1/5) = 2*(1 + 1/5) + 1/2*(1 + 1/5) = 2*1 + 2*1/5 + 1/2*1 + 1/2*1/5 = 2 + 2/5 + 1/2 + 1/10 = 2 + 4/10 + 5/10 + 1/10 = 2 + 10/10 = 3 You could write this something like this: 2 1/2 * 1 1/5 -------- 1/10 = 1/10 2/5 = 4/10 2 1/2 = 5/10 --------------- 2 10/10 = 3

Here, as I did each multiplication, I put fractions in one column and whole numbers in another, then I added the (one) whole number, and rewrote the fractions with common denominator 10 and added them, then converted to a whole number.

Or, you can convert to improper fractions: 5/2 * 6/5 = (5*6)/(2*5) = 6/2 = 3 Now why is this so much easier? It's because when you mix multiplication and addition, you have to use the distributive property, which gives you a lot of parts to add up. When you mix multiplication with pure fractions (no addition), everything works out neatly becausefractions are the same thing as division, andmultiplication and division are just different sides of the same operation. So mixed numbers, which are sums, work well when you want to add or subtract; while pure fractions, which are divisions, work well when you want to multiply or divide. We convert to whatever form works best for what we want to do.

I often say that fractions and multiplication “play well together”, because they are from the same family. And that’s also why we often teach multiplication and division of fractions before we tackle addition and subtraction.

]]>A recent question involved a word problem about fractions, which will fit in nicely with the current series on fractions. We’ll explore several ways to solve a rather tricky fraction word problem, some avoiding fractions as much as possible, some focusing on the meaning of the fractions, and others touching on algebra.

The question came from Stacy in early March, just stating a problem without explanation:

3/5 of cases are misdemeanors.

The rest are felonies.

2/3 of felonies are solved.

2/3 of all cases are unsolved.

What fraction of misdemeanors are solved?

The problem involves both fractions and logic. Not knowing the context, we can’t be sure which topic it is primarily meant to give practice in, or where Stacy is stuck. For this reason, we often ask for more information before trying to help. But sometimes, as here, it seems appropriate to start with general advice before asking for work. Doctor Fenton answered with some good suggestions for avoiding the fractions:

Hi Stacy,

One way to solve this problem is to

consider a case with actual numbers. The problem involves thirds and fifths, so choose a total number of cases which isdivisible by both 3 and 5. The smallest such number is 15. Now determine the number of misdemeanors, the number of felonies, and the number of each type which are solved.If you use a different number, such as 30 or 150, you should still get the same fraction for your answer as you did for 15.

If you have any questions or need more help, please write back and show me what you have been able to do, and I will try to offer further suggestions.

This advice is more or less equivalent to using common denominators, or to changing units to work with whole numbers. And it’s similar to what we do in algebra, “clearing fractions” from an equation to make the work easier. A key idea behind the method is that since everything in the problem is a ratio, nothing depends on the actual numbers, and we might as well assume some numbers that will work well. In fact, the actual numbers (assuming all the fractions are exact) must be multiples of the numbers he proposes. At a higher level, one might use a variable for the total number of cases, which would be eliminated in the course of the work, proving that it has no effect. We’ll look at some of these ideas later.

Stacy replied, not exactly showing work yet, but giving a little more information:

I did that but I got 1/5 whereas the teacher said the answer was 1/9 but didn’t explain how he got that

It often helps when a students shows the expected answer; that allows us to see whether perhaps she is actually correct but thinks she is wrong because she was given a wrong answer (which is not true here), and also tells us that we are not accidentally helping with a test question! Seeing her own answer without work, however, doesn’t help us see where the difficulty lies. So Doctor Fenton asked for more:

Can you show me your computations that give you 1/5?

Stacy answered, showing that her work didn’t actually use the suggested method, but worked directly with the fractions:

3/5 misdemeanor cases so 2/5 would be felonies

2/3 of felonies are solved so 2/5 × 2/3 = 4/15

2/3 of all cases unsolved so 2/3 of 9/15 (because 3/5 plus 4/15)

so 3/5 × 9/15 = 27/30 = 9/10 – 3/5 = 6/10 6/10 =

I don’t remember now.

She starts off well, but then gets confused; that is not surprising if her original work was written only as a collection of calculations without explanation. (Trying to untangle it, I think there is some bad punctuation and some run-on equations, so it doesn’t mean quite what she wrote.) We’ll get back to this method later.

Doctor Fenton replied, turning back to his suggestions:

Your first two equations are correct. I don’t understand why you added 3/5 and 4/15. 3/5 is the fraction of misdemeanors, and 4/15 is the fraction of solved felonies. That sum is also not 9/15; 3/5 + 4/15 = 13/15. So I don’t understand what you are doing.

If you had 15 total cases, then 9 cases are misdemeanors, and 10 cases are unsolved. How many felonies are there, and how many are solved? How many felonies are unsolved? You need to determine how many misdemeanors are solved.

This series of questions follows what Stacy started to do, but without the fractions, making it perhaps easier to see what to do. I find that fractions can interfere with students’ view of the reasoning required for a problem, as if fractions and logic each take too much brainpower for a student still learning both.

Doctor Rick now joined in, with a suggestion for taming the logic itself:

Hi, Stacy. I would like to jump in here with a further suggestion.

It can be hard to keep track of all the informationand how one thing is related to another. A little chart can help you organize the data, something like this:MIS FEL TOTAL SOLVED + = UNSOLVED + = 10 ---------------------- TOTAL 9 + = 15I have put in the numbers from Doctor Fenton just mentioned, following his approach of supposing there are 15 cases total (which I see you didn’t use yourself). Can you see how the chart works? For instance, the number under FEL, in the SOLVED row, is the number of felonies that have been solved. You are told that this is 2/3 of the total number of felonies, so the number you put in that space should be 2/3 of the number in the TOTAL row under FEL.

I hope this will help!

This kind of table is useful in many kinds of problem, particularly in probability; we have used it in the posts Conditional Probability and Multiple Choice, and Bayes and Virus Testing.

Stacy now used this method:

Ok so I have 15 total cases

6 are felonies solved 2 are unsolved because 2/5 of 15 = 6 and 2/3 of 6 is 4 (then subtract?)

So 9 are misdemeanors

2/3 of total cases unsolved is 10

2/3 of misdemeanors is 3/5 × 2/3 = 5/15 which is 1/5 solved misdemeanors

I’m lost somewhere

Here is her table, if she is using it, as I interpret what she is saying:

MIS FEL TOTAL SOLVED 5? + 4 = UNSOLVED + 2 = 10 ---------------------- TOTAL 9 + 6 = 15

The numbers don’t add up, probably because she is not carefully distinguishing the “whole” each fraction relates to. But also, when she reverted to fractions, she made a silly mistake in her multiplication. But she is close.

Doctor Fenton answered:

You are almost there.

Of the 6 felonies, 4 are solved. 10 cases total are unsolved, so how many of the misdemeanors are solved?

Filling in the chart Dr. Rick provided should also be easy.

MIS FEL TOTAL SOLVED ?? + 4 = ? <---what does this have to be? UNSOLVED + = 10 ---------------------- TOTAL 9 + 6 = 15

One we find the total solved (?), we will be able to find the solved misdemeanors (??).

Stacy was now finished:

Ok I get it looking at the chart but

he used a block systemand I couldn’t even do the math correctly with the fractions multi-step based on what I was getting.I do now understand why

the answer is 1/9though thank you.

We’ll think about that mention of “a block system” soon.

Here is the completed table:

MIS FEL TOTAL SOLVED 1 + 4 = 5 UNSOLVED 8 + 2 = 10 ---------------------- TOTAL 9 + 6 =15

Let’s check it against the problem. First, we see that each row or column adds up. As for the facts:

- 3/5 of cases are misdemeanors: 3/5 of 15 is 9.
- The rest are felonies: 15 – 9 = 6.
- 2/3 of felonies are solved: 2/3 of 6 is 4.
- 2/3 of all cases are unsolved: 2/3 of 15 is 10.
- What fraction of misdemeanors are solved? 1 out of 9 is solved, so the answer is 1/9.

We could also have filled in the table with fractions (all being fractions of the total) rather then absolute numbers:

MIS FEL TOTAL SOLVED 1/15 + 4/15 = 5/15 UNSOLVED 8/15 + 2/15 = 10/15 ---------------------- TOTAL 9/15 + 6/15 = 15/15

We might have filled in the numbers like this, starting with only the three **bold** numbers, which are directly given:

MIS FEL TOTAL SOLVED 1/15 + 4/15 = 1/3 UNSOLVED 8/15 + 2/15 =2/3---------------------- TOTAL3/5+ 2/5 =1

Here is my process:

- The felonies are 1 – 3/5 = 2/5;
- the solved felonies are 2/3 of 2/5 = 4/15;
- the total of solved cases is 1 – 2/3 = 1/3;
- the solved misdemeanors are 1/3 – 4/15 = 1/15;
- as a fraction of all misdemeanors, this is (1/15)/(3/5) = (1/15)(5/3) = 1/9.

We didn’t need to work out the unsolved fractions for this problem.

But what might the teacher have intended? I don’t know for sure what the “block system” is, but it is probably some form of “block diagrams”, also called tape diagrams, or strip, or bar models, in which fractions are depicted as parts of a strip representing the whole. Here is one way we might solve the problem that way:

We can see visually that the solved misdemeanors are 1/9 of the total misdemeanors.

Commonly I would do this without trying to measure things exactly, just sketching the relationships to think about what has to be done with the fractions.

How about solving the problem with algebra? This amounts to putting an *x* next to every fraction in the fraction method:

- Let
*x*= total number of cases. - 3/5 of cases are misdemeanors: Number of misdemeanors = \(\frac{3}{5}x\).
- The rest are felonies: Number of felonies = \(x-\frac{3}{5}x=\frac{2}{5}x\).
- 2/3 of felonies are solved: Number of solved felonies = \(\frac{2}{3}\cdot\frac{2}{5}x=\frac{4}{15}x\).
- 2/3 of all cases are unsolved: Number of unsolved cases = \(\frac{2}{3}x\).
- Number of solved cases = \(x-\frac{2}{3}x=\frac{1}{3}x\).
- Number of solved misdemeanors = number of solved cases – number of solved felonies = \(\frac{1}{3}x-\frac{4}{15}x=\frac{1}{15}x\).
- What fraction of misdemeanors are solved?
- Number of solved misdemeanors/number of misdemeanors = \(\displaystyle\frac{\frac{1}{15}x}{\frac{3}{5}x}=\frac{1}{15}\cdot\frac{5}{3}=\frac{1}{9}\)

Without an orderly way to see what data we have and what we need, and therefore plot a course from one to the other, we need to carefully write the meaning of each expression, and scan for useful values at each step. So apart from just getting the fraction calculations right, the main difficulty in the problem is choosing what to do at each step.

]]>

Our first question is from 1999:

Meaning of Multiplying Fractions I am doing an essay assignment, and I got stuck on this question:What does it mean to multiply a fraction by a fraction?My sister and I think multiplying a fraction by a fraction just means to multiply a fraction by a fraction! Please help.

I answered, using pictures to connect multiplication of fractions to multiplication of whole numbers:

Hi, Mary. Well, what does it mean to multiplya whole number by a whole number? Two times three means the total oftwo groups of three things; here are two groups of three squares: +-------+-------+-------+ | | | | | | | | | | | | +-------+-------+-------+ | | | | | | | | | | | | +-------+-------+-------+ So 2 times 3 is 6.

(One nice thing about this rectangle model of multiplication is that it makes it easy to see that we could also call it *three* groups of *two* things!)

Now what does it mean to multiplya fraction times a whole number? One half times six means half a group of six; here'shalf a group of three squares: +-------+-------+-------+ | | | | +-------+-------+-------+ : : : : :.......:.......:.......: 1/2 times 3 is 3/2, because I've cut the squares into six halves, of which I'm keeping three.

I made three squares in the row, then cut the whole row in half, leaving 3 half-squares, or 3/2. We can also rearrange that into 1 1/2 squares; we’ll be looking at such mixed numbers later!

We do the same thing to multiplya fraction times a fraction; here's half a group of 2/3 of a square: +-----+..: | : | : +-----+..: : : : : :..:..:..: 1/2 times 2/3 is 2/6, because by cutting the square into two slices one way and three the other way, I have six pieces, of which I'm keeping only two. So a fraction times anything is justthat fraction OF that amount; break it into as many pieces as thedenominatorsays, and keep as many of them as thenumeratorsays.

I cut the square into 3 parts vertically and kept only two columns, making 2/3; then I cut that in half horizontally, making 2/6. We’ll be going through this process more slowly in a moment, and also how to change the answer to 1/3.

Next, consider a somewhat different question from earlier the same year:

Multiplying Fractions I have trouble multiplying fractions. Could you help me?

This time the question is about how to do it, rather than what it means; but I chose to start with the *meaning* rather than the routine *method* that Derek likely was having trouble with:

Hi, Derek. Rather than just remind you that to multiply two fractions youmultiply the numerators and the denominators, let's think it through. Suppose I havehalf a cakeleft over from my birthday, and want totake 2/3 of it. First I'll cut the half into thirds. If I had cut the whole cake into pieces this size, there would have been twice as many pieces (6), so the pieces are each one sixth of the whole cake. Now I want to take two of these pieces; that make 2/6 of a cake, or 1/3. So 2/3 of 1/2 is 1/3. You can see it even more easily if you reverse it: 2/3 of 1/2 is the same as1/2 of 2/3. Half of two thirds is one third.

Pictures are coming in a moment, but this last comment is of interest. From working with whole numbers (as in the \(2\times 3\) example above, we know that multiplication is commutative; that is, you can change the order and get the same result. Doing the same thing with fractions sometimes makes the work easier, as it does here. Since half of 2 items is 1 item, half of 2 thirds is 1 third, and we’re done!

Now the pictures; we’ll make half a cake, and then take 2/3 of that in a way that we could do with any pair of fractions:

Here's a picture of how it works. I firstcut the cake in twofrom top to bottom, and take one half: +--+--+ |//| | |//| | |//| | |//| | |//| | +--+--+ Now I'llcut that half into three pieces; while I'm at it, I'll cut the part I didn't take at the same time, showing thatthese pieces are really sixths: +--+--+ |//| | +--+--+ |//| | +--+--+ |//| | +--+--+ Now I'll take two of the three pieces: +--+--+ |XX| | +--+--+ |XX| | +--+--+ |//| | +--+--+

There are 6 equal parts of the whole cake (even though half of those didn’t exist when we did the cutting), and we have 2 of them, so the result is \(\frac{2}{6}\).

The two pieces I've taken are theproduct of the numeratorsof the fractions 2/3 and 1/2: 2 * 1 = 2. 1 +--+ |XX| 2 +--+ |XX| +--+ The six pieces the whole cake was cut into are theproduct of the denominatorsof the fractions: 3 * 2 = 6. 2 +--+--+ | | | +--+--+ 3 | | | +--+--+ | | | +--+--+ So the pieces I've taken are 2/6 of the cake: 2 1 2 * 1 2 --- * --- = ----- = --- 3 2 3 * 2 6 There's the answer yet again!

This explains why the product of the fraction is found by multiplying the numerators (to find the numerator of the result), and multiplying the denominators (to find the denominator of the result). That is the basic rule we need to follow, whether or not we remember why: $$\frac{2}{3}\times\frac{1}{2} = \frac{2\times 1}{3\times 2} = \frac{2}{6}$$

But wait! There’s more!

Now there's one more thing to add: often you will have tosimplify the answer(as in this case, which turns it into 1/3), and there's a way to make that easier. What we do is tosimplify before we actually multiply. Just notice that when I wrote out the multiplied fraction above, 2 * 1 ----- 3 * 2 both numerator and denominator contain a 2. I can rearrange this as 2 * 1 2 1 1 1 ----- = --- * --- = 1 * --- = --- 2 * 3 2 3 3 3 You can do this very easily by just crossing out the 2's, which is called cancelling: / 2 * 1 1 ----- = --- 3 * 2 3 /

In plain text, we had to indicate crossing out with a separate slash; we’d normally write it like this: $$\require{cancel}\frac{2}{3}\times\frac{1}{2}=\frac{2\times 1}{3\times 2}=\frac{\bcancel{2}\times 1}{3\times\bcancel{2}}=\frac{1}{3}$$

In more complicated problems,this can save a lot of work, since otherwise you would have to multiply, then factor or divide, undoing part of your work. I hope this helps a little. If I haven't helped with whatever is the hardest part for you, please write back and give me an example of a problem you find hard and how you tried to do it; that will help me see where you need the most help.

We didn’t get a reply, but more examples follow!

Let’s dig into that idea of cancelling, with this question from 1998:

Cancelling FractionsHow do you cancel3 2 - x - ? 5 3 The book I have explains it, but it looks like teachers from Planet X are writing it. I totally don't get the entire problem. HHHHHEEEEELLLLLPPPPP!

This time, the whole point is canceling; the example is very much like the last one. (We’ll see harder ones later.)

Doctor Otavia answered this time, offering advice about reading textbooks, then giving a similar example:

Hi, Lori! I also sometimes find math textbooks hard to understand. If I don't understand a part the first time I read it, I usually reread it and try some of the examples, and sometimes that helps. Let's take a look at a problem that's like your problem. Once you understand how to do this kind of problem, you should be able to do yours in a jiffy. Let's use oh... how about 7 13 --- * --- = ? 3 7 Those seem like good numbers to me. After all, this is just an example so you can learn the method for solving problems like these.

This is nearly identical, except for the specific numbers.

What you want to do is find the product of those two fractions, right? And you want to use cancellation to help you do that. So, how do you multiply fractions together? Youmultiply the numerators(the top part) and youmultiply the denominators(the bottom part), so the first step would look like 7 137 * 13--- * --- = --------. 15 715 * 7So far, it looks just like regular old fraction multiplication. So where's the cancellation? Well, we know that 3 * 7 = 7 * 3 [thecommutative property], so we can rewrite our fraction, which then looks like 7 * 13 7 * 13 -------- = --------. 15 * 77 * 15Now, we can again rewrite that fraction as aproduct of two fractions, so now we have 7 * 13 7 * 13713 -------- = -------- =--- *---- . 15 * 7 7 * 15715 But wait, 7/7 means 7 divided by 7 which is 1, right? So what we really have is 131 *----. 15 But we know that anything times 1 equals itself, so your answer is 13/15.

This is the l-o-n-g way! Though this explains **why** we can “cancel”, we’d never write all that out.

So, that's a step-by-step method for finding the products of fractions using cancellation along the way, and now that you've seen it, I'll show youa shorter way, but first I had to explain the whole reasoning behind it, or else the simpler explanation might not make sense! Let's say you have some fractions you want to multiply together.Imaginethat when you do the first step of combining the numerators and the denominators, you have a fraction that looks like 6 * 11 * 2 * 5 ---------------- . 2 * 6 * 10 * 7 An easy way to cancel stuff is to justget rid of any numbers that you have in both the numerator and the denominator. The reason this works is that what you're really doing is rearranging the numbers and then expressing the fraction as a product of **something that's really one in disguise** times whatever is left, or in this case, since you have a 6 in the numerator and a 6 in the denominator, you can justthrow out both 6's- and the same goes for the 2. What you're left with is 11 * 5 -------- . 10 * 7

So, rather than write out the rearrangements, we can just imagine that we did, and write the results. Wherever we have the same number on the top and the bottom, we would be able to gather them into a single fraction that is equal to 1, and they disappear:

$$\frac{6}{2}\times\frac{11}{6}\times\frac{2}{10}\times\frac{5}{7} = \frac{6\times 11\times 2\times 5}{2\times 6\times 10\times 7} = \frac{\cancel{6}\times 11\times \bcancel{2}\times 5}{\bcancel{2}\times \cancel{6}\times 10\times 7} = \frac{11\times 5}{10\times 7}$$

But sometimes common factors are hidden:

Looks like you're done, right? No, not quite yet. Because see, 10 = 5 * 2, so really the fraction is equal to 11 * 5 -----------.2 * 5* 7 Now you can again cancel out the 5, and your final result is 11 11 ------- = ----. 2 * 7 14 So I guess another way to describe cancellation is to multiply the numerators and the denominators, (in other words, combine all your fractions into one big fraction), and thenfactor every number as much as you can. Once you've done this, every number that appears in the numerator and in the denominator can be thrown out, or cancelled.

We can either explicitly write out the factors, as she did,

$$\frac{11\times 5}{10\times 7} = \frac{11\times 5}{2\times 5\times 7} = \frac{11\times \cancel{5}}{2\times \cancel{5}\times 7} = \frac{11}{2\times 7} = \frac{11}{14}$$

or we can just divide by the common factor, replacing each number with the quotient:

$$\frac{11\times 5}{10\times 7} = \frac{11\times \overset{1}{\cancel{5}}}{\underset{2}{\cancel{10}}\times 7} = \frac{11}{2\times 7} = \frac{11}{14}$$

Students often hear the term “cross-canceling”, and sometimes get confused about it. Here’s a 2001 question:

Multiplying Fractions I need help on how to solve this: 8 * 3 - - 9 5 My teacher said something aboutcross-cancelling, but I didn't understand. Can you please explain? Thanks.

Doctor Rick answered:

Hi, Alysha. You know the basic method for multiplying fractions, right? You multiply the numerators, and that's the numerator of the product. Multiply the denominators, and that's the denominator of the product. Let's do that, butDON'T do the multiplications yet- just write them where they go. 8 3 8*3 - * - = --- 9 5 9*5 Now, to reduce the fraction to lowest terms, we want tolook for a common factor in the numerator and denominator. By not multiplying first, we make this job easier: we have already done some factoring of the numerator and denominator. I'll finish the factoring, but keep the factors together to show where they came from: 8*3 (2*2*2)*3 --- = --------- 9*5 (3*3)*5

The idea of not doing the multiplications yet is actually what all of us have been doing so far, without pointing it out. We do that because it makes visible what is really happening so that we can pause to think about how to make the work easier. I often advise students to first write what they are going to do (in this case, the numbers to be multiplied), then think, and then do it. Even if you don’t change what you actually do, you’re showing your teacher what you are doing (in case you make a mistake), and you are showing yourself what you are claiming to do, so you can check that you really did it!

Here, we know we’ll want to look for common factors in order to simplify the final result, so why multiply and then immediately un-multiply! Now we’re looking in the smaller numbers 8, 3, 9, and 5, rather than the products 24 and 45 we would otherwise have had to work with. And that lets us see what we can do next:

Now you can seea common factor: 3. We can "pull them out" of the fraction: 8*3 (2*2*2)3--- = -------* -9*5 (3)*53But 3/3 = 1, so all that's left is 8*3 (2*2*2) 8 --- = ------- = -- 9*5 (3)*5 15 That's the answer. What we call "cancelling" is really "pulling out" the same number in the numerator and denominator, making a factor of 1, as I did above when I pulled out a factor of 3/3.

All of this is what we’ve done in previous examples, without explicitly seeing it as “cross-canceling”.

Now we can talk about "cross-cancelling." Notice that the 3 in the numerator came from the 3 of 8*3, while the 3 in the denominator came from the 9 of 9*5. In other words, the 3 in the numerator was from the numerator of thesecond fraction, 3/5, while the 3 in the denominator was from the denominator of thefirst fraction, 8/9.

So in what we did, without having to notice it, we canceled the numerator of one with the denominator, canceling diagonally, and that is what is called “cross-canceling” – something that you don’t even have to notice in order to do.

Again, he did it the long way to demonstrate why it can be done. We can just imagine some of the steps, knowing what they allow us to do:

You don't need to write nearly as much as I did. You can just look at the problem 8 3 - * - = ? 9 5 andvisualize itlike this: 8 * 3 ----- = ? 9 * 5 Then look for common factors in one number of the numerator and the other number of the denominator. We see that 3 is a factor of both 3 (in the numerator) and 9 (in the denominator). Divide each of these numbers by 3 (on paper, you'd cross out the 3 and write a 1 above it, and cross out the 9 and write a 3 below it): 8*1 --- = ? 3*5 You can look again for other common factors. Do the 8 and 5 have a common factor? No. Therefore we're done, and the product is 8*1 8 --- = -- 3*5 15

Again, our work on paper would look like this: $$\frac{8}{9}\times\frac{3}{5} = \frac{8}{\underset{3}{\cancel{9}}}\times\frac{\overset{1}{\cancel{3}}}{5} = \frac{8}{15}$$

Do you seewhy it's called cross-cancellation? You look for common factors in these pairs: 8 3 \ / __ \/ __ /\ / \ 9 5 It's possible you mightfind common factors vertically, too - between the 8 and 9, or between the 3 and 5. But if you did, it would mean that the fractions you started with weren't in lowest terms.If the fractions are in lowest terms, then you only need to look for common factors in the "cross-terms."

By the way, students often ask about “cross-multiplication”, which is used in solving proportions, and also, with a quite different meaning, as a shortcut for adding fractions; and they confuse all of these with “multiplying across”, a term used for the basic idea of multiplying fractions, which goes straight across rather than diagonally. Because of all this confusion, I prefer not to use the word “cross” in most of these settings.

We’ll close with this 2008 question:

Canceling and Reducing When Multiplying Several Fractions I need help whenmultiplying three or more fractions. I know how to cancel diagonally when the fractions are right next to each other. I know how to cancel the numerator and denominator of a fraction, too. I have seen people cancel using the numerators and denominators that aren't near each other. How do they do that? Can youdouble cancela number? How do you keep it all straight then? Thanks a million for your help!

Doctor Ian answered:

Hi Renee, The key idea is thatmultiplication is commutative. Suppose you have something like 4 3 25 - * -- * -- 5 10 30 You can break everything into prime factors, 2*2 3 5*5 --- * --- * ----- 5 2*5 2*3*5 Now, to multiply fractions, we just multiply the numerators and denominators separately, right? So this is the same as 2*2 * 3 * 5*5 ----------------- 5 * 2*5 * 2*3*5

Again, we’re *seeing* it as one big fraction, even if we never write it that way!

So now, we'rejust reducing a fraction. And we can do that by identifying prime factors that appear in both the numerator and denominator: 2 * 3 * 5*5 ----------------- Cancel a 2 5 * 5 * 2*3*5 3 * 5*5 ----------------- Cancel another 2 5 * 5 * 3*5 5*5 ----------------- Cancel a 3 5 * 5 * 5 1 ----------------- Cancel two 5's 5 So the result of the multiplications is 1/5. Does this make sense so far? Remember that when you "cancel" two identical numbers you are making each number into 1. That's why there is a 1 left in the numerator after all the numbers that were there have canceled.

The key is that we can cancel matching factors **anywhere** in the numerator and the denominator. But we don’t have to write all the factors; as I showed above, we can just divide by common factors:

Here's how I'd do it in practice: 4 3 25 - * -- * -- Our original problem. 5 10 30 2 3 25 - * -- * -- I canceled a 2 from the 4 and the 10. 5 5 30 1 3 25 - * -- * -- I canceled a 2 from the 2 and the 30. 5 5 15 1 3 5 - * -- * -- I canceled a 5 from the 5 and the 25. 1 5 15 1 3 1 - * -- * -- I canceled the two 5's. 1 1 15 1 1 1 - * -- * -- I canceled a 3 from the 3 and the 15. 1 1 5 1 1 1 - * -- * -- Nothing left to cancel. 1 1 5 As I said, the key idea is that since the numerators and denominators are going to get multiplied anyway, it doesn't matter whether the common factors are next to each other, or far away. What I'm doing here is realizing that I really have one big fraction that I need to reduce, rather than three fractions that I need to multiply.

If we write this work out as one big pile, we see the “double cancellation” Renee asked about, where we cancel the result of a cancellation:

$$\frac{4}{5}\times\frac{3}{10}\times\frac{25}{30} = \frac{\overset{2}{\cancel{4}}}{5}\times\frac{3}{\underset{5}{\cancel{10}}}\times\frac{25}{30} =\\ \frac{\overset{\overset{1}{\cancel{2}}}{\cancel{4}}}{5}\times\frac{3}{\underset{5}{\cancel{10}}}\times\frac{25}{\underset{15}{\cancel{30}}} = \frac{\overset{\overset{1}{\cancel{2}}}{\cancel{4}}}{\underset{1}{\cancel{5}}}\times\frac{3}{\underset{5}{\cancel{10}}}\times\frac{\overset{5}{\cancel{25}}}{\underset{15}{\cancel{30}}} =\\ \frac{\overset{\overset{1}{\cancel{2}}}{\cancel{4}}}{\underset{1}{\cancel{5}}}\times\frac{3}{\underset{\underset{1}{\cancel{5}}}{\cancel{10}}}\times\frac{\overset{\overset{1}{\cancel{5}}}{\cancel{25}}}{\underset{15}{\cancel{30}}} = \frac{\overset{\overset{1}{\cancel{2}}}{\cancel{4}}}{\underset{1}{\cancel{5}}}\times\frac{\overset{1}{\cancel{3}}}{\underset{\underset{1}{\cancel{5}}}{\cancel{10}}}\times\frac{\overset{\overset{1}{\cancel{5}}}{\cancel{25}}}{\underset{\underset{5}{\cancel{15}}}{\cancel{30}}} = \frac{1}{5}$$

Renee replied,

Thanks a lot Dr. Ian! I actually understand the concept for the first time! Realizing that]]>it's all really just one BIG fraction comprised of prime factors- and you're actually reducing as you go along rather than just at the end...sure makes sense to me now. Whoaaa, you're good!

A good way to develop a sense of what limits are and how they work comes from working with visual representations of them, in the form of graphs. In particular when the functions are *defined* by graphs rather than by equations, we have a lot more flexibility in creating a problem, and can produce special cases that would otherwise be hard to create. Today’s question, from late February, is about a relatively obscure case, namely one-sided limits of a composite function.

Here is the question, from Drey:

Given the following graphs of g and h,

find the right side limit and left side limit of f(x) = (h o g)(x) in x = 1.Provided solution:

lim

_{x–>1}^{–}f(x) = -2lim

_{x–>1}^{+}f(x) = 0What I did:

f(x)=(h o g)(x) meaning f(x)=g(x)*h(x)

Analyzing the graph I can see that lim

_{x–>1}g(x) = 1 and lim_{x–>1}h(x) = 4. Could you give me tips on what should I do next?

The problem asks for the left-hand and right-hand limits of the composite function \(f=h\circ g\) at \(x=1\). Drey has correctly read the (left-hand) limits of *g* and *h* at 1 as 1 and 4; but he has misread the problem as to what *f* means, so the latter is irrelevant.

Drey had previously asked about some very different problems that involved limits of composite functions, for which Doctor Rick had provided a link to

The theorem stated there says,

Let \(f\) and \(g\) be real functions.

Let:

\(\displaystyle\lim_{y→\eta}f(y) = l\)

\(\displaystyle\lim_{x→\xi}g(x) = \eta\)Then, if either:

Hypothesis 1: \(f\) is continuous at η (that is \(l = f(\eta)\))

or:

Hypothesis 2: for some open interval I containing ξ, it is true that \(g(x) ≠ \eta\) for any \(x\in I\) except possibly \(x = \xi\)

then:

\(\displaystyle\lim_{x→\xi}f(g(x)) = \lim_{y→\eta}f(y)\)

That is, if either the outer function *f* is **continuous** at the relevant point, or the inner function is **non-constant** near the relevant point, the limit of the composite function is just the limit of the outer function evaluated at the limit of the inner function. We can safely just substitute: $$\lim_{x→a}f(g(x)) = \lim_{y→\lim_{x→a}g(x)}f(y)$$ (The link demonstrates the need for at least one of the hypotheses to be true. The second is true for our problem.)

Doctor Rick answered:

Hi, Drey.

Are this and your previous pair of limit problems from a course? There is a connection between them, in that I related those problems to a theorem about

limits of compositions of functions, and this problem also deals with limits and composition.The difference is that

the functions in this problem do not have (two-sided) limits at the relevant points, but only one-sided limits. It is not a big jump to see how the same idea can be used with one-sided limits; but we need to think carefully about which “side” of each limit we use.

We will be extending the previously stated theorem (or the thought that it embodies) to one-sided limits.

Before we can get there, however, it appears that you are confused about what a composition of functions

is. You sayf(x) = (h o g)(x) meaning f(x) = g(x)*h(x)

but this is what the

productfunction (hg) is, not thecompositionh ∘ g. The composition of h and g is defined as(h ∘ g)(x) = h(g(x))

for all x in the domain of g such that g(x) is in the domain of h.

Also you say that from the graph you find

lim

_{x–>1}g(x)=1 and lim_{x–>1}h(x)=4Did you really mean this? What I see is that for g, for instance,

lim

_{x–>1}^{–}g(x) = 1lim

_{x–>1}^{+}g(x) = 3Perhaps you meant to put in minus signs on both of your limits.

Drey found limits (actually one-sided) of both functions at \(x=1\), which would have been appropriate for the product function \(hg\), in which both are evaluated for the same input; for the composite function \(h\circ g\), we’ll be evaluating the limit of one at the limit of the other, rather than at the same place.

We often demonstrate how to solve a problem by solving a similar one, to leave the “patient” ready to do their own.

Now, in order to help you understand how to solve your problem, I’m going to solve a

differentproblem with the same functions. Let’s findlim

_{x–>1}^{–}(g ∘ g)(x)As I mentioned, this means

lim

_{x–>1}^{–}g(g(x))Looking at the “inside” function g, as x approaches 1

from the left, g(x) approaches 1from above— g(x) is greater than 1 to start with, and decreasing toward 1. And this g(x) is the argument of the “outside” function g, which therefore approaches 1from the right.Therefore, letting u = g(x), what we want is

lim

_{x–>1}^{–}g(g(x)) = lim_{u–>1}^{+}g(u) = 3Does that make sense? Give your problem a try based on this idea, and show me your work. Then I will see whether you are getting the idea, and if not, I might see what you are missing, so I can explain that part more carefully.

Here is a picture of what he did (observe that, because *g* is being used twice here, I am using two copies of the graph of *g*):

On the left, looking at the inner function *g*, the red arrow shows how *x* is approaching 1 from the left; following the broken red curve, we see that *y* decreases to 1 (the green arrow).

On the right, we see what is happening in the outer function *g*. There, the green arrow shows *x* (which was the *y* for the inner function) decreasing to 1, and following the broken green curve, we see *y* decreasing to 3 (the red arrow). So the limit is 3.

That is, as *x* approaches 1 from the left, \(g(x)\) approaches 1 from the right, and therefore \(g(g(x))\) approaches 3 from the right (from above).

Drey responded,

Hello Doctor Rick.

Yes, this and the previous pair of limits are part of a course.

I gave the problem a try and I managed to understand how to find

lim

_{x–>1}^{–}g(x) = 1lim

_{x–>1}^{+}g(x) = 3In order to find f(x) I did f(x) = lim

_{x–>1}^{–}f(u) where u = 1 from lim_{x–>1}^{–}g(x) = 1Well I don’t know how to explain it but the only value that goes to 1 in the x axis and seems to be decreasing is -2 so

lim

_{x–>1}^{–}f(u) = -2now for lim

_{x–>1}^{+}f(u) where u =3 from lim_{x–>1}^{+}g(x) = 3 so f(3) seem to be increasing as x approaches 3 so the result is 3.That’s what I got.

He has the right limits for the outer function in his problem, *g*. Then he actually gets the right answers, but appears to be guessing. We need to remove the guessing!

Doctor Rick answered,

Hi, Drey. You said:

In order to find f(x) I did f(x) = lim

_{x–>1}^{–}f(u) where u = 1 from

lim_{x–>1}^{–}g(x) = 1Well I don’t know how to explain it but the only value that goes to 1 in the x axis and seems to be decreasing is -2 so lim

_{x–>1}^{–}f(u) = -2You got the correct answer, but I cannot follow your explanation. I know, you

saidyou don’t know how to explain it — and it is indeed hard to talk about.

Let’s assume he had the right ideas, but needs help saying them. What are the parts of his explanation that don’t work?

First, f(x) is not a limit; it is just f(x) = (h ∘ g)(x). What you meant in the first line above is that you’re trying to find the

left-hand limitof f(x) as x approaches 1.When you then put f(u) in the limit expression, I don’t think f belongs there —

it ought to be h. Then you say, “where u=1”; that doesn’t make sense as it stands:we can’t put a fixed number there— something has to be varying. Likewise, we can’t say that -2 is a “value that goes to 1 …”; -2 doesn’t go anywhere!

We need to carefully distinguish limits from actual function values, and variables from specific numerical values. In part, this is why the terminology of limits was invented: to make it possible to talk about what the ideas of calculus mean!

So, how can we talk about this in a way that makes sense? Let’s try to find a way – we might be inventing some notation along the way.

We are evaluating

lim

_{x–>1}^{–}h(g(x))I don’t know if you’re being taught the limit theorem I showed you for the previous problems as a formal theorem or more intuitively, but the conclusion of that theorem said (using our function names) that

If lim

_{y–>η}h(y) = L and lim_{x–>}ξ g(x) = η, thenlim

_{x–>ξ}h(g(x)) = lim_{y–>η}h(y)This theorem needs to be

modified to deal with one-sided limits, by considering from which side each limit above is taken. We know that we want to find theleft-handlimit of h(g(x)) as x approaches 1, so the ξ above should be replaced by 1^{–}, and we start by finding (just as in my example)lim

_{x–>1}^{–}g(x) = 1But we need to know

from which sideg(x) approaches 1. As I noted in the example, as x comes in toward 1 from the left,g(x) comes down toward 1 from above. So let’s invent a notation as a way to say that:lim

_{x–>1}^{–}g(x) =1^{+}

We normally use the superscript sign only in stating what the input approaches (and from what direction). But this seems like a reasonable notation, as long as we keep in mind that “1^{+}” is not an actual number, but a description of a motion. It is what we will be writing in the limit statement to follow.

It is not uncommon that inventing a notation is a useful step in problem-solving. In George Pólya’s famous book *How to Solve It*, one piece of advice under the first step, *Understand the Problem*, is “Introduce suitable notation.” Doing so helps us to communicate with ourselves about the problem, and subsequently to others. The same is true of a picture or other graphic representation of the problem.

If we were writing a formal proof, we would probably make a precise definition of this notation; but in informal thinking, we just need to be sure we know what it means. As we’ll see, it is really a visual concept as we apply it to the graph.

Now we know that the limit of h that we need is as y = g(x) approaches 1

from the right(1^{+}):lim

_{y–>1}^{+}h(y) = ?Looking at the graph of h(x), we see that as x (the argument of h as shown on the graph)

approaches 1 from the right, the curvecomes down to the limiting value of -2. Thus,lim

_{y–>1}^{+}h(y) = -2and we have

lim

_{x–>1}^{–}(h ∘ g)(x) = lim_{y–>1}^{+}h(y) = -2That’s the answer you got!

Here is a picture of what we’ve done here, like the picture above (this time including the two different functions):

As before, on the left, looking at the inner function *g*, the red arrow shows how *x* is approaching 1 from the left; following the broken red curve, we see that *y* decreases to 1 (the green arrow).

On the right, we see what is happening in the outer function *h*. There, the green arrow shows *x* (which was the *y* for the inner function) decreasing to 1, and following the broken green curve, we see *y* decreasing to -2 (the red arrow). So the limit is -2.

That is, as *x* approaches 1 from the left, \(g(x)\) approaches 1 from the right, and therefore \(h(g(x))\) approaches -2 from the right (from above).

now for lim

_{x–>1}^{+}f(u) where u =3 from lim_{x–>1}^{+}g(x) = 3 so f(3) seem to be increasing as x approaches 3 so the result is 3.Again, it doesn’t make sense to say that f(3) increases – f(3) is just a fixed number. But using my notation, we want to find

lim

_{x–>1}^{+}h(g(x))so we first find

lim

_{x–>1}^{+}g(x) = 3^{+}(because, on the graph of g(x), as x comes in toward 1 from the right, the curve comes

downtoward 3). Thus the last step islim

_{y–>3}^{+}h(y) = 0which is

notwhat you got. Perhaps you didn’t see that g(x) approaches 3 from above, so that the y above approaches 3 from the right. If you thought that y approached 3 from the left, then you also didn’t notice that on the graph of h(x), h(y) increases toward some unspecified limit (maybe infinity?) as x approaches 3 from the left.These are tricky. I hope you have another problem like this that you can show me, with your work, so we can see if you have gotten the idea yet.

Again, here is a picture:

On the left, the red arrow shows how *x* is approaching 1 **from the right**; following the broken red curve, we see that *y* decreases to 3 (the green arrow).

On the right, we see what is happening in the outer function *h*. There, the green arrow shows *x* (which was the *y* for the inner function) decreasing to 3, and following the broken green line, we see *y* decreasing to 0 (the red arrow). So the limit is 0.

That is, as *x* approaches 1 from the right, \(g(x)\) approaches 3 from the right, and therefore \(h(g(x))\) approaches 0 from the right (from above).

We now have both a written notation and a visual procedure for solving these. Drey didn’t reply again (to this thread), so we trust that it worked.

]]>

Our first question, from Rizwan in 1998, focuses on language:

Multiplying by 1 Dear Dr. Math, My question is as follows:Multiply means increase in number. When 1 is multiplied by 1, the answer is 1. The answer is 1. Why is it? Each one independent unit is being multiplied butthe number is not increased. Looks erratic to me. Please define.

Doctor Rick answered:

Hello, Rizwan. This is an interesting question, andI can make it seem even stranger. Not only can you multiply by 1 and the resultdoes not increase, but you can also multiply by 1/2 and the result issmaller.

As we’ll see, most people ask this larger question, rather than Rizwan’s tame question about the case where it merely fails to increase!

If you look at the original meanings of words, the same problem arises with the word"add". It comes from the Latin "addere" meaning "to give to." Yet I can add a negative number, with the result that something is actuallytaken away. I think the same sorts of problems will arise in any language, and in other disciplines besides math. A word that means one thing in everyday language will have a somewhatdifferent meaning, or avery specific and specialized meaning, in math or physics or economics or another specialized field of study. When people have a new idea or invent a new product, sometimes they invent an entirely new word to identify it. But sometimes they just use an existing word that has a similar meaning. For instance, an electrical current is like a current in a river, but it is not exactly the same.

This is the nature of language! Words grow into bigger meanings than they started with (or narrow down). As “add” in Latin (addere) meant “to join, attach, place upon”, from roots meaning “to give to” (see here), so “multiply” (multiplicare) in Latin meant “to increase”, from roots meaning “having many folds, many times as great in number” (see here). And, of course, “be fruitful and multiply” never meant “become fewer”! But it came to mean something far broader, while still being used with its original sense as well.

The basic words of math like "multiply" and "add" were adapted from everyday life long ago. Back then, concepts like negative numbers and even zero had not been developed. People would really only think in terms ofmultiplying by positive whole numbers. And why bother to multiply by 1? It doesn't do anything. So the use of the words made sense. But mathematicians gradually extended the meanings of the words. Not only can you multiply fractions or negative numbers, you can multiply matrices or numbers in modular arithmetic, where the idea of one number being greater than another is meaningless.

I talked about some of this in my post What is Multiplication … Really? (This also includes comments about repeated addition, which will come up soon.)

The things that we call "multiplication" today have a lot in common with simple multiplication by an integer greater than 1, soit makes sense to use the same wordfor them. Why invent a new word just because the original narrow meaning of the word doesn't fit any more? In short, the problem that you have raised is a reason for the existence of specialized dictionaries of science and technology. If you look up the meaning of a word in a dictionary of everyday language and try to apply the definition to the way the word is used in a specialized field like math, you will often only get confused. Just use a word the way it is defined in the field you are working in, and don't worry about what it means in everyday life.

Sometimes speakers of another language try to translate their math terminology into English using an ordinary dictionary (or Google’s similar attempted translation) can stretch our minds trying to see what term they are trying for. Usually I can see the connection and work it out; but it can lead to interesting reflections on word choices. Language is almost as “interesting” as math …

The next question, from Jen in 1997, starts with the initial *concept* of multiplication, rather than the mere *word*:

Multiplying Fractions Since we have defined multiplication asrepeated addition, how is it possible that when you multiply two fractions, the product issmallerthan either of the fractions?

It is common to introduce multiplication to children as repeated addition, as for example \(3\times 4\) means that we add 3 4’s \((4+4+4=12)\), or add 4 3’s \((3+3+3+3=12)\). A few years ago there was a lot of discussion about whether this definition should be taught at all, because it really only applies to natural numbers, and needs to be replaced with a more general definition as soon as a child gets beyond that. This question illustrates the problem.

Doctor Ken answered, using one alternative definition that extends more easily to fractions:

Hi there - Perhaps a more useful way to think of multiplication is to use the words "groups of." For instance, when you have 4 x 5, think of it as "4 groups of 5". We can write that out as 5 + 5 + 5 + 5, and add it up to get 20. If we have 1/2 x 2, then we think of it as "half a group of twos", so our total is 1. If we have 1/3 x 1/4, then that's one-third of a group of 1/4ths, and maybe this will make more sense to you. One-third of a positive number is always smaller than the original number was. That's one way to make sense of the equation 1/3 x 1/4 = 1/12.

There was no reply, so we don’t know whether this did make sense to Jen; often it takes some discussion, because it does stretch the mind a bit! If you’re still unsure, read on – one benefit of having many Math Doctors is that they can offer different perspectives, which work for different people.

Next, a similar question from Carolyn in 2001, this time about decimals rather than fractions:

Multiplying by a Decimal Number I am having trouble understanding why multiplying by decimal numbers givesa product smaller than the factors. For example, 5 * .43 = 2.15. I just always thought that multiplying would make the product bigger than the numbers I used.

In this example, the product is smaller than 5 (though larger than 0.43); we’ve multiplied 5 by a number less than 1, which is the key. (In some problems, the result is smaller than *both* factors, as in \(0.5\times 0.4 = 0.2\).)

Doctor Rick answered:

Hi, Carolyn. When you only knew aboutwhole numbers, you could make a rule like the one you stated - but not quite! Even when you only knew about whole numbers, there was one exception to your rule:multiplying by 1does not make a number bigger. When you addedzero, that was another exception. If you multiply by a numbergreater than 1, the product will be greater than what you started with. If you multiply by1, the product is the same as what you started with. If you multiply by a numberless than 1, the product is less than what you started with.

There is the key concept. Once you have decimals, and then negative numbers, you have lots of numbers that are not greater than 1, so there are far more exceptions to the initial “rule”.

But still, **why** do we now get a smaller number?

Let's make some sense of this by considering a simple example.Multiplying by 1/2is the same asdividing by 2. Do you understand this? Multiplying by 1/2 means taking half of it; dividing by 2 means cutting it in two pieces and keeping one. These amount to the same thing. Since 1/2 = 0.5, andhalf of something is less than the whole, it makes sense that multiplying a number by 0.5 makes it smaller.

Fractions make it easy to see what is happening; decimals are just a different way to represent a fraction.

Observe that what he said here is closely related to the fact that adding a negative number (adding \(-2\), say) is the same as subtracting its opposite (subtracting 2), which we know decreases the number.

And just as introducing negative numbers changes the nature of addition, turning addition and subtraction into varieties of the one operation, addition, so introducing fractions changes the nature of multiplication, combining it with division into what amounts to a single operation that can both magnify and reduce a number.

Jumping ahead to 2012, we have this question from Justine, digging deeper into the question of decimals:

Multiplication Makes It ... Smaller?! Hello! My question is, when you multiply with adecimal that is smaller than 1, why does it give a smaller product? For example: 2 x .5 = 1 And 500 x .25 = 125Isn't multiplying supposed to give a larger product?My dad says 2 x .5 = 1 is the same as 2/2, which is also 1.Why is multiplying by .5 the same as dividing by 2?He tries to explain it to me, but I just can't seem to get it! Related to my question, I think, is when someone says "25% off of 50." That means you don't have to pay the .25. So you can do 50 x .75 = 37.5 I don't understand why, though. When you get 25% off something, that means you get it for a smaller price ... but yet I multiplied? That is kind of strange to me. Please reply back because this has been bugging me lots. Thanks!

I answered this time:

Hi, Justine. When you multiply a number by 2, you get a bigger result. That's what you're used to until now. When you multiply by 1, what do you get? The same number, right? Multiplying bya number GREATER than 1makes it bigger; multiplying by 1 leaves it the same; and, continuing the pattern, multiplying bya number LESS than 1makes it smaller. For example, multiplying a number by 1/2 cuts it in half, making it smaller. Multiplying by 0.5 is the same thing.

This is what Justine has observed; but **why**? I suggested another alternative interpretation of multiplication:

In general, you can think of multiplication asscaling, which can make something either larger or smaller,scaling up or scaling down. Multiplying by 3 scales up: 0 1 2 3 +-----+-----+-----+ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ | \ \ \ +-----------------+-----------------+-----------------+ 0 3 6 9 Thisenlargementturned 1 into 3. Multiplying by 1/3 scales down: 0 1 2 3 4 5 6 7 8 9 +-----+-----+-----+-----+-----+-----+-----+-----+-----+ | / / / | / / / | / / / | / / / | / / / | / / / | / / / | / / / | / / / | / / / | / / / +-+-+-+-+-+-+-+-+-+ 0 1 2 3 Thisshrinkingturned 1 into 1/3, and 3 into 1. Notice that multiplying by 1/3 undoes a multiplication by 3; it divides by 3.

Multiplying by some number *k* turns 1 into *k*, and either stretches or compresses the whole number line proportionally. Multiplying by 3 makes everything 3 times as big; multiplying by 1/3 makes everything 1/3 as big, which is smaller, just as 1/3 is smaller than 1.

Justine replied,

Thanks so much! Your answer really cleared up my confusion. So now I won't get bugged by this question anymore.

Sometimes a picture says more than words can.

I realized in writing this that I never did answer the last part of Justine’s question, about “25% off of 50.” There, we are actually doing two things: *multiplying* by 25%, or 0.25, to find the amount of the discount (25% of 50, which is 12.5), and then *subtracting* that from the starting number, 50: \(50-12.5 = 37.5\). It’s really that subtraction that reduces the amount (though the multiplication has to result in a smaller amount, or we’d end up going negative!)

The shortcut she used, subtracting 25% from 100%, works because the whole process involves subtracting 25% of 50 from 100% of 50, which leaves 75% of 50: \(0.75\times 50=37.5\). This can also be explained using the distributive property from algebra, as \(50-0.25(50) = 1.00(50)-0.25(50)=(1.00-0.25)(50)=0.75(50)=37.5\).

Now let’s turn to the other side of the question, with this from Emily in 2001:

Is Division Sharing? Hi, Dr Math, Why when I do a fraction division (e.g. 1/2 divided by 1/2 = 1) is the answer bigger than the first fraction in question (i.e. 1/2)?Shouldn't division mean sharing, so logically the answer is smaller than the first fraction? Thanks, Emily

Emily is probably picturing one particular “model” (use) of division, in which dividing 6 by 2 means asking how much of the 6 goes to each of 2 people. (This is also called **partitive**, or **sharing**, division, finding the size of each of 2 parts; another model is **quotative**, or **measurement**, division, which asks how many parts you get if each part has 2 items out of the 6; both of these uses of division, *as long as we use whole numbers*, expect the result to be smaller than the given numbers. For more on these terms, see toward the end of my post, Dividing Fractions: How and Why.)

Doctor Ian answered, again offering a more general model:

Hi Emily, It's not strictly true that 'division means sharing'. In fact,division is just another way of looking at multiplication. For example, all of the following are just different ways of saying the same thing: 3 times 4 equals 12. 4 times 3 equals 12. 12 divided by 3 equals 4. 12 divided by 4 equals 3. It's sort of like looking at this picture, /\ / \ / \ +------+ | | | | +------+ and knowing that both of the following descriptions The triangle is above the square. The square is below the triangle. are equally true, since they are really just different ways of saying the same thing.

So division is just looking at a multiplication backward, asking what one of the factors is. Technically, it is the **inverse** of multiplication.

In other words, whenever it is true that a * b = c it must also be true that c / a = b and c / b = a (unless either a or b is zero, in which case all bets are off). That's what we _mean_ by division.

(Unintentionally, this ties in with last week’s new question, which involved why division by 0 is undefined.)

Now, let's think about what this means for division by 1/2. If c / (1/2) = a then it must be true that c = a * (1/2) which means that a must be _larger_ than c.

We can think of this in terms of sharing; if we divide 5 by 1/2, for example, using the quotative model we might be asking how many people we can divide 5 apples among, if each gets half an apple. When we cut each apple in half, we end up with 10 halves, which we can share among 10 people: \(5\div\frac{1}{2} = 5\times 2 = 10\). It’s harder to think of this in terms of partitive division, which would mean asking how much to put in “each pile” if we want to make 1/2 a pile. There are problems in which that would make some sense; but it’s better to just think in terms of what division is, as the inverse of multiplication.

Thinking about division as 'sharing' is one way that teachers try to make the concept simpler for students to understand. But it's important to realize that these simplifications usually lead you in the wrong direction once you start looking at things more carefully.

Just as words “grow up” and take on broader meanings, our understanding of a concept may have to grow up, to accommodate those new meanings.

We’ll look at one more question, from Jen in 2003:

How Can Division Result in an Increase? What is the logic behind dividing an integer by a decimal and getting a larger number? For example, 100 / 0.9185 = 108.87 I just can't understand the logic! It seems like the answer should be a smaller number.

Doctor Ian answered again:

Hi Jen, Well, remember thata decimal is just a fraction. For example, 0.23 = 23/100 0.1542 = 1542/10,000 and so on. So what happens when wedivide by a fraction? We multiply by the reciprocal: 8 3 ----- = 8 * - 2/3 2 So if we divide by something where the denominator is smaller than the numerator, we'll end up multiplying by something where the numerator is larger than the denominator. Does that make sense?

In other words, dividing by a number less than 1 means the same as multiplying by a number greater than 1, which results in a larger number.

That was the abstract view. Since students commonly see things better concretely, we can turn to a model:

Here's another way to think about it, using the idea that division meansbreaking things into pieces. Suppose I have something 6 inches long, and I divide it into pieces that are 2 inches long. How many pieces do I get? 1 +----+----+ +----+----+ +----+----+ | | | | | | | | | +----+----+ +----+----+ +----+----+ 6 / 2 = 3

This is the **quotative** model I mentioned before, in the form of **measurement**.

Okay, now what if I divide it into pieces that are only 1/2 inch long? I'm going to end up with 12 pieces, right? 1 - 2 +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ | | | | | | | | | | | | | | | | | | | | | | | | +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ 6 / (1/2) = 12 So we divided by something less than one, and ended up with more than our original result.

How many pieces we get increases when the pieces are smaller.

We always need to come back to the general definition, which is abstract:

But the clearest way to see the logic of this is to remember what we _mean_ by division. That is,a division is just another way of representing a multiplication. For example, when we say that 3 * 4 = 12 two other ways to say exactly the same thing are 12 / 3 = 4 and 12 / 4 = 3 So suppose we have something like 6 / (1/2) = ? This is the same as saying that 6 = ? * (1/2) Now, if this is true, then the value of '?' had better be larger than 6, right?

Again, since multiplying by a number less than 1 results in a smaller number, the unknown factor here has to be larger. Our two questions in this post, about multiplication and division, end up being one question.

]]>A set is **closed under an operation** if, whenever that operation is applied to two elements of the set, the result is still an element of the set. It’s straightforward … until you look closely at some details! In the course of the discussion, we’ll dig into different definitions for division, and subtleties in the definition of closed sets.

We got this question from an algebra tutor, Michael, in late February:

I have a question about the

closure of setsunder different operations, dating back to something I saw in an old Modern Algebra textbook. The problem asked to statewhether the set {0} is closed under each of addition, subtraction, multiplication, and division.So, clearly it’s closed under addition, subtraction, and multiplication, but

what about division?The answer given in the textbook says that it isnot closed because 0÷0 is undefined. That was my first inclination as well, but when I thought about it some more, I found a more fundamental confusion. When a nonzero dividend is divided by zero, the answer does not exist. Butwhen the dividend is zero, the answer is indeterminate. So, if my replacement set is a singleton set consisting of 0 only, does that not resolve the issue of its indeterminacy?I asked another math teacher, who responded that because 0÷0 is indeterminate, it could equal a number that is outside the set. I understand that issue, but it doesn’t resolve the question for me. Seems to me, if the domain under consideration contains one unique value that satisfies the operation, then

whatever other values which exist outside of that domain are irrelevant.Is there something more fundamental to the definition of closure that I’m misunderstanding here? Or am I correct about this?

Thanks,

Michael

A set A is closed under an operation * if, for any two elements *a* and *b* of A, *a* * *b* is an element of A. For example, the set of positive integers is closed under addition because the sum of any two positive integers is still a positive integer. I think of it as saying that you can’t “escape” from the set using the operation. Here, we are asking about an unusually small set, the set consisting of only the element zero. Since \(0+0\), \(0-0\), and \(0\times 0\) are all zero, it is closed under addition, subtraction, and multiplication. But what about division?

For information about indeterminate expressions, which we’ll be discussing further, see

Zero Divided By Zero: Undefined and Indeterminate

Doctor Fenton answered first:

Hi Michael,

If I use the letter S to denote one of the standard number systems, i.e. the natural numbers N (which includes 0 for this discussion), the integers Z, the rationals Q, the reals R, and the complex numbers C, all of the operations (

addition,subtraction, andmultiplication) are defined asfunctions on the Cartesian productS×S into S. However,divisionis defined, for Q, R, and C, not by a function on S×S, but only onS×(S – {0}), by(x, y)→x/y = x * y, where * denotes multiplication and y^{-1}^{-1}is the multiplicative inverse of y. The multiplicative inverse is only defined on S – {0}.The element (0, 0) belongs to each of N, Z, Q, R, and C, and the corresponding operation on {0}×{0} is just the

restriction of that operation on S. But (0, 0) does not belong to the domain of the division function on Q, R, or C, so it is very different from the other operations. So while you could define a function from {0}×{0}→{0} and call it “division”, to me that would bemisleading, since it suggests that it is also a restriction of an operation on the other number systems.Actually, there is only one possible binary operation on {0}×{0}→{0}, and it has already been called addition, subtraction, and multiplication. You can give it as many names as you like, but what’s the point?

In case you are not familiar with all the notation used here, the Cartesian product \(A\times B\) means the set of all ordered pairs \((a,b)\) where *a* and *b* are elements of A and B, respectively. Addition, subtraction, and multiplication are all defined for any pair of numbers; so, for instance, when we define them on the integers, \(\mathbb{Z}\), they are defined as functions from \(\mathbb{Z}\times\mathbb{Z}\) to \(\mathbb{Z}\). But division does not allow *b*, the second argument, to be zero, so it is only defined on \(\mathbb{Z}\times(\mathbb{Z}-\{0\})\), which excludes pairs like \((4,0)\) or \((0,0)\).

And division is defined as multiplication by the reciprocal, or multiplicative inverse (except for integers, where the reciprocal is not defined, so a different definition is needed, which applies only to certain pairs – we’ll get to that later). The multiplicative inverse of a number *a* is the number *b* such that \(ab = 1\); that is, \(b = \frac{1}{a}\). There is no reciprocal for 0, so we can’t divide by it.

When we use an operation on a subset of any other set (e.g. addition on the positive integers, a subset of the integers), the resulting operation is a **restriction** of the operation as defined on the larger set – we don’t redefine addition of positive integers to be something different from what it is on all integers, but use the same operation while restricting it to elements of the subset. The operation of addition that we say is closed on the positive integers is the same operation we talk about for integers, just restricted to our smaller set.

I had been thinking about the question, but wanted to let others answer before adding my thoughts, which focused on his mention of indeterminate division, and which were aimed a somewhat lower level.

I intentionally held off on answering this question, expecting Doctor Fenton (or anyone) to have some good ideas by looking at the big picture, which I might miss. I was right. I’ll now offer my thoughts, which reflect some of the same ideas but at a more basic level.

First, the question,

State whether the set {0} is closed under each of addition, subtraction, multiplication, and division,

implies that we are thinking of this as a

subsetof the integers, or real numbers, or something, and therefore toinherit the standard operationsfrom those larger sets. We are not thinking of creating from scratch an operation to call “division” on the new set.

“Inherit” is not quite a standard term for this (Doctor Fenton’s term, “restriction”, is more accurate), but I think it conveys my idea well: though we are looking at a smaller set, we keep the same meaning for the operation, rather than inventing a new meaning for the same name.

Second, the fact that 0/0 is

indeterminateis really just a particular reasonnot to defineit: not because there isnoappropriate result, but because there aretoo many. Your thought that in the subset we no longer have “too many”, so we could say the answer is 0, is interesting, but misses that fact that the division operation we are inheriting isnot defined. You are implicitly defining anewoperation on the subset, which is not the same as division.

That is, division by zero, whether the dividend is zero or not, is undefined. As explained in the blog post referred to above, something like \(1\div 0\) is undefined because there is *no* number *x* such that \(1 = 0\times x\), and thus no candidate for the role of quotient, while \(0\div 0\) is undefined because for *any* number *x*, \(0 = 0\times x\), so there is no *unique* quotient – too many job applicants to be able to pick one. In either case, we don’t define the division.

Observe also that here I am using a different definition of division than Doctor Fenton used, since his doesn’t apply to integers, as he mentioned. In any case, since the “inherited” operation that we are “restricting” to this set is not defined for 0, there is nothing to inherit!

Michael’s idea is interesting, however: He was saying that if we define division *within the set* \(\{0\}\) as the inverse of multiplication, then there is only one number you can multiply by zero to get zero (namely the only number we have, zero!), division is no longer indeterminate, and we can choose to define it! Nevertheless, we have to return to the basic idea:

Third, this is the essence of the closure concept: A

subsetis closed under an operationdefined on the entire setwhen its application on a subsetalways yields an element of the subset. Since division by 0 (in any case) does not yield zero, the subset is not closed. Again, the key idea is that we have to be talking aboutthe operation on the containing set, not redefining it.So, good ideas, but the book had it right.

Again, these are mostly just different ways to say the same things Doctor Fenton said, but focusing on integers, which is where the idea of division as indeterminate is commonly introduced.

Michael responded, first to Doctor Fenton:

Thank you Doctor Fenton,

I think I see. The operation of division (and the others too, for that matter)

requires the context of a number systemin order to define it. Zero in a domain by itself still retains that context. As you put it, the operation of division is S×(S – {0}) for any of them.I was getting stuck on side-stepping the idea that y

^{-1}does not exist for this set by defining (x, y)→x/y = a, where * denotes multiplication anda is the unique solution to a * y = x. At first this reasoning seemed compelling to me, but the y^{-1}not existing remains a problem, relating to the more general number system issue as indicated above.

Well said. The second paragraph relates to the alternate definition I used for integers. That is what we will be focusing on moving forward.

Then he answered me:

Thanks again Doctor Peterson,

I was coming to this understanding just as you were typing up your own response. Much appreciated!

Then he continued with a third response:

One more thought on this. I’ve traced my earlier confusion back to

different definitions of divisionthat were printed in separate editions of the Dolciani texbook.In the 1962/65 edition, the division operation is defined as the

product of the dividend with the reciprocal of the divisor.In the 1978 edition, the quotient is defined as the

number whose product with the divisor is the dividend(albeit, only for nonzero divisors). “If b is not zero, the quotient a ÷ b is defined to be the number x whose product with b is a.”I believe the earlier edition is more mathematically correct.

“The Dolciani textbook” refers to one of several textbooks written in the 1960’s (my own school days). You will notice that the first definition is Doctor Fenton’s, while the second is the one I used, which applies to all types of numbers, including integers.

I suspect, from the earlier mention of “an old Modern Algebra textbook”, that he is referring to the book “Modern Algebra: Structure and Method”, and not, as I might have expected, a book on abstract algebra, which is often described as “modern algebra” in textbook titles, at which level the notations used by Doctor Fenton are more typically found. I wish I had access to the book so I could check the context of the question more fully.

Actually, upon a more careful reading of the 1962 passage, it uses the same wording as the 1978 edition, buried in the paragraph, and the specifics of this definition are beside the point anyway. Both editions say, as a first condition, that

division is not defined when the divisor is zero, and it’s quite clear that there is no number system for which it could be defined, as per your explanation.Thanks again for shedding light on this matter for me.

I answered, explaining about the difference in the definitions, after checking one good source to see what definition they use:

You may have noticed that Doctor Fenton said,

division is defined

for Q, R, and C, … by (x, y)→x/y = x * y^{-1}, where * denotes multiplication and y^{-1}is the multiplicative inverse of y.Since the integers,

Z, do not have a multiplicative inverse, that definition is not applicable. The definition of division in MathWorld is the more general one:Division is the inverse operation of multiplication, so that if

a×b = c,

then a can be recovered as

a = c÷b

as long as b ≠ 0. In general, division by zero is not defined since the ability to “invert” a×b = c to recover a breaks down if b=0 (in which case c is always 0, independent of a).

So as you say,

the end result is the same either way.

Wikipedia, though it has a more complicated treatment that I couldn’t as easily quote, defines it similarly, starting with division of natural numbers. It’s worth observing that the fact that integers lack a multiplicative inverse is related to the fact that the integers (or natural numbers) are not closed under division.

Michael wrote back, offering a variation of the MathWorld definition:

I went over this exercise with my student last night, and it was great to have a well-thought-out answer to the question she’d raised last time.

I’m still puzzling a bit over how the definition of division works, referring specifically to

Z(and similarlyN_{0}) as mentioned above. Perhaps I’m wrong, but it seems to me that this boils down to a subtlety in that definition.Definition 1: (My prior understanding.)

Division is the inverse operation of multiplication, so that if

a×b = c,

then a can be recovered as

a = c÷b

as long as a exists and is unique. In general,division by zero is not definedbecause…Definition 2: (The true definition?)

Division is the inverse operation of multiplication, so that if

a×b = c,

then a can be recovered as

a = c÷b

as long as b ≠ 0. In general,division by zero is not definedbecause…So this boils down to 2 questions.

1)

Is the b = 0 case excluded no matter what by definition, or by virtue of the fact that the definition requires the quotient toexist and be unique? (And yes, I’m aware I altered the explicit wording appearing on MathWorld.)2)

Does this distinction even matter, insofar as my original question is concerned, or is the overriding consideration in the definition of number systems and/or closure for sets that would override my belief that, by Definition 1 for division, my original assumption would have been correct. (For instance, as a subset of the number systemN_{0}, other solutions may exist, even though they are not in our subset, so therefore we cannot say it’s closed.)Not to be beating a dead horse, but I’m really trying to get to the very bottom of this question.

Thank you,

Michael

The second version of the definition is what I had copied from MathWorld. The first changes how the condition for the existence of the quotient is stated.

I replied,

First, I agree with your Definition 1;

“exists and is unique” is a central part of the definition. The Definition 2 is just what I found to quote, not necessarily what I prefer in this context.There is no difference in the implications, which means they are

equivalent definitions. The difference is only that the former isclearer on the reason for the restrictionto b ≠ 0, which you have explained rather than just stating.I’m assuming you are using

N_{0}to mean the non-negative integers, sometimes calledZ*.

Notation for natural numbers and related sets varies considerably; I find **N**_{0} included in Wikipedia here, and other symbols in MathWorld here.

Answering the first question, about why *b* = 0 is excluded:

Starting with your Definition 1, b = 0 is excluded when a ≠ 0 because c

doesn’t exist, and when a=0 because itis not unique. For that reason, when we just want to state the definition without defending it, we can just say b ≠ 0.

That is, the reason given explicitly in the first can be taken as the reason for making the restriction without explanation in the second.

As to the second question, about whether this is relevant to the original question about {0},

I think the overriding factor is simply that in talking about closure, we are talking about the operation

as defined in the superset. As Doctor Fenton said, “the corresponding operation on {0}x{0} is just therestrictionof that operation on S”, or as I said, we “inheritthe standard operations from those larger sets”. (His term is better than mine.)To put it another way, by

eitherof your two definitions,division by 0 is never definedon the superset, whatever that may be, so it still isn’t defined when we focus on the subset. As an example, in group theory, a subgroup is a set that is closed under the group operation, not under someother operationyou invent for the subgroup.

We also talk about closure of an operation on a group (or other algebraic structure) that is not inherently a subset; in those cases, it just means that the operation is defined (as an element in the set) for every pair. But that is not what is involved in our question, because we come to {0} already knowing what division means.

He concluded:

Got it. So the “inherited” definition, both in terms of the requirements it specifies and the numbers to be considered under those requirements, remain in the realm of the superset number system. Makes sense, the more that I think about it. Otherwise, the numbers themselves as well as the operations would lose their meaning.

A good conclusion.

]]>

The first question is from 2002:

Transformation between (x,y) and (longitude, latitude) Dear Dr. Math, I have two questions on the transformation between (x,y) and (longitude, latitude). 1. Given 2 positions in terms of longitude and latitude, say, (a1, b1) and (a2,b2) with the distance between them very small, say, within 10 meters, I would like to know if there are any methods that cancompute their separation with the best accuracy. I converted the (a,b) to (x,y) using the following formulae: x = R*cos(a)*cos(b) y = R*cos(a)*sin(b) where R is the earth radius. The distance is calculated as the square root of (x1-x2)^2+(y1-y2)^2. Please comment on my method. 2.I have a digital mapgiving the four corners in terms of longitudes and latitudes, say, (a1,b1), (a1,b2), (a2,b1), (a2,b2). I would like to knowhow to compute the (x,y) of a particular point in the map. Thank you very much.

Hing is apparently thinking that transforming coordinates on earth to \((x,y)\) coordinates on a map will allow reasonably accurate distance calculations on the map; that’s true, but the reality is that there are different map “projections” that might be used on his map, and his formula is not appropriate for a map anyway. We’ll be focusing on a particular projection that is appropriate for short-range distance calculations, rather than dealing with what his existing map might be.

Doctor Rick answered:

Hi, Hing. I'll respond to each of your questions after stating the question: (1) A distance of 10 meters is *very* small compared to the radius of the earth, sowe can definitely use a flat-earth approximation. Your formulas give the coordinates of the projection of a point onto the plane on the Greenwich meridian (longitude = 0). This is not what you want; you really want toproject the point onto a plane parallel to the surface of the earthin the vicinity of the points of interest.

I think Hing’s formula has longitude and latitude swapped; then it gives the *x*– and *y*-coordinates, in effect projecting a point *onto the plane of the equator* (\(z=0\)); in any case, it is not what is needed unless you are at the pole. Here is my interpretation:

Instead, we want to project points near P *onto the tangent plane at P*, with axes parallel to the lines of latitude and longitude at P:

I find it easiest to think a little differently. For the y coordinate, we can use the north-southdistance between two lines of latitude: y = R*(b2-b1)*pi/180 Here, I have converted the latitude difference, (b2-b1), from degrees to radians, by multiplying it by (pi radians)/(180 degrees). The product of the angle in radians and the radius is thearc lengthin the same units as the radius.

This will represent lines of latitude (“parallels”) as parallel horizontal lines, and vertical distances as **arc lengths along lines of longitude**. On the common conic projection used for small regions, lines of latitude turn out as circular arcs. We are here inventing the simplest possible local projection.

For the x coordinate, we can use thedistance along a line of latitudefrom one line of longitude to the other: x = R*(a2-a1)*(pi/180)*cos(b1) Here we have an additional factor, the cosine of the latitude along which we are measuring. Theline of latitude is a circle with a smaller radiusthan that of the equator; it is reduced by the factor cos(b1).

Lines of longitude will be represented as vertical lines (which on a conic projection would be slanted), and horizontal distances as **arc lengths along the line of latitude through the first point**, whose radii are \(R\cos(lon_1)\):

Thus, you see that I have set up a coordinate system (x,y) that puts one of the points of interest at the origin. The distance from the origin to any other point (x,y) is the square root of (x^2 + y^2).

So our formula for distance from \((lon_1,lat_1)\) to \((lon_2,lat_2)\), with angles in degrees, is

$$x = \frac{\pi R}{180}(lon_2-lon_1)\cos(lat_1)\\ y = \frac{\pi R}{180}(lat_2-lat_1)\\ d = \sqrt{x^2+y^2}$$

(2) We'd have to know the particularprojectionused in the map in order to be completely accurate: is it a Mercator projection, for instance? If the scale is small enough (as I assume based on the context of the first question), I would assume it's fairly linear over the region of the map. Then, if you want x to vary from 0 to w and y to vary from 0 to h (with the origin at the bottom left), the coordinates of a point (a,b) are x = w*(a - a1)/(a2 - a1) y = h*(b - b1)/(b2 - b1) That's just a simple linear transformation. Again, it assumes that the map covers a small area. If you're asking something more complicated than this, please try again to explain it.

Many “digital maps” use a simple version of the Mercator projection. As a conformal map, this is appropriate for use at small scales, because shapes and angles are preserved. That makes the suggestion here more or less reasonable.

A 2004 question about that answer was added to the page:

I'm developing a digital map that encounters the same problem but the range is bigger. Thearea of the map is around 50 km^2. Could the formulas: x = w*(a - a1)/(a2 - a1) y = h*(b - b1)/(b2 - b1) be applied here? What is the accuracy factor in this case?

In other words, can we still assume that map is linear (as if the earth were flat) for this larger scale? A square with area 50 square kilometers will have sides approximately the square root of that, namely about 7 by 7 kilometers, less than 5 miles wide and high.

Doctor Rick answered,

Hi, Bryan. I think a linear scaling will be fine for a map withmaximum distances less than 10 miles, as your area suggests. It is hard to give a formula for the maximum error, but the following page from the Dr. Math Archives has a table that will help: Planar Approximation: Latitude and Longitude http://mathforum.org/library/drmath/view/62720.html

We’ll be looking at this page in a moment.

Of course, the map has to be made correctly in the first place, if we are to correctly locate points within it:

There isone assumption I didn't mentionwith the linear scaling formula: it assumes that the latitudes and longitudes at the corners of the map have been chosen so that the map will have the same scale horizontally and vertically. ThePlanar Approximation formulain the page I just mentioned will help you do this. x = (lon2-lon1)*cos(lat1)*pi/180 y = (lat2-lat1)*pi/180 Here, x and y are inradians; if we want them inmiles, we should use x = (lon2-lon1)*cos(lat1)*pi*R/180 y = (lat2-lat1)*pi*R/180 where R is the radius of the earth, R = 6367 km = 3956 mi.

(The radian version in effect assumes a radius of 1, but takes longitude and latitude as in degrees.)

Here is the page Doctor Rick referred to for a discussion of errors, from 2003:

Planar Approximation: Latitude and Longitude How can I calculate the distance between two points below which they can be treated as if they were in a plane rather than on a sphere? I am trying to calculate the midpoint between cases of legionella and their nearest neighbor. The cases are usually within 15 miles, but how can I calculatethe maximum distance at which I need to treat the two cases as if they were on a sphere(i.e. account for the curvature of the earth)? I've seen many people mention that below 20 km or below 10 miles the earth's curvature doesn't matter - how do they calculate this?

Doctor Rick answered:

Hi, Jessica. It's a complicated matter. How much error the planar approximation introduces in the distance between pointsdepends not only on the distance but on the latitude and on the directionbetween the points. For instance, ifone point is on the equator, distances north and south, and distances east and west, are both exact regardless of the distance (ignoring effects of nonsphericity). Errors do enter when the direction is at an angle. At the poles, the error is extreme. In fact,if one point is at a pole, the correct formula for distance is (90-lat)*pi*R/180 where lat is the latitude of the second point and R is the radius of the earth. This is very different from the Pythagorean formula!

One issue on the equator would be the fact that the effective radius along a meridian is different from along the equator; but effects of curvature would be present even on a perfect sphere.

At the pole, with latitude 90°, our formula becomes $$x = \frac{\pi R}{180}(lon_2-lon_1)\cos(90°) = 0\\ y = \frac{\pi R}{180}(lat_2-90°)\\ d = \sqrt{x^2+y^2} = \sqrt{0^2+y^2} = |y| = \frac{\pi R}{180}(90°-lat_2)$$ which is just what he got directly. So the formula actually works, if you are *exactly* at the pole! Elsewhere near the pole, not so much, because lines of longitude are far from parallel. (We’ll see a better formula for that case at the end.)

The difficulty of determining when the planar approximation is safe leads to a practical consideration for programming:

If some distances will be great enough to require the spherical formula,why not just use it all the time?I know it takes more trig calculations, and if one point is fixed, the one trig function in the planar calculation can be pre-calculated, so there may be very good reasons for using the planar calculation whenever possible. But is that the case here? I would use the Haversine formula for distance when distances may be quite small: Deriving the Haversine Formula http://mathforum.org/library/drmath/view/51879.html If you'd like, I could generate a table showing the errors for various distances and directions from a given point. Let me know if this will help, andtell me what latitude to usefor the reference point.

The haversine formula is what we looked at last week.

Jessica wrote back:

Thanks for your quick response Dr. Rick!You've convinced me to use the Haversine formula. I am programming this in SAS andneed to calculate the distance 1.3 billion timesin the program (this simulation is run every day too), so efficiency in calculations will factor in. All of the cases are in NYC (Lat range is 40.5 to ~41 dd and Long is -73.7 to -74.3 dd). I thinkan error table will be very useful; thank you for the offer. I have been using the law of cosines for spherical trig formula to calculate the distance between two points, but will replace it with the Haversine formula for all distance calculations.

I am omitting a further question about finding the midpoint between two points, which I may post in the future.

Doctor Rick replied, starting with more advice on efficiency:

Since you need an efficient algorithm and you are (in the first phase)only interested in *comparing* distances, I suggest that youonly calculate 'a' in the Haversine algorithm. It is the square of half the chord length between the two points, so of two choices for point B, the one that has a smaller 'a' value is closer to point A. This saves you two square roots and an atan2 for each point in your search. Of course, you can pre-calculate cos(lat1) for the given point A, leaving only three trig calculations per point in the search.

It is also possible that the huge number of calculations needed could be reduced by changes at a higher level in the program.

For the error table: I set up a spreadsheet to compute a table of relative errors due to the planar approximation for points at various distances and bearings. The table has acolumn for each distance(in kilometers) and arow for each bearing(in degrees from north), from a pointat a given latitude(41 degrees). For each distance and bearing, I computed the latitude and longitude of the second point using the exact spherical formula: LAT, LON GIVEN DISTANCE (d*R) AND AZIMUTH (tc) lat2=asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc)) IF (cos(lat)=0) lon2=lon1 // endpoint a pole ELSE lon2=mod(lon1-asin(sin(tc)*sin(d)/cos(lat1))+pi,2*pi)-pi ENDIF Then I computed the distance using the approximate formula: PLANAR APPROXIMATION x = (lon2-lon1)*cos(lat1)*pi/180 y = (lat2-lat1)*pi/180 d = R * sqrt(x^2 + y^2)

This formula for finding a point given distance and bearing is from Doctor Rick’s answer in

He got it, in turn, from a highly-recommended source:

Aviation Formulary V1.30 – Ed Williams

ThedistancesI found were: CALCULATED DISTANCE BY PLANAR APPROXIMATION distance (km) 1 2 5 10 50 0 1 2 5 10 50 15 1.000004416 2.000017668 5.000110532 10.00044283 50.01121206 30 1.000014774 2.000059113 5.000369752 10.00148097 50.03741972 45 1.000024125 2.000096516 5.000603557 10.00241644 50.06085552 60 1.000025585 2.000102347 5.000639801 10.00256008 50.06417495 75 1.000016472 2.000065881 5.000411598 10.00164534 50.0409209 90 0.999999996 1.999999969 4.999999515 9.999996121 49.99951521 105 0.999983524 1.999934086 4.999587879 9.998350475 49.95855614 120 0.999974418 1.999897681 4.999360636 9.997443424 49.9362629 135 0.999975884 1.999903555 4.999397548 9.997592399 49.94024953 150 0.999985233 1.999940949 4.999631225 9.998526849 49.96355763 165 0.999995587 1.999982354 4.999889816 9.99955996 49.98913625 180 1 2 5 10 50

For example, the point 50 km away, 60° east of north, was found to be 50.06417495 km away by the planar approximation, only about 64 meters too far.

Finally I computed therelative error, that is, (approx. distance - actual distance)/(actual distance) RELATIVE ERROR distance (km) 1 2 5 10 50 0 1.40554E-13 5.3535E-13 1.4051E-13 -1.74083E-14 1.42109E-14 15 4.41569E-06 8.83417E-06 2.21064E-05 4.42826E-05 0.000224241 30 1.47744E-05 2.95567E-05 7.39505E-05 0.000148097 0.000748394 45 2.41246E-05 4.8258E-05 0.000120711 0.000241644 0.00121711 60 2.55851E-05 5.11736E-05 0.00012796 0.000256008 0.001283499 75 1.64723E-05 3.29404E-05 8.23196E-05 0.000164534 0.000818418 90 -3.87847E-09 -1.55143E-08 -9.6964E-08 -3.87854E-07 -9.69588E-06 105 -1.64765E-05 -3.29571E-05 -8.24242E-05 -0.000164952 -0.000828877 120 -2.55816E-05 -5.11596E-05 -0.000127873 -0.000255658 -0.001274742 135 -2.41158E-05 -4.82227E-05 -0.00012049 -0.00024076 -0.001195009 150 -1.47666E-05 -2.95254E-05 -7.3755E-05 -0.000147315 -0.000728847 165 -4.41291E-06 -8.82303E-06 -2.20367E-05 -4.4004E-05 -0.000217275 180 1.40554E-13 1.40554E-13 1.4051E-13 -1.74083E-14 1.42109E-14 You can see that,at latitude 41 degrees, the greatest error at 10 km is 0.0256%, or 2.56 m. Not bad, I'd say. At 50 km the greatest error is 0.128%, or 64 m. That's better than I expected, frankly.At 100 km the error is still under 258 meters (0.26%).

The claim that 20 km is close enough to ignore curvature seems to be true – though it still depends on the accuracy you need.

Jessica had one more question:

Many thanks to you! That was brilliant and very useful! One final question -why is the cos(lat1) term added to the x term?PLANAR APPROXIMATION x = (lon2-lon1)*cos(lat1)*pi/180 y = (lat2-lat1)*pi/180 d = R * sqrt(x^2 + y^2)

This essentially asks for more detail on the original derivation. Doctor Rick answered,

Hi, Jessica. The lines of longitude get closer together as they head toward the poles. Thereforea degree of longitude corresponds to a shorter distance as the latitude increases. To make this quantitative, consider a line of latitude, which is a circle. Looking at a side view of the earth (a cross-section along a line of longitude), we see that the radius of the latitude circle, r, and the radius of the earth, R, form a right triangle with an angle that is the latitude: ********* ****** | ****** *** +----------*** ** | r /** ** | / | ** ** | / | ** * | / | * * | / | * * | / | * * | /R | * * | / | * * | / | * * | / | * * | / | * * | / | * * |/ lat | * *-------------------------*-------------+-----------* r Thus we see that cos(lat) = r/R, so r = R*cos(lat).

So that’s the radius of the line of latitude.

Now, thedifference in longitudebetween two points at the same latitude is acentral angle of the latitude circle. The distance between the points is the radius of the circle times the angle in radians. To convert the longitude difference to radians, we multiply it by pi/180. Then we multiply by r = R*cos(lat) to get the distance x: x = (lon2-lon1)*(pi/180)*R*cos(lat)

Since we are using the latitude of the first point, we would get different distances if we swapped the two points!

In preparing last week’s post, I found that the GIS FAQ used as a source there also included a “flat-earth approximation” that was different from Doctor Rick’s; and when I used it for my sample distance between two points in Paris, I got a considerably different answer (2.28 rather than 2.12 km)! I only realized later that they don’t claim that formula applies everywhere. Let’s take a look.

If the distance isless than about 20 km(12 mi) and the locations of the two points in Cartesian coordinates are X1,Y1 and X2,Y2 then the Pythagorean Theorem d = sqrt((X2 - X1)^2 + (Y2 - Y1)^2) will result in an error of less than 30 meters (100 ft) for latitudes less than 70 degrees less than 20 meters ( 66 ft) for latitudes less than 50 degrees less than 9 meters ( 30 ft) for latitudes less than 30 degrees (These error statements reflect both the convergence of the meridians and the curvature of the parallels.) The flat-Earth distance d will be expressed in the same units as the coordinates. If the locations are not already in Cartesian coordinates, the computational cost of converting from spherical coordinates and then using the flat-Earth model may exceed that of using the more accurate spherical model.

They have not actually stated how to convert to Cartesian coordinates; it is possible that they intended to use something like Doctor Rick’s formula. In any case, they, too, recommend using the haversine formula instead.

Later, they give another formula that is meant only for locations close to the poles, where they pretend that the entire polar region is flat, and apply the Law of Cosines to a triangle with one vertex at the pole:

The]]>Pythagorean flat-Earth approximationassumes that meridians are parallel, that the parallels of latitude are negligibly different from great circles, and that great circles are negligibly different from straight lines.Close to the poles, the parallels of latitude are not only shorter than great circles, but indispensably curved. Taking this into account leads to the use of polar coordinates and theplanar law of cosinesfor computing short distances near the poles: ThePolar Coordinate Flat-Earth Formulaa = pi/2 - lat1 b = pi/2 - lat2 c = sqrt(a^2 + b^2 - 2 * a * b * cos(lon2 - lon1) d = R * c will give smaller maximum errors than the Pythagorean Theorem for higher latitudes and greater distances. (The maximum errors, which depend upon azimuth in addition to separation distance, are equal at 80 degrees latitude when the separation is 33 km (20 mi), 82 degrees at 18 km (11 mi), 84 degrees at 9 km (5.4 mi).) But even at 88 degrees the polar error can be as large as 20 meters (66 ft) when the distance between the points is 20 km (12 mi). The latitudes lat1 and lat2 must be expressed in radians (see above); pi/2 = 1.5707963. Again, the intermediate result c is the distance in radians and the distance d is in the same units as R.

Average rate of change is a topic taught in pre-calculus and calculus courses, primarily as preparation for the derivative, though it has more immediate applications. A recent question asked about when the concept is valid, which I found interesting.

Here is the question, from Amia in mid-February:

Hi Dr Math,

I have a question about the

definition of rate of change function, and under whatconditionswe can apply the rule to find it. And I have some questions attached.

I’ll show each of his three specific questions as I get to it. First, I replied about the concept in general:

Hi, Amia.

First, I’m not sure we ever talk about the “average rate of change

function“; that would be, perhaps, a function whose domain is the set of all intervals on the real line. I think you simply mean, the average rate of changeofa given function,overa specified interval. I say this just to make sure we’re talking about the same thing.In fact, I don’t find an entry in Wikipedia for “average rate of change”, only for “difference quotient“, which says that it can be described as an average rate of change. Are you working within a context in which the term has been formally defined, and in which the questions you raise matter, or is this just a matter of curiosity?

Looking elsewhere, I see that MathWorld does define AROC as a function A(x, a), but says nothing further except its application in defining the derivative. (I also found essentially your question having been asked on Reddit, though the answer is not very satisfying.)

Here I was checking whether he might mean something more than what I think **average rate of change** (which I’ll be abbreviating as AROC) is. It is the same as the **difference quotient**, namely the average rate of change, or slope, from *a* to *b*, $$\frac{f(b)-f(a)}{b-a}$$ for a given function *f* and an interval \([a,b]\) in its domain. Or, as MathWorld expresses it, it is $$A(x,a) = \frac{f(x)-f(a)}{x-a}$$ for a given function *f* and input values *x* and *a*, in which case it is the average rate of change from some fixed value *a* to a variable value *x*.

Since in my experience the average rate of change is primarily discussed in introducing the derivative, which is its limit as *x* approaches *a*, questions such as those he now asks are not often discussed. That is what made them interesting to me; it is also why some of them may not have definite answers! But I’ll try.

Now for your questions:

Here we have a piecewise-defined function *f* that is discontinuous at \(x=0\):

The average rate of change on the interval \([-1,1]\) is the slope of the secant line here:

There is no trouble evaluating it; is there any reason not to?

I answered:

As far as I know, the

definitionof AROC is just (f(b) – f(a))/(b – a), whichdoes not require continuityor any other particular properties for the function f.We usually talk about AROC in the context of defining differentiation, but even in that context, we can talk about the limit of AROC as the interval approaches a single point, and show that your function is not differentiable at x = 0. So in fact there is

good reason to allowAROC to be defined for discontinuous functions!Also, if we take “average rate of change” literally as the

average of the derivative, even though the derivative does not exist at the point of discontinuity, the average would be defined in terms of the integral of the derivative, which is meaningful even in that case: the derivative is still integrable.

In other words, if we didn’t allow even talking about AROC around a point of discontinuity, we couldn’t talk clearly about whether the derivative at that point exists (and it never will in that case). If we just said, the derivative doesn’t exist because we don’t allow ourselves to talk about AROC in this case, it would not be at all satisfying. Showing that the limit does not exist makes the reason clear.

I would normally think of average rate of change as just the same idea as **average speed** over some interval of time, which is just the distance traveled divided by the time it took, without regard to the speeds at intervening times – particularly because when we talk about AROC, we typically have not yet defined the derivative, and therefore can’t say what an instantaneous speed is.

But as I pointed out in the last paragraph (partly inspired by a mention in Wikipedia), it can explicitly be seen as the **average (mean) of the derivative** over the interval. The mean of a function is defined as its integral over the interval, divided by the length of the interval, which in this case would be $$\frac{1}{b-a}\int_a^bf'(x)dx = \frac{f(b)-f(a)}{b-a}$$ by the **Fundamental Theorem of Calculus** (and this also justifies the term “average speed”). Even when the function is discontinuous, its derivative is integrable. Here is that derivative:

But in writing this, I realized that I missed something in my original answer, by not working through the details: If we integrate that derivative from -1 to 1, we get 0, not the 1 we need in order to get the correct average; what went wrong? It’s that this function is undefined at 0, so it doesn’t satisfy the FTC, as it is not the derivative of our *f* over the entire interval. As a result, we can’t actually say that the average of the derivative is equal to the average rate of change; the derivative knows nothing about the step up in our function (which could be any distance at all). If we made our function continuous by shifting the right half of our function down, we would in fact get an average rate of change of 0:

This may provide a reason to consider this case of a discontinuous function as invalidating the AROC: It is no longer the average of the instantaneous rate of change.

This time the function is not even defined on the interior of the interval:

Here is the line whose slope would give the average rate of change:

I answered:

You can certainly still

computeAROC; but in this case, where the function is not defined over the entire interval, I seeno reason to allow it, as it is essentially useless and perhaps meaningless. I can’t think of anyreasonwe would want to talk about it.And in terms of the

integral of the derivative, that would clearly be undefined in this case, so it makes sense to disallow it.

That is, there is really nothing here to average! Our moving object not only leaped from one place to another, but it ceased to exist for a while (or maybe time-traveled). Speed has no meaning here.

Since \([-1,a]\) implies that \(a>-1\), the AROC expression simplifies to \(a-1\) for values of *a* that matter, and its limit is clearly \(-2\). But we aren’t told anything about what happens to the left, and for all we know the function may not even be defined for \(x<-1\). So all we can talk about is the derivative from the right. The function may look like this, with only a right derivative:

where, for example, the AROC on \([-1,0]\) is $$\frac{(a^2+1)-((-1)^2+1)}{a-(-1)}=\frac{a^2-1}{a+1}=\frac{0^2-1}{0+1}=-1$$

On the other hand, we could take the given fact as representing the AROC between -1 and any *a*, to the left or to the right, and in that case we would get a valid double-sided derivative:

But since the question distinguishes left from right, we have to suppose that the given assumption does as well, or there would be no reason for the question.

I started with that:

If your intention is to imply that this

applies only for a > -1, then we don’t necessarily know that the function is undefined to the left, but we certainly have not been told anything about its behavior there, soall we can sayis that theright derivativeis -2. (Your function f is in fact f(x) = x^{2 }+ C, and we could take the AROC to be defined as stated for all a ≠ -1, in which case the derivative does exist.)

So it’s just a matter of making sure what the problem means.

Amia wrote back:

Thank you Dr Peterson for explanation, I have one more question in the attached below.

Here we have discontinuities on both ends:

The AROC has nothing to do with behavior in the interior of the domain:

I replied:

I was half-expecting you to ask about another case or two!

I think this is essentially the same case as your first example, a discontinuous function. It is still defined on the entire interval, and the derivative is still integrable. (And there is still the question, why would you want to do this?)

Ultimately, the last question is the most important in thinking about extreme cases like this; what you would do with the answer often determines what sort of answer is appropriate.

But I had thought of some cases myself!

The cases I

thoughtyou might ask about are when the function isundefinedat a single pointin the interval.For example, for f(x) = 1/x, which has a

vertical asymptote, it seems improper to consider the average rate of change over [-1, 1], in part because the integral of its derivative would be improper.

Does the blue line look like a reasonable average rate of change between the two points?

On the other hand, f(x) = (x^3-1)/(x-1) has a

removable discontinuityat x=1, and its average rate of change on [0, 2] seems mostly reasonable. In fact, it leads to the symmetric derivative at 1.

Here is the graph:

And here is the secant line on \([0,2]\):

Although the function is not defined at \(x=1\), the AROC over \([0,2]\) is the same as the derivative would have been at \(x=1\). (The symmetric derivative is the limit of these AROCs as both sides approach 1; it is not usually equal to all of the AROCs, but it is for quadratic functions. We discussed it here.)

]]>

This question came to us in 2001:

Deriving the Haversine Formula I'm an SAS programmer at The Coca-Cola Company. It's been a long, long time since I have had to use trigonometry. I need to write a program module tocalculate distances given longitude and latitude data. I am trying to find an objectwithin a mile's radius of its location. Would you have the equation for this scenario? Thank you. I hope I am not too old for a response. :)

Some level of precision is needed, maybe even more than we can get assuming the earth is an exact sphere; we certainly want to do the best we can.

Doctor Rick answered, referring two of the pages we saw last week:

Hello, Dena, welcome to Ask Dr. Math. We're allowed to answer "old" people now and then, if the question is interesting enough! :-) You can find several expositions of the "Law of Cosines" for spherical trigonometry in our Dr. Math Archives. For example: Using Longitude and Latitude to Determine Distance http://mathforum.org/library/drmath/view/51711.html Distance using Latitude and Longitude http://mathforum.org/library/drmath/view/54680.html But a correspondent recently directed our attention to a Web site, The Geographic Information Systems FAQ (See Q5.1) http://www.faqs.org/faqs/geography/infosystems-faq/ This site points out thatthe cosine formula does not give accurate results for small distances, and presents a better formula, the Haversine Formula. The form of the Haversine Formula that uses the atan2() function is probably best for programming, assuming your programming language has an atan2() function. I will copy some excerpts here for your convenience, but I recommend looking at the site for the other information you will find there.

This is an old page from 1997, and not very user-friendly (search for Q5.1)! A somewhat better 2001 version can be found here, and the part with the formulas is here.

Note that in the description that follows,atan2(y, x) = arctan(y/x). However, there does seem to be some confusion about the order of the arguments. C/C++ puts the arguments in the order that I assume, as indicated by the Unix man page as well as the Visual C++ Programmer's Guide. On the other hand, Excel describes the function (not too clearly) as "ATAN2(x_num, y_num) returns the arctangent of the specified x- and y-coordinates, in radians." I tested it, and indeed it takes the denominator x first.

This is an issue we’ve dealt with a number of times in recommending formulas in Excel. This function returns the angle in standard position through the point (x, y); it is understandable that Excel would have you enter the coordinates of the point in that order, but it also makes sense to put the arguments in the order (y, x) to make a direct replacement for “atan(y/x)”, the arctangent of the slope. The difference between the two is that atan2 produces an angle in the appropriate quadrant, as atan can’t.

What follows was copied in condensed form from the source (which differed a little from the current version):

Presuming a spherical Earth withradius R(see below), and that the locations of the two points in spherical coordinates (longitude and latitude) arelon1,lat1andlon2,lat2, then the Haversine Formula (from R. W. Sinnott, "Virtues of the Haversine," Sky and Telescope, vol. 68, no. 2, 1984, p. 159): dlon = lon2 - lon1 dlat = lat2 - lat1 a = (sin(dlat/2))^2 + cos(lat1) * cos(lat2) * (sin(dlon/2))^2 c = 2 * atan2(sqrt(a), sqrt(1-a)) d = R * c will give mathematically and computationally exact results. The intermediate result c is thegreat circle distance in radians. Thegreat circle distance dwill be in the same units as R.

The current version does not include this atan2 version of the formula, but only the other version, using an arcsin with “bulletproofing” to prevent errors under special conditions (“nearly antipodal” points); the atan2 version doesn’t need that protection. We’ll look at that later.

Most computers require the arguments of trigonometric functions to be expressed inradians. To convert lon1,lat1 and lon2,lat2 from degrees, minutes, and seconds to radians, first convert them to decimal degrees. To convert decimal degrees to radians, multiply the number of degrees by pi/180 = 0.017453293 radians/degree. Inverse trigonometric functions return results expressed inradians. To express c in decimal degrees, multiply the number of radians by 180/pi = 57.295780 degrees/radian. (But be sure to multiply the number of RADIANS by R to get d.)

Using the wrong units is a very common cause of errors people have written to us about!

The following comes under the heading “What value should I use for the radius of the Earth, R?” in the GIS FAQ:

The historical definition of a "nautical mile" is "one minute of arc of a great circleof the earth." Since the earth is not a perfect sphere, that definition is ambiguous. However, the internationally accepted (SI) value for thelength of a nautical mileis (exactly, by definition) 1.852 km or exactly 1.852/1.609344 international miles (that is, approximately 1.15078 miles - either "international" or "U.S. statute"). Thus, the implied "official" circumference is 360 degrees times 60 minutes/degree times 1.852 km/minute = 40003.2 km. The implied radius is the circumference divided by 2 pi:R = 6367 km = 3956 mi

Last week we used a different value, 3963 miles. Among the possible values, the two main ones from actual earth measurements are, according to Wikipedia:

**Equatorial radius**a, or semi-major axis: distance from center to equator = 6,378.1370 km (3,963.1906 mi).**Polar radius**b, or semi-minor axis: distance from center to North and South Poles = 6,356.7523 km (3,949.9028 mi).

Another alternative is the “mean radius” as given by Wikipedia:

**Mean radius**: \(\displaystyle\frac {2a+b}{3}\) = 6,371.0088 km (3,958.7613 mi).^{}

The FAQ’s recommendation is equivalent to what is given in Wikipedia as

**Rectifying radius**, giving a sphere with circumference equal to the perimeter of the ellipse described by any polar cross section of the ellipsoid: 6,367.4491 km (3,956.5494 mi).- The
**mean of the two axes**, \(\displaystyle\frac{a+b}{2}\) = about 6,367 km (3,956.547 mi)

What we used last week, 3963 miles, is the equatorial radius, so that those calculations can be expected to be just a little high.

But the FAQ is right not to give as much precision as Wikipedia for the averages, because they are, after all, averages! With about 4 significant digits, it will be reasonable to expect accuracy to within about a mile in 10,000. If we used the average radius to find a length along the equator, we would be about 0.17% low, or 1 mile out of 573, considerably less precise.

Doctor Rick continues:

I'll just add that the intermediate result "a" is thesquare of half of thestraight-line distance (chord length) between the two points. a = (AB/2)^2 = (sin^2(dlat/2)) + cos(lat1) * cos(lat2) * sin^2(dlon/2) If you are interested in a derivation of the formula, I could provide it, but the figure would be hard to draw with "character graphics."

In 2001, it was hard to attach (or make) real graphics, so we did as you’ll be seeing below.

Dena wrote back:

Thank you very much for your quick response. I'm looking forward to visiting the Web sites you provided to review the expositions of the "Law of Cosines" and the Haversine Formula. I think I will always have a nature of curiosity about me. Therefore,I would LOVE to see a derivation of the formula.

Doctor Rick answered:

Hello again, Dena. You called my bluff! Good -now I have a reason to write up my derivationof the haversine formula. I had derived the cosine formula for great-circle distance, but not the haversine formula. I was reluctant to send the formula to you without having checked it out, so I derived it before I answered you. It turned out to be relatively straightforward.

We often do more work behind the scenes than we show! And this is not the only time we have wanted an occasion to write up the details of a problem.

First, a word about themeaning of "haversine." This is the name of one of several lesser-known trigonometric functions that were once familiar to navigators and the like. TheVERSINE (or versed sine)of angle A is 1-cos(A). TheHAVERSINE is half the versine, or (1-cos(A))/2. With a little math, you can show that hav(A) = (1-cos(A))/2 = sin^2(A/2) where ^2 means squared. You see the form on the right twice in the haversine formula.

Here is that math: Using the double angle formula, \(\cos(2x) = 1 – 2\sin^2(x)\), we find that $$\text{hav}(A) = \frac{1-\cos(A)}{2}=\frac{1-\cos\left(2\cdot\frac{A}{2}\right)}{2}\\=\frac{1-\left(1 – 2\sin^2\left(\frac{A}{2}\right)\right)}{2}=\frac{2\sin^2\left(\frac{A}{2}\right)}{2}\\=\sin^2\left(\frac{A}{2}\right)$$

Wikipedia has a lot of information about this and a whole family of related functions, in the article on the versine. Jim Wilson has a nice article that also touches on our current topic, here.

In proving the formula, we will work with asphere of radius 1. The distance we get should be multiplied by R, the radius of the earth. Let's start with a formula for thelength of a chordsubtending an angle theta in the unit circle (circle of radius 1). O /|\ / | \ 1 / | \ 1 / | \ / | \ /_____|_____\ A C B O is the center of the circle, and A and B are on the circle, so AB is the chord. If angle AOB = theta, then angle AOC = theta/2 where OC is perpendicular to the chord AB. C bisects AB, since triangle AOB is isosceles. Segment AC = sin(theta/2), so the length of chord AB is 2*sin(theta/2).

$$AB=2\sin\left(\frac{\theta}{2}\right)$$

This formula is used often in working with regular polygons.

Now for the 3-dimensional figure. Here is asphere of radius 1, with a wedge removed to show the center, labeled O. The points we are interested in are A (lat1,lon1) and B (lat2,lon2). Thelines of longitude lon1 and lon2are shown as curved single lines, meeting at the north pole, N; theequatoris shown as a double line (equal signs). *********** **** N **** **** / | \ **** *** / | \ *** ** / | \ ** ** / | \ ** * / | \ * * / | \ * * A----------------------D * * /|\ | \ * * | | \ | | * * | | \ | | * * | | \ | | * * | | \ | | * * C----------\-----------------B * * | | - _\ | | * * | | _O_ | * * = | | _ _ | = * * === | G_ _ | === * * ====E______________________________F ===== * * ========= ========= * * ============== * * * * * * * ** ** ** ** *** *** **** **** **** **** ************* A and B are opposite vertices of anisosceles trapezoid, ACBD, with additional vertices C (lat2,lon1) and D (lat1,lon2). I haven't tried to draw the straight lines (chords) connecting A to C and B to D, but I show the chords connecting A to D and B to C. I won't bother to prove that the trapezoid ACBD is planar.

Here is a somewhat clearer picture:

Our goal is the length of arc AB; we’ll be first finding the length of segment AB, then using that to find the angle δ = AOB and finally the arc.

If you join A to O and C to O, theangle AOCis the difference between lat1 and lat2, or dlat. The length ofchord ACis therefore2*sin(dlat/2), using the chord-length formula derived above.Chord BDis the same length. Points E and F are the points where the latitude lines lat1 and lat2 meet the equator. Thelength of EFis2*sin(dlon/2)by the chord-length formula. Points A and D are on acircle of constant latitude lat1. The radius of this circle is cos(lat1). You can see this by dropping a perpendicular from A to OE, meeting OE at G. The angle EOA is lat1, so OG = cos(lat1). But this is equal to the radius of the latitude circle at A. Therefore thelength of chord ADis2*sin(dlon/2)*cos(lat1). Similarly, thelength of chord CBis2*sin(dlon/2)*cos(lat2).

So far, we have $$AC = BD = 2\sin\left(\frac{dlat}{2}\right)\\ AD = 2\sin\left(\frac{dlon}{2}\right)\cos(lat_1)\\ CB = 2\sin\left(\frac{dlon}{2}\right)\cos(lat_2)$$

Now we have the lengths of all the sides of (planar) trapezoid ADBC. The straight-line distance AB (passing through the earth) is a diagonal of that isosceles trapezoid.

Now let's go back to 2 dimensions, and find thelength of a diagonalof an isosceles trapezoid. A_________________D /| * \ / | * \ / | * \ / | * \ /____|_________________*__\ C H B The length of CH, where AH is perpendicular to CB, is (CB-AD)/2. By the Pythagorean theorem, AH^2 = AC^2 - CH^2 = AC^2 - (CB-AD)^2/4 The length of HB is (CB+AD)/2. Using Pythagoras again, we find that AB^2 = AH^2 + HB^2 = AC^2 - (CB-AD)^2/4 + (CB+AD)^2/4 = AC^2 + CB*AD

$$AB^2 = AC^2 + CB\cdot AD$$

The square of the diagonal is the sum of the square of either leg and the product of the bases (which is the square of their geometric mean). Sounds reasonable.

We're ready to plug in the lengths of chords AC, AD, and CB from our work with the sphere: AB^2 = 4*(sin^2(dlat/2) + cos(lat1)*cos(lat2)*sin^2(dlon/2)) The intermediate result a is thesquare of half the chord length AB: a = (AB/2)^2 = (sin^2(dlat/2)) + cos(lat1) * cos(lat2) * sin^2(dlon/2)

So, $$AB^2 = \left[2\sin\left(\frac{dlat}{2}\right)\right]^2 + \left[2\sin\left(\frac{dlon}{2}\right)\cos(lat_1)\right]\left[2\sin\left(\frac{dlon}{2}\right)\cos(lat_2)\right]\\ = 4\sin^2\left(\frac{dlat}{2}\right) + 4\sin^2\left(\frac{dlon}{2}\right)\cos(lat_1)\cos(lat_2)$$

Dividing this by 4, we get the square of the half-chord, $$a = \left(\frac{AB}{2}\right)^2 = \sin^2\left(\frac{dlat}{2}\right) + \cos(lat_1)\cos(lat_2)\sin^2\left(\frac{dlon}{2}\right)$$

This is part of the formula we are trying to prove; it appears that this intermediate value *a* was chosen partly to eliminate the 4, and partly, as we’ll see in a moment, because half the chord is what we need anyway!

The final step is to find thecentral angle AOBthat corresponds to this chord length. The arctan formula can be found from this figure: O /|\ / | \ / | \ / | \ 1 / | \ 1 / | \ / | \ / | \ / | \ / | \ / sqrt(1-a)| \ / | \ /____________|____________\ A sqrt(a) C B If AC = sqrt(a), then Pythagoras says that OC = sqrt(OA^2 - AC^2) = sqrt(1-a) Therefore tan(<AOC) = AC/OC = sqrt(a)/sqrt(1-a), or c = 2 * arctan(sqrt(a)/sqrt(1-a)) where c is the angle AOB.

All that’s left for the formula is to multiply this angle (in radians) by the radius R, to get the arc length (great-circle distance). The formula, again, is:

$$dlon = lon_2 – lon_1\\ dlat = lat_2 – lat_1\\ a = \sin^2\left(\frac{dlat}{2}\right) + \cos(lat_1)\cos(lat_2)\sin^2\left(\frac{dlon}{2}\right)\\ \delta = 2 \text{atan2}\left(\sqrt{a}, \sqrt{1-a}\right)\\ d = R\delta$$

In the FAQ from which we got the formula, the formula is given using a sine instead of the atan2 that we are using. That saves some contortions, as angle AOC is just the arcsin of \(\sqrt{a}\). But then they have to add a check. Here is what they say:

Haversine Formula: dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin^2(dlat/2) + cos(lat1) * cos(lat2) * sin^2(dlon/2) c = 2 * arcsin(min(1,sqrt(a))) d = R * c will give mathematically and computationally exact results. The intermediate result c is the great circle distance in radians. The great circle distance d will be in the same units as R.The min() function protects against possible roundoff errorsthat could sabotage computation of the arcsine if the two points are very nearly antipodal (that is, on opposite sides of the Earth). Under these conditions, the Haversine Formula is ill-conditioned (see the discussion below), but the error, perhaps as large as 2 km (1 mi), is in the context of a distance near 20,000 km (12,000 mi).

The atan2 function will never have these errors. Instead, in the antipodal case, we will be dividing by a very small number, and might have overflow in a computer.

The GIS FAQ from which we originally got this formula explicitly warns against using the cosine formula we studied last week. Here is what it says:

An UNRELIABLE way to calculate distance on a spherical Earth is the Law of Cosines for Spherical Trigonometry ** NOT RECOMMENDED ** a = sin(lat1) * sin(lat2) b = cos(lat1) * cos(lat2) * cos(lon2 - lon1) c = arccos(a + b) d = R * c Although this formula is mathematically exact, it isunreliable for small distancesbecause the inverse cosine is ill-conditioned. Sinnott (in the article cited above) offers the following table to illustrate the point: cos (5 degrees) = 0.996194698 cos (1 degree) = 0.999847695 cos (1 minute) = 0.9999999577 cos (1 second) = 0.9999999999882 cos (0.05 sec) = 0.999999999999971 A computer carrying seven significant figures cannot distinguish the cosines of any distances smaller than about one minute of arc.

And one minute of arc is $$\frac{1}{60}\cdot \frac{1}{360}\cdot 2\pi R = \frac{2\pi\cdot 3956}{60\cdot360} = 1.15\text{ miles}$$

In contrast, when we use the haversine formula for small distances, we just take the sine of small angles, and then the inverse sine (or inverse tangent) of a small number, which behaves nicely, being approximately proportional.

So let’s do one example, at a fairly small distance, using both formulas.

Since last week we found the distance from San Francisco to Paris, let’s suppose we are in Paris and want to find the distance from the Arc de Triomphe, with coordinates 48.8738° N, 2.2950° E, to the Place de la Concorde, with coordinates 48.8656° N, 2.3212° E. I chose this nice straight walk because Google can tell us the distance:

We expect the correct distance to be a little less than 2.2 kilometers.

First, I’ll use the cosine formula, which I’ll do in the format used by the GIS FAQ we saw, which breaks it into steps we can examine:

- a = sin(48.8738°) * sin(48.8656°) = 0.5673338013
- b = cos(48.8738°) * cos(48.8656°) * cos(2.3212° – 2.2950°) = 0.4326661431
- c = arccos(a + b) = arccos(0.9999999445) = 0.00033309707149 rad
- d = 6367 * 0.00033309707149 = 2.1208290542 ≈ 2.12 km

What we see here is that we had to take the inverse cosine of a number *very* close to 1. When I repeated the calculation on a hand calculator with less precision than the Windows calculator I used initially (which showed many more digits than I have copied), I got the same results (to five decimal places), so the loss of precision was not serious; but in principle, the formula is inadequate – especially if you were using trig tables rather than a modern calculator!

Now I’ll use the haversine formula, again from the FAQ:

- dlon = 2.3212° – 2.2950° = 0.0262°
- dlat = 48.8656° – 48.8738° = -0.0082°
- a = sin^2(-0.0082/2) + cos(48.8738°) * cos(48.8656°) * sin^2(0.0262/2) = 0.00000002773841450
- c = 2 * arcsin(min(1,sqrt(a))) = 0.0003330970714 rad
- d = 6367 * 0.0003330970714 = 2.1208290542 ≈ 2.12 km

The answer is essentially the same; and this, too, worked just as well on a hand calculator (though for a while it looked as if it had lost many digits in calculating *a*, as it did not display that tiny number in scientific notation, but as 0.000000028).

I recently had a pleasant discussion of factoring, with the kind of student for whom I returned to teaching: one who has been away from math for a while, and with greater maturity has the determination to succeed. We’ll see several examples of the “ac-grouping” method of factoring a trinomial, within a larger problem simplifying a rational expression.

The question came from Brittney in early February:

Good morning,

Thank you for this service! I really need it.

To begin, I should state that I was placed into College Algebra by mistake. I am to graduate with my Associate of Arts in May. So failure isn’t an option. I haven’t taken math in 19 years. I’m 35. I haven’t learned a “system” yet. I have literally taught myself and have seen a tutor once or twice a week. I’m behind!

My first question is: How do I solve a problem like the following: (I am specifically having trouble with

factoring when there is a first term in the trinomialof a number near a letter. Ex: 5y^{2}.)Here is the problem:

y^{2 }+ 10y + 25 5y^{2}-11y-12 ------------- times ---------- 5y^{2 }+ 29y + 20 y+5I hope this makes sense, I tried to type it properly.. I should add that I know that you’re supposed to factor.

So 1*25 = 25. Then 5+5 = 10, and 5*5 = 25. So (y+5)(y+5) for the

first numerator.But when I get to the

first denominatorI don’t understand. I want to multiply 5*20 = 100. Then find two numbers to add to 29. That 5 in front of the y^{2}is throwing me off. Someone else helped me by simply showing me the answer. But I want to know why. Perhaps answering like I know nothing at all would be best, since math is super hard for me! Thank you so very much.I need help with the rest of the problem as well please. Thank you!

Brittney has correctly factored \(y^2+10y+25\) as \((y+5)(y+5)\), by finding a pair of numbers whose product is 25 (the product of the first and last coefficients), and whose sum is 10 (the middle coefficient). In this case, where the coefficient of the squared term is 1, we can just put those two numbers, 5 and 5, into the factors, filling in the blanks in \((y+\_)(y+\_)\).

But now she is struggling to factor \(5y^2+29y+20\) using the same technique, finding a pair of numbers whose product is \(5\cdot 20=100\) and whose sum is \(29\). Nothing is wrong in the work so far, and the 5 itself isn’t the problem, except that it results in larger numbers! A big part of what Brittney needs is encouragement. The real issue is going to be the actual factoring part, which is quite different from what she did for the first numerator.

I answered, recalling that part of the reason I chose to teach at a community college was the knowledge that I would find there the adult students I’d most enjoyed helping at *Ask Dr. Math*:

Hi, Brittney.

I’ve taught a number of students in more or less your same position; you’re why I went into teaching! So let’s take a look.

First, I’ll write the problem in a way that’s

easier to type, though a little harder to read:(y^2+10y+25)/(5y^2+29y+20) * (5y^2-11y-12)/(y+5)

You’ve done a good job in the first factoring:

[(y+5)(y+5)]/(5y^2+29y+20) * (5y^2-11y-12)/(y+5)

The other two polynomials you have to factor are a harder type, as you observe; there are a couple different ways to do this, and your work gives me a hint that you have learned, at least partly, the method I most like to teach when there isn’t time to make you a master of factoring. I call it the

“ac-grouping” method, but there are several other names I’ve heard.

Multiplying the first and third coefficients in \(ax^2+bx+c\), to find the required product \(ac\), is the first part of the ac-grouping method; the second part, which we haven’t seen evidence of yet, is “factoring by grouping”. Many students struggle at that transition, forgetting that this is where the method diverges from what they have learned when the leading coefficient is 1. I find this method easier to explain than other methods, which is the main reason I teach it; students who come having mastered another method are free to use it!

I’m going to

demonstrate on a different exampleso you have two chances to try it on your own in this problem. We’ve explained the method many times, a couple of which you can read here, if what I say isn’t detailed enough:

Factoring Trinomials in Quadratic Equations

Factorization by Decomposition and the Distributive(We’ve also explained why it works, but you may not need that at the moment, unless you’re like me.)

Those links don’t currently work, as they were disabled soon after this discussion; we hope they will return soon. I chose to give a full explanation of the method, starting with the part Brittney had done correctly. In particular, I wanted to use a fresh example, one with a negative coefficient, so that I could demonstrate features not found in Brittney’s first denominator, but which she would face in the second numerator.

(If you read carefully, you’ll see a typo on my next line, which I am forced to leave as is, because it becomes part of our discussion later.)

Now, I’ll demonstrate how to use this method to factor

3x^2+2y-8, which I’ve chosen just to make ita little hardbut not too much so:First, we identify the

three coefficients: a=3, b=2, c=-8.We multiply ac = (3)(-8) = -24.

Now our

first goal, much like the work you showed, is to find apair of numberswhose product is -24 and whose sum is b (2). I like to write:Product = -24

Sum = 2As you probably know (though you may not be an expert yet), we can find the two numbers by

listing factorsof 24 and, because the sign of the product isnegative,looking for a pair whose:differenceis 21, 24: difference is 23

2, 12: difference is 10

3, 8: difference is 5

4, 6: difference is 2— got it!Now, since the product has to be negative, one of these has to be negative; and since the sum has to be positive, we’ll make the

smallernegative: our numbers are-4 and 6. (Check: -4*6 = -24; -4 + 6 = 2.)

The **difference** has to be 2, because it will be the sum of two factors with different signs. If the product were negative, like the 25 in Brittney’s current problem, we would be looking for the **sum**. And if the middle coefficient had been negative, we would have taken \(4\) and \(-6\).

The second step is to

replace the middle term(bx) with this sum; namely 2x becomes -4x + 6x:3x^2

+ 2x– 83x^2

– 4x + 6x– 8(I could also have said + 6x – 4x.)

We need to

factor this by grouping, which I will assume for the moment you have learned. Factoring thefirst pair, we find that 3x^2 – 4x = x(3x – 4); and factoring thesecond pair, we find 6x – 8 = 2(3x – 4). So we now have

x(3x – 4) +2(3x – 4)Since the

two second factorsare both 3x – 4, we can move on; if they were not the same, we know we made a mistake, and go back and fix it.Now we factor out this common factor:

(

x+2)(3x – 4)

Check that by multiplying, and we’re done!

The check is important, though the final check can be skipped if, as I recommend, you have checked every step, similarly verifying by multiplying that \(x(3x – 4) = 3x^2 – 4x\) and that \(2(3x – 4) = 6x – 8\).

Now, the work you showed is correct as far as you went:

I want to multiply 5*20= 100. Then find two numbers to add to 29.

You want two

factors of 100 whose sum is 29. I happened to see the two numbers immediately, because I know numbers pretty well. But if you don’t see it (and I don’t always!), just list factor pairs:1, 100

2, 50

4, 25

5, 20

10, 10Which pair works? Then continue.

Once you get the factoring done (or if you don’t finish it and need more help), write back and show you work as far as you get, and we can take you another step forward.

Brittney had stopped there, with the choice of two numbers, and I wanted to see if she had trouble with the next step.

Brittney answered,

Dr. Peterson,

Thank you so much for your thorough reply. I love how you broke it down so far. I was able to get as far as 5*20=100. But

need to figure out how to add to 29.Also,

I got a little lost with the example problem. It’s great, butis the “x” possibly supposed to be a “y”?If so, is there any way you can please resend that entire thing with the “y” instead? I could totally be wrong, and if so I apologize! I’m just a bit confused.You have NO IDEA how fortunate I am to be able to get help here. I am so grateful. I will need so much more. I am glad my professor is allowing me to turn assignments in late. Otherwise I’d surely fail. I could still yet. But I have never failed, and in fact have an excellent GPA. I am very humbled, and anxious.

Thank you, Brittney

It isn’t clear yet why she couldn’t get the two numbers, or what in my example was confusing; I tried to identify possibilities, and responded:

You said,

I was able to get as far as 5*20=100. But need to figure out how to add to 29.

Here is what I said about that:

You want two factors of 100 whose sum is 29. I happened to see the two numbers immediately, because I know numbers pretty well. But if you don’t see it (and I don’t always!), just list factor pairs:

1, 100

2, 50

4, 255, 20

10, 10Which pair works? Then continue.

I listed all possible pairs of numbers whose product is 100; one of them adds up to 29. Which is it? Then those are the two numbers you have to use.

Apparently you are not quite clear on what has to add to 29, or something like that; it will help if you just do

something, even if you’re sure it’s wrong, just so I can see what you are thinking.

This time I put the right pair in bold (hint, hint); some kind of work at this point was needed in order to diagnose the problem.

As for the question about *x* being a *y*, I was confused, and guessed that changing between different variables was the issue.

In my problem, the variable is x;in yours, it is y;in another, it might be t. Any variable can be used in an expression.I deliberately used a different variable than in your problem, just as I used different numbers, to help you get used to seeing such variations. (Incidentally, we so commonly use x that I suspect the author of your problem intentionally used y for exactly the same reason I used x: so it wouldn’t look identical to examples you’ve seen!)

You could, yourself, copy everything I wrote and change every x to a y, if you want (word processors are really good at that); but it’s important to be able to see what is being

donewithout being distracted by extraneous details. So try going through it thinking of “y” as just “the variable”.Keep working with us, and we’ll get there. You have perseverance; so do we.

Many students do see *x* so often that they are tripped up when a different variable is used. I don’t think that was really Brittney’s issue, though!

Brittney first answered about getting 29, and got into the factoring part:

Dr. Peterson,

Okay, so the two numbers are

25 and 4. So I write it like:5y+4y+25y+20.

Then I factor by grouping the first 2 first, then the last 2.

I assume it’s: y(5+4)+5(5y+4)?? Is that right?

Thanks, Brittney

She wrongly copied the first term as \(5y\); that led to a wrong factoring. The work itself is good, and it was right that she stopped where she did, as anything beyond that would have been wrong! So I could honestly be encouraging here:

Good work, almost.The polynomial is

5y^2+29y+20You (correctly) replaced the 29y with 4y + 25y and wrote,

5y+4y+25y+20Presumably you meant

5y^2+4y+25y+20Then you factored as

y(5+4)+5(5y+4)

When I factor anything, I immediately check by multiplying; when I do that, I get

5y + 4y + 25y + 20

So your factoring is good (and you rightly stopped at that point!), but you were

factoring the wrong thing!You have to be careful at every step to make sure you don’t drop bits like that exponent.

Here is a little saying I often use with students, about how to avoid silly errors:

When you are solving a problem,

- Think
- Write down what you thought.
- Think about what you wrote.
- Fix it!
In other words,

errors, especially little ones, are normal; what sets apart those who do well is how soon they find and fix them.Every single line I write (when it matters), I check.Now redo that, and I think you’ll get it right.

As you can see here, when I teach at this level, a major focus of my teaching is on being careful to check constantly. You need a combination of trusting yourself enough to proceed, but distrusting yourself enough to check!

But note that last comment about what I do; it will come back to bite me.

While I was writing that, Brittney had added this:

Dr. Peterson,

Thank you! I was confused by the “y” in the problem “3x^2+2

y-8″.I think we’re making progress! Thank you for helping! Forgive me, I have twin six-year-olds and a 1.5 year old who are demanding mama time.

I hastened to reply:

Ah, I see! It was my error, not yours. Sorry!

What I just said about

checking every single line I write… I guess I lied.

Yes, I’m human, too!

Brittney responded,

Oh no problem. I just wanted to make sure! I never would have been able to pick that mistake up before, so I guess I am making a little progress. And the way you teach is really helpful! Thank you so much! I see that I forgot to put the squared part on the 5!

Is that the only mistake so far?So it’d be y(5y+4)+5(5y+4). I presume that will turn into

(y+5)(5y+4)?

Yes, my expectation that she would get this part was right.

While I slept, she wrote again, factoring \(5y^2-11y-12\) and completing the problem:

So now I’ve gone to the

next numerator. 5*-12=-60. The 2 numbers that work here are -15 and 4. So now it’s written: 5y^{2}-15y+4y-12. Then I took the first two terms and got: 5y(y-3) +4(y-3). I took it down to(5y+4)(y-3).So (y+5)(y+5)/(y+5)(5y+4) * (5y+4)(y-3)/(y+5).

Then I just assume that

whatever is identical in either numerator and either denominator can cancel outsince that’d equal one. (Or does this have to only happen on opposite sides, or only on the same side? Meaning the one fraction, not one numerator and the other denominator. Does that make sense?)So I canceled y+5, y+5, y+5, y+5, 5y+4, and 5y+4. This leaves me with (y-3)/ nothing.

So y-3 is the answer?If I did this right, can you please give me another like it? So I can see if I can do it again? Thank you!

Here is the work, written out:

$$\require{cancel}\frac{y^2+10y+25}{5y^2+29y+20}\cdot\frac{5y^2-11y-12}{y+5} =\\ \frac{(y+5)(y+5)}{(y+5)(5y+4)}\cdot\frac{(5y+4)(y-3)}{y+5} = \\ \frac{\cancel{(y+5)}\xcancel{(y+5)}}{\cancel{(y+5)}\bcancel{(5y+4)}}\cdot\frac{\bcancel{(5y+4)}(y-3)}{\xcancel{y+5}} = y-3$$

In the morning, I answered,

Yes, you’ve got it. I

thoughtyou had it in you.You said,

Then I just assume that

whatever is identical in either numerator and either denominator can cancel outsince that’d equal one. (Or does this have to only happen on opposite sides, or only on the same side? Meaning the one fraction, not one numerator and the other denominator. Does that make sense?)Yes,

anything on topwill cancel with the same factoranywhere on the bottom, because it’s really one big fraction when you multiply:(y+5)(y+5)(5y+4)(y-3)--------------------- (y+5)(5y+4)(y+5)

As for providing another example, if you have a textbook, you can probably find more like that with answers in the back, though if this is a review section it might not have a lot.

You can also find

sites with problems to try; or try the examples at places like these without looking at the solutions until you’re ready:

https://tutorial.math.lamar.edu/problems/alg/rationalexpressions.aspx

https://www.purplemath.com/modules/rtnlmult.htm

https://mathbitsnotebook.com/Algebra1/RationalEquations/REmultiply.html

https://openstax.org/books/algebra-and-trigonometry/pages/1-6-rational-expressionshttps://www.openalgebra.com/2012/11/multiplying-and-dividing-rational.html

I just searched for “multiplying rational expressions” and picked the sites I most respect.

Some of these nicely hide the work for examples, so you can do it without looking, then just click a button and see the solution written out. Here, I was “teaching a student how to fish”, by pointing out sources of practice problems rather than just giving one or two.

In some concluding chat about continuing to use our site, Brittney said,

Can I write to you right here for additional problems?

I don’t really want the answers. I just want to know how to do it. I can even give you a problem, and you can change the numbers.I actually feel like I have made progress in a fraction (no pun intended) of the time it’s taken me elsewhere. The book isn’t as helpful for me as I would hope. My professor is very kind and intelligent, but doesn’t teach in a way that helps me. He assumes others have taken algebra recently, perhaps.

It’s really hard to teach a variety of students; and it’s hard for a book to communicate as clearly as face-to-face. But Brittney has exactly the right idea about getting help. As I replied,

That’s our usual preferred style, if you aren’t able to show any work at all, though we prefer seeing work.

Finally,

Thank you so much for helping me! I completed my section this evening, and couldn’t have done it without your help! Just when I learn one thing, just barely, I have to learn something new!

Hope to talk soon, take care!

Brittney

Hope to see you again soon, Brittney!

]]>