Here is a question from 2005 from a teacher, “WRW”:

Confusion over Interpretation of PEMDAS In telling students to "do multiplication and division IN THE ORDER THEY APPEAR,"it seems they want to always do multiplication first. I think they follow the PEMDAS rule BY THE LETTER, so they want to multiply before dividing. When doing multiplication first, 8 / 2 * 4 = 8 / 8 = 1 When doing multiplication and division from left to right, 8 / 2 * 4 = 4 * 4 = 16

I agreed with him:

If you think that students have a tendency to misinterpret the rule, you're probably right; but I think the reason is that PEMDAS is a poorly stated version of the rule, and it is easy to misunderstand it as meaning you do Multiplication, then Division, then Addition, then Subtraction. That's not what the rule is supposed to mean, but many students don't get past the letters and see the meaning! It's really wiser to think of subtraction as addition of the opposite, and division as multiplication by the reciprocal, and just leave D and S out of PEMDAS entirely, rather than try to fit them into the rules. But we make the rules for people who aren't ready to see things in a mathematically mature way! (I myself prefer to avoid PEMDAS altogether, and teach the "rules" in a more natural way that leads into this mature perspective.)

Where some people memorize the rule as “Please Excuse My Dear Aunt Sally”, if I use a mnemonic at all, I make it PEMA: “Please Excuse My Attitude”. It’s just Exponent-stuff, Multiplication-stuff, and Addition-stuff, with Parentheses acting as traffic cop, telling you when to do something other than what the signs say. I’ll include my own way of introducing the concept in a later post on why we need the rules.

But, continuing with an example:

Translating these ideas into the case of multiplication and division, when we write 8 / 2 * 4 we really mean 8 * 1/2 * 4 which we can do in any order, since multiplication is commutative; clearly, however you do it, it comes out to 16, not 1. The problem here is that people tend to see this as if it said 8 ----- 2 * 4 which means something different.

Note particularly that if we did the multiplication first in my example, then instead of $$8\times\frac{1}{2}\times 4 = 16,$$ we would be doing $$8\times\frac{1}{2\times 4} = 1.$$ Interpreting it correctly, the only number we divide by is the 2.

Also, seeing it this way allows me to rearrange the expression at will (since multiplication, unlike division, is associative and commutative). If I had, for example, $$7 \div 3\times 15,$$ I could think of it as $$7 \times \frac{1}{3}\times 15 = 7 \times 15 \times \frac{1}{3} =7 \times \left(15 \div 3\right) = 7\times 5 = 35$$ In effect, I’m dragging the division sign around with the number following it!

“WRW” answered,

Thanks so much! I really like the idea of thinking of division as multiplying by the reciprocal and turning the whole multiplication/division portion into just multiplication. I'll try that out with my students and see if it helps. Thanks again!

I didn’t mention there the fact that students outside of America are taught mnemonics like BODMAS, and students there sometimes think Division has to be done before Multiplication. Get them together, and you might have quite an argument!

Here’s a question from another teacher, Monica, the next year:

Incorrect Application of PEMDAS and Order of Operations I was working with students on the order of operations today and explained that multiplication and division are done from left to right, as are addition and subtraction. Apparently,they believe they were taught in the past to do all addition and then all subtraction. I tried to show examples of why that wouldn't work, but they simply did the problem their way, obtained a different answer and asked why it was incorrect. Are there any examples or explanations that would clearly explainwhythey must be done from left to right?

The same reasoning I gave for multiplication applies here, as I explained:

It's impossible to show that they MUST be done from left to right; that isnothing more than a convention we all agree on. Your class has shown that it makes a difference which order you use; that proves that we MUST make some choice that we can all follow. What that choice is, is not so definite. But it makes a lot of sense to go left to right, for the following reason.

You can’t prove that a particular grammar is “correct”, as if nature forced us to use it; every language has a different grammar, and each is correct for its own speakers. What makes a grammar correct is only that it is the same grammar used by other speakers of the language. So you’d have to prove that addition and subtraction are done left to right by showing that all the books do it that way.

But we can see *why it was a good idea*. It’s the same thing I said about multiplication and division:

We define subtraction this way: a - b = a + -b This allows us to think of any subtraction as an addition; we essentially just attach the negative sign to the number following it, rather than taking it as a different operation. The subtraction requires no extra rules, just the rules we already have for addition. If we do this, then 2 - 3 + 4 = 2 + -3 + 4 = 3 That is the same result we get if we do the operations from left to right (and it doesn't depend on whether we do the ADDITIONS from left to right, since addition is commutative!). If we did the addition first, we would get 2 - 3 + 4 = 2 - (3 + 4) = 2 + -(3 + 4) = 2 + -7 = -5 Note that this time, the negative sign ended up applying to ALL the following numbers, rather than just to the one after it.

So doing additions first would mean we are really subtracting *everything after a subtraction sign*. One benefit of replacing subtraction with addition of a negative, as in the multiplication case above, is to be able to move things around. For example, a common trick to evaluate a string of additions and subtractions more easily is to move all the subtractions to the end: $$5 + 3\ -\ 6 + 2\ -\ 8 + 1 = 5 + 3 + 2 + 1\ -\ 6\ -\ 8 = (5 + 3 + 2 + 1)\ -\ (6 + 8) = 11 0 14 = -3.$$ Without left-to-right operations, we couldn’t do this; we would have to look at the whole expression before rewriting any one subtraction as addition of the negative.

So doing additions and subtractions from left to right makes it easier to transform an expression into one involving only addition; and since addition is commutative and associative, it is MUCH nicer to work with! The rule, therefore, arises from the wish to make expressions easier to handle. Without it, a lot of algebra would turn out to be a lot harder. So your students should thank whoever first made this choice!

I closed by referring to the MD question above:

Now, your student's misunderstanding of the rule very likely comes from the use of PEMDAS or something equivalent, which is meant to be only a summary of the rules. It sounds as if A comes before S, but that twists the intended meaning of the mnemonic. See this page for another thought: Confusion over Interpretation of PEMDAS http://mathforum.org/library/drmath/view/66614.html That says essentially the same thing I just said, but about multiplication and division, which is an even bigger problem. (Did you know that in other countries they use BODMAS instead of PEMDAS, so students often think division should be done first?)

For another interesting take on left-to-right operations, see

Left Associativity

One of the most common difficulties in evaluating expressions is the mixing of negation with exponents. We have had many questions on this; in fact, I could have included this in the series Frequently Questioned Answers. I’ve chosen to use this question from 2002, whose answer covers most of the ideas we bring up (and refers to several other answers):

Negative Squared, or Squared Negative? After reading your answer in Exponents and Negative numbers http://mathforum.org/library/drmath/view/55709.html it seems to me that you're ignoring an important fact: -3 isn't just -1*3, but a number in its own right, i.e., the number 3 units to the left of zero. If that's the case, then shouldn't -3^2 have the value -3*-3, or 9? If -3 was intended to mean -1*3, then shouldn't it be written that way and not implied? Thank you for your time.

The answer he referred to is an early one from 1997 where Doctor Ken stated that \(-3^2 = 9\), because it means \(-(3^2)\), not \((-3)^2\). Now, if the convention is that negation is done after exponentiation, then that’s all we need to say. But Tom is arguing from the fact that \(-3\) is itself a number, so it has to be kept together. Does that require us to do the negation first? He has a strong argument (and a common one).

I took the question:

I do recognize thatit is possible to disagreeon -3^2. Dr. Rick's answer to a similar question, Squaring Negative Numbers http://mathforum.org/library/drmath/view/55713.html mentions this disagreement. Like you, he notes that if you think of -3 as a single number, it makes sense for the negation to bind more tightly to the 3 than any operation. That reasoning makes some sense, though I think other arguments are stronger. But I do agree that since there _is_ some reason to read it either way, it isprudent always to include parenthesesone way or the other, to clarify your intent, i.e., to write either -(3^2) or (-3)^2.

Minimally, we can say that it is wisest to avoid this form, either because it is easy to read wrongly, or because all the books teach it wrong (depending on your opinion)! In fact, I find that the books I most respect never show such a form (making it hard to find examples to point to!), while others, on the contrary, *emphasize* it because students always get it wrong unless it is drilled into them.

Occasionally people will try to argue the point based on the behaviors of particularcalculators or spreadsheet programs. However, these are really irrelevant, since they all define their own input formats, and programmers (of which I am one) are notorious for choosing what's easiest for them, rather than what is most appropriate for the user. I've noted in several answers in our archives that some calculators, and Excel, use non-standard orders of operation without apology. But calculators in particular just don't use standard algebraic notation in the first place.

I’ll be including a link to one of these discussions at the bottom. But the main point is simply that calculators have to follow a convention that suits the way you enter expressions on them, which is different from print. (As calculators have come to display expressions more like type, however, they have been forced to follow conventions more closely.)

We also get questions from people who claim they learned long ago something different from what their children or grandchildren are learning (either the whole PEMDAS business, or some part of it like this one):

There also seems to be a generational difference, with older people (including some teachers) claiming that they were taught to interpret -3^2 as (-3)^2. I suspect that what has changed is not the rules governing "order of operation" (operation precedence), but that schools are introducing the issue earlier, before students get into algebra proper. That means that they start by looking at expressions for which it is less clear why the rules make sense. I think you will rarely find examples of "-3^2" in practice, because there is no need for mathematicians to write it. You will find "-x^2" frequently.

Conventions of algebra apply primarily where we have variables; in arithmetic you don’t normally write long expressions with numbers, but just evaluate as you go. Basic four-function calculators were designed for such use, and don’t follow the order of operations. And the conventions make more sense on their home turf (with variables than with numbers):

If you approach the ideastarting with numerical expressionslike -3^2, you are thinking of -3 as a number and assuming that the expression says to square it. If you approach it firstusing variables, having first discovered that "-" in a negative number is actually an operator, then it is easier to see why -x^2 should be taken as the negative of the square. So I'll start with the latter, and then it becomes natural to treat numbers the same way we treat variables.

The point here is that in arithmetic, we see the negative sign as part of the number (“the number I’m attached to is negative”); in algebra, we see it primarily as an operator (“negate the thing that follows”). And the convention arises in the latter context. It isn’t primarily meant for use with numbers, but with variables.

Now, in an expression like -x, clearly "-" is a (unary) operator, which takes a value "x" and converts it to its opposite, or negative. The expression "-x" is not just a single symbol, but a statement that something is to be done to a value. As soon as we start combining symbols like this, as in -x^2 or -x*y, we have to decide what order to use in evaluating them. The trouble is that the "order of operations" rules as commonly taught (PEMDAS) don't mention negatives. So if we are going to go by the rules, we have to figure out how a negative relates to them. Well, there are two ways to express a negative in terms of binary operations.

There is no N in PEMDAS, or even in many fuller explanations of the convention. To see where it fits, we need to think about how its meaning relates to the other operations. How do mathematicians think of negation?

One is asmultiplication by -1: -x = -1 * x Treating it this way, clearly -x^2 = -1 * x^2 = -(x^2) That is, since -x means a product, we have to do the exponentiation first.

So if we think of negation as a kind of multiplication, it belongs right in there with MD (and, if you think about it, you’ll realize it doesn’t matter whether we think of it as does first, last, or left-to-right: If you negate a factor before multiplying or dividing, you get the same answer as if you negate after multiplying or dividing:

$$(-x)\cdot y = -(x\cdot y)$$

The other way to talk about negation is as theadditive inverse, subtracting x from 0: -x = 0 - x (This is why the "-" sign is used for both negation and subtraction.) Using this view, we see that -x^2 = 0 - x^2 = -(x^2)

In particular, we would like to be able to replace subtraction with negation wherever we find it, and not mess things up: \(x\ -\ y^2 = x + -y^2\), which would not be true if the latter meant \(x + (-y)^2\). This is why the subtraction idea is applicable even when we are not actually subtracting from 0.

So both views of negation produce the same interpretation, which does exponents first, and it is logical to put negation here in the order of precedence.

So if PEMDAS really means PE(MD)(AS), with operations in parentheses being done together, we can extend it as PE(NMD)(AS), where negation is definitely done after exponents and before addition.

But the fact is that there is no authority decreeing these rules; just as in the grammar of English, we get the "rules" byobserving how the language is actually used, not by deducing them from some first principles. The order of operations is just the grammar of algebra. So the real question is, how do mathematicians really interpret negatives and exponents combined in an expression? If you look in books, you will rarely find "-3^2" written out, but you will often find polynomials with negative coefficients. And you will find that -x^2 + 3x - 2 is read as the negative of the square of x, plus three times x, minus 2.

So, even though there is not a lot of evidence of usage with numbers, usage in polynomials (with variables) is clearly on the side of negation-after-exponentiation, and we want to be consistent.

I have come to believe that the order of operations is what it is largelyso that polynomials can be written efficiently. If "-x^2" meant the square of -x, then we would have to write this as -(x^2) + 3x - 2 to make it mean what we intend. Since powers are the core of a polynomial, we ensure that powers are evaluated first, followed by products and negatives (the two ways to write a coefficient) and then sums (adding the terms). Since we can easily see that this is how -x^2 is universally interpreted, it makes sense to treat -3^2 the same way.

Addition comes last so that a polynomial is a sum of terms; negation goes with multiplication in order to have the same base in every term, without having to use parentheses to avoid accidentally changing a base to \(-x\).

For some other discussions of this issue that haven’t already been mentioned, see

Precedence of Unary Operators Negative Numbers Combined with Exponentials Negative vs. Subtraction in Order of Operations

And for a long discussion with a programmer, see

Order of Operations and Negation in Excel

That is the discussion I referred to above, about how calculators and programs have different needs, as well as whether -3 should be thought of as a unitary entity.

]]>First, here is a very basic question from 1998:

Order Of Operations in Four Steps I need help figuring out what operation to do first. I have heard of Pemadas but I do not know what it means. Can you help?

Doctor Schwenoha answered:

Not pemadas, but PEMDAS. We have used this acronym for the order of operations for a long time to help remember the key words: Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction. There is a tendency to just remember the words and not remember some groupings that occur, though. I have lately been teaching the order of operations as a list of 4 things rather than using pemdas. 1. Parentheses - do everything in parentheses first. Go to theinnermost parenthesesfirst if there is more than one set of parentheses in the problem. If there is more than one set but they are isolated from each other, then do themindependently. If you are dealing with afractionyou should treat the top as if it were in parentheses and the bottom as if it were in parentheses even if the parentheses weren't written in the original state. That's because the fraction bar means division and we'll get to that after we take care of any parentheses.

In addition to PEMDAS, there are several other versions used in various English-speaking countries, such as BODMAS, BIDMAS, BEDMAS, and so on. I’m not sure how far back any of them go, but I imagine they started in the 20th century, and probably among teachers.

This first level of precedence essentially tells how to explicitly state the order you intend, and how to interpret it. Parentheses, “(…)”, and fraction bars, “\(\frac{\cdots}{\cdots}\)“, are two “grouping symbols” that tell you “do this part first”. Other symbols, such as brackets, “[…]” and braces, “{…}”, are equivalent to parentheses, and just let us match them up more easily.

The comments about “innermost parentheses” and “isolated parentheses” refer, respectively, to forms like \((A\cdots(B\cdots)\cdots)\) and \((A\cdots)\cdots(B\cdots)\); in the first case you must evaluate *B* before you can do *A*, while in the second you can evaluate *A* and *B* in any order, as long as you do both before anything outside of them.

One thing left out here is that the rest of the rules still apply within parentheses; you can’t “do” parentheses themselves, so you can’t finish them before doing any operations. For example, in $$2(3x-4y)-5$$ we have to apply the rule that the multiplications, \(3x\) and \(4y\), must be done before the subtraction, in order to evaluate what is in the parentheses.

2.Exponents- After clearing up any parentheses that you can, you should next go to any exponents. Remember that the exponent goes with the thing it is closest to. If it had been closest to a parenthesis sign then you have already cleared up the parentheses before worrying about the exponent.

As usually written, an exponent is also set apart by being raised, so it acts as a sort of grouping symbol. You must evaluate the exponent as a number before you can apply it. In typing, we use the caret, “^”, to indicate an exponent; since that notation does not implicitly show where the exponent ends, it is necessary to use parentheses when there is more than just a number or variable, as in “2x^(n+1)”.

But that is not the main point of this step. The important thing here (and the part that students easily get wrong) is that the base (the number to be raised to a power) is just whatever the exponent is directly attached to. For example, $$2x^{n+1}$$ is evaluated by first evaluating \(n+1\), then raising the base \(x\) to that power, and only then multiplying by 2.

3.Multiplication AND divisionas you come to it going from left to right - these two operations need to be seen as a team rather than as separate entities. Using PEMDAS to remember the words is fine, but you have to see the "MD" as a connected word.

So any consecutive groups of multiplications and divisions are done before additions or subtractions, each group by itself: $$2\div 3 \times 6\ -\ 2\times 3 \div 6$$ means that you do the division and multiplication in the first group, $$2\div 3 \times 6 = \frac{2}{3}\times 6 = 4$$ and the multiplication and division in the second group, $$2\times 3 \div 6 = 6\div 6 = 1$$ before adding them: $$4 + 1 = 5$$

4.Addition AND subtractionas you come to it going from left to right - again, see the "as" as a connected word.

Once we’ve reached this point, we just have a string of additions and subtractions, and we do them all in order as written. The order of operations tells us to see any expression as a group of terms being added and subtracted (unless parentheses modify that).

So, there is the order of operations. The only thing that makes this the correct order is that mathematicians all over the worldagreeda long time ago to do it this way. So no matter if you speak German and another person speaks French, you both speak MATHEMATICS and can communicate with each other.

Yes, this is a convention (that is, an agreement among its users) that is “correct” only because it has been agreed to; but that doesn’t mean it is arbitrary. As I mentioned, we will come to the likely reasons for it in a later post.

A set of rules is one thing; but how do you actually *use* them to evaluate an expression? That’s the subject of this 2003 question:

Parentheses from the Inside Out I don't understand evaluating expressions. The things that I find most difficult are following PEMDAS and multiplying the fractions by the whole numbers without using a calculator. Here's a problem from my homework. 2b divided by a+2 to the second power. b = 1.5, a = 3 1. 2(1.5)divided by 3 + 2 to the second power. 2. 3.5 divided by 3 + 2 to the 2 power 3. 1.5+4 4. 5.5 is this right?

Kaila has to evaluate an expression with variables, given specified values of those variables. The specific expression here appears to be $$2b\div a + 2^2,$$ all in a line. But it might have been written with a fraction bar and/or parentheses, as $$\frac{2b}{(a + 2)^2}$$ or maybe $$\frac{2b}{a}+ 2^2.$$ Because it is not written exactly as given (and plain text email made that difficult), it is hard to be sure.

Doctor Ian chose to start off with another (slightly more complicated) example to explain the whole process, bypassing these uncertainties. He starts with Parentheses, which as we saw above let us explicitly say what to look at first. Note that in typing, we use “*” for “×” and “/” for “÷”. We have to start by looking at the contents of the *outermost* parentheses:

Let's look at an expression like 2 + 3 * (4 - 5 * (6 / 3)) - 4The parentheses are like an envelopethat we have to open to find out what's inside. The first parentheses we run into are (4 - 5 * (6 / 3)) so we forget about everything else while we work this out: 4 - 5 * (6 / 3)

He is ignoring everything outside this outermost pair of parentheses for now, as if spreading out the mail and finding one big package to open. But that package contains another package:

Oops! We have more parentheses. So let's forget about everything else until we work out 6 / 3 Okay, there's just one operation, so we do it: 6/3 = 2, so we can go back and replace the parentheses (and everything inside) with the result: 4 - 5 * 2

What we’ve done to far is to dig down to the *innermost* parentheses, and do what was inside.

If there was a more complicated expression inside than \(6\div 3\), we would have had to follow all the other rules even in there. Those rules tell us to do multiplications and divisions first:

Now we have no parentheses, so we look for multiplications and divisions. There is just one multiplication, so we do it: 4 - 10 And now we just have a subtraction, so we do that: -6 So now -6 replaces what was in the original parentheses: 2 + 3 * -6 - 4

This represents the entire expression, having replaced the parentheses (that big package) with its value.

Again, we have just one multiplication, so we do it: 2 + -18 - 4 And now we have additions and subtractions, so we do them left to right: 2 + -18 - 4 -16 - 4 -20 And that's our result.

That’s the basic process.

But we also have to be aware of what *not* to do:

Note that doing operations right to left (instead of left to right) can give you the wrong answer. For example, consider 72 / 6 / 3 Doing the operations right to left would give us 72 / 2 which is 36; while doing them left to right gives us 12 / 3 which is 4. Also, if we do 10 - 5 - 3 from right to left, we get 10 - 2 which is 8; but if we do it from left to right, we get 5 - 3 which is 2.

After giving another example, where he inserts parentheses to show the order, he gets back to the original question and the ambiguity due to the use of words rather than symbols:

Note that the phrase 2b divided by a+2 to the second power could be interpreted in more than one way. It might mean 2b 2 (2b divided by a+2) to the second power --> ( --- ) a+2 or 2b 2b divided by ((a+2) to the second power) --> -------- 2 (a+2) or 2b 2b divided by (a+(2 to the second power)) --> ---------- 2 a + (2 )

But, if it was copied as closely as possible, then there is only one literal interpretation, \(2b\div a + 2^2\). He adds parentheses, step by step, to show the required order:

And in fact, with no parentheses, following the PEMDAS order, the phrase would be interpreted this way: 2b divided by a+(2 to the second power) E (2b) divided by a+(2 to the second power) M or D ((2b) divided by a)+(2 to the second power) M or D that is, 2b 2 ---- + (2 ) a So if they really wrote it in symbols, as 2 2b ÷ a + 2 instead of using words, then this last interpretation is the conventional one. Note that a fraction bar acts like two pairs of parentheses with a division sign in between: blah blab blah -------------- = (blah blah blah) / (yadda yadda) yadda yadda

How about Kaila’s work?

> 2b divided by a+2 to the second power. b = 1.5, a = 3 > 1. 2(1.5)divided by 3 + 2 to the second power. > 2. 3.5 divided by 3 +2 to the 2 power > 3. 1.5+4 > 4. 5.5 is this right? Let's follow the PEMDAS order, and see if we get the same thing. There is an exponent, so we want to evaluate that first. Then we want to do multiplications and divisions, from left to right. Finally, we want to do additions and subtractions from left to right. 2 * 1.5 / 3 + 2^2 --- Exponent 2 * 1.5 / 3 + 4 ------- Multiplication 3 / 3 + 4 ------- Division 1 + 4 ----- Addition 5 Result

So there’s the correct value.

Why is this different from your answer? For one thing, it looks as if you multiplied 2 by 1.5 and got 3.5, instead of 3. That may have been a slip, or it might indicate that you need to work on your multiplication skills.

I think she may have just accidentally added. I don’t know about the \(3.5\div 3 = 1.5\); but she correctly did the exponent first.

To check, I'd probably think about money. If two of us have $1.50 each, how much money do we have? Two dollars and two half dollars is three dollars, so 2 * 1.50 must be 3. But everyone thinks about math a little differently from everyone else, so you have to find out what works for you. Anyway, I hope this has helped you see why we have these conventions, and what can happen if you do operations out of order. Write back if you'd like to talk more about this, or anything else.

The next question, from 2007, gave us a chance to see how to approach a really big expression. Here we have multiple grouping symbols, and numerous decisions to be made (though there are no exponents):

Evaluating Parentheses, Brackets, Braces and Grouping Symbols (18/2){[(9 x 9 - 1)/ 2] - [5 x 20 - (7 x 9 - 2)]} Parentheses, brackets and braces are very confusing to me. For instance, the mathematical sentence above displays more brackets, parentheses and braces than numbers. According to the mathematical rules in place today, what am I supposed to know in order to see this problem and quickly know where to start and where to follow next in order to ensure that I will always get to the right answer? Even though I know that I am supposed to start with the innermost parentheses and then follow with the [ ], and then the { }, I still feel very uncomfortable with these figures mixed with the numbers. (18/2){[(9 x 9 - 1)/ 2]-[5 x 20 - (7 x 9 - 2)]} Here, I start by: 9 x 9 = 81 - 1 = 80. But then what do I do? Keep going through the ( ) and divide 80 by 2 = 40? If that's the right course of action, then I'd follow with: 7 x 9 = 63 - 2 = 61, then I would come back and do: 5 x 20 = 100 - 61 = 39. And then, last, I'd divide 18 by 2 = 9. Then, 40 - 39 = 1; then 9 x 1 = 9? Obviously, I am going more by instincts than by logic. What do I need to know in order to laugh about problems like the one above instead of worrying about them?

One possible misunderstanding here is a belief that grouping symbols must be used in a certain order; but Nelson is probably just describing the order in which they appear (from the inside out) in this example. The reality is that, although this order, {[(…)]}, is common in practice, there is no rule distinguishing the symbols. They are used only to help finding matching pairs.

I responded:

The first thing to do is to start with something not quite so complicated, so you can get used to the ideas first. But let's go ahead with this one, to check your work.

In similar cases with younger students who seemed to be jumping in the deep end, I’ve dropped their problem and just showed one they are ready for. But Nelson seemed ready to tangle with monsters, so I took it on:

Here's one way I write these to demonstrate how to think it through: (18/2){[(9 x 9 - 1)/ 2]-[5 x 20 - (7 x 9 - 2)]} \____/ \_________/ \_________/ 9 {[ 80 / 2]-[5 x 20 - 61 ]} \______________/ \____________________/ 9 { 40 - 39 } \_______________________________________/ 9 * 1 \____________________/ 9 So you're correct, and your work was fine. The only thing I did differently was to evaluate 18/2 earlier, because nothing stood in its way; I could have waited as you did.

I did something like what Doctor Ian did, but more compactly, replacing one chunk at a time with its value. Notice that I did more than one thing on a line, which will deal with Nelson’s main question.

Now we can break it down and think about why I did what I did:

What parentheses do is to contain a subexpression that has to be fully evaluated before it can be used in any containing expression. That's why you work from the inside out: you can't use what's inside until you evaluate it all, so you might as well start there. But if you forgot to, you'd still have a reminder. Here's an example: 2[(3 + 7)(3 - 2) - 3(2 + 2)]

What if I didn’t know to start on the “inside”, but just knew the rules?

If I didn't bother with the inside-out "rule", I might just start trying to evaluate at the left (paying attention to the order of operations, of course): 2 times ... what? Well, the second number in that multiplication is the whole thing inside [...], soI have to put it on holduntil I do that. So I focus on (3 + 7)(3 - 2) - 3(2 + 2) Now I start that. The first piece is (3 + 7), so I evaluate that whole thing and get 10. Now I have to multiply it by (3 - 2), so I stop and evaluate that, which gives 1. Now I can multiply 10 by 1 and get 10. So I keep going; I have to subtract something from that, but since the next bit is a product, I have to do that first. I'll have 3 times the next parenthesis; that's 3 times 4, so I have 12. The subtraction I put off is 10 - 12 = -2. Now, this is what the whole [...] is, so I go back and do that last multiplication: 2*(-2) = -4

This involved a lot of thinking, setting something aside and making sure to come back to it later. It’s not what I’m going to recommend doing, but an exercise to see how it all works.

That was pretty ugly, wasn't it?That's how a computer would evaluate it(more or less); it just keeps putting something on hold and coming back to it when it's ready, becauseit has a really good memory and won't forget to do it!We don't recommend this method for humans, but it can be done. Here's how I'd usually do it: 2[(3 + 7)(3 - 2) - 3(2 + 2)] \_____/\_____/ \_____/ 2[ 10 * 1 - 3* 4 ] \______/ \___/ 2[ 10 - 12 ] \_________________________/ 2* -2 \______________/ -4 Again, I just evaluated ANY parenthesized subexpression that didn't have anything standing in its way (that is,ALL the innermost ones); then I went through it again evaluating everything that was left the same way.

Notice what Doctor Schwenoha described as independently evaluating isolated parts. It doesn’t matter in what order I do things that don’t affect one another.

Even that fairly compact way of writing it is something I do largely when I’m trying to show someone what is going on inside my mind:

In reality, on paper, my work might look like this, just jotting down the value of each parenthesis as I came to it, but doing most of the work in my head: 2[(3 + 7)(3 - 2) - 3(2 + 2)] = 2[10 - 12] = -4 10 1 4

But it is important to write *something* down so I can see what needs to be done, and avoid making mistakes. I’m not a computer!

My point is that inside-out is not a magic formula; it's just a natural result of what parentheses do. Wherever you find a parenthesis, you make sure it gets evaluated before you use that particular result in any further operations. So, for example, that (18/2) in your example could be done at any time, because it wasn't needed until the end anyway. I suspect your "instinct" is to do exactly this, and it fits with the logic perfectly (when you let it operate).

For another version of these ideas, see

Order of Operations: Parentheses as Packages

Next time, we’ll look at details that are often missed.

]]>First is a question from 2002 about squares:

Eight Circles, Sum is 13 Place the numbers 1,2,3,4,5,6,7,8 in the eight circles so that the sum of the numbers in any line equals 13. O O O O O O O O There are two different solutions. O O O O O O O O I am getting nowhere. Please help soon.

So we want something like this, which is less than a full magic square, and therefore more flexible:

Doctor Greenie took this:

Hi, Trevor - Thanks for sending this nice little puzzle to us here at Dr. Math. I had some fun and got some good mental exercise in reasoning this one out. The given information says the sum of the numbers in each row of three must be 13. The total of all four of these rows is then 13*4=52. The sum of the numbers we are to use: 1, 2, ..., 7, and 8, is 36. In finding the sum of the four rows of three, the numbers in the corners of the array of circles get counted twice. This means that the difference between the sum of the numbers in all four rows of three and the sum of the eight numbers we are using is the sum of the four numbers in the corners of the array. So we know the following: the sum of the four corner numbers is 52 - 36 = 16

The four corners together account for the difference between the sum of the 8 numbers, and the sum of the four sums, so they must add up to 16:

Now, with the sum of the three numbers in each row being the odd number 13, each of these four rows must contain either (a) three odd numbers or (b) two even numbers and one odd number. Since the whole array must contain four even and four odd numbers, the only possible arrangements of evens and odds in the array are the following two (where "E" and "O" denote even or odd numbers, respectively): E O E O O O O O or E E E O E E O E

One way to see this is to start with the lower left number. If it is even, then exactly one other number in its row can be even, and likewise in its column. If the lower right is even, then depending on whether the upper left is even we are forced into the first arrangement or the second by the need for four of each. If the lower left were odd, either its row is all odd or both others are even, and we are forced into one of these, both of which are equivalent to the second pattern:

E O E O E E E E or O O O O O O E E

This sort of thinking about “parity” (whether a number is even or odd) is often useful to restrict options.

However, we can rule out the first possibility [even corners], because in that configuration, the sum of the four corner numbers is 2+4+6+8=20; and we have determined that the sum of the four corner numbers must be 16. So the configuration of even and odd numbers in the array is the second pattern shown above.

So now we know that one row is all odd. And we can be sure which numbers those are, since 1+3+5+7 = 16, so it must be the 3 that is omitted there. Doctor Greenie went a different direction:

Now, the sum of the numbers in the two vertical rows must be 13*2=26; and the sum of the four even numbers is 20; therefore, the sum of the two odd numbers in the two vertical rows must be 6, so those odd numbers are 1 and 5. And then the other odd number in the top row must be 7 to make the sum in that row 13; so the odd number in the bottom row is 3. So now we have determined that the configuration is 1 7 5 E E E 3 E

From here, you can determine the possible placements of the even numbers in their four slots by working with the required sum of 13 in either vertical row or in the bottom row; you will see that there are two solutions in the pattern we have established: 1 7 5 1 7 5 4 6 or 8 2 8 3 2 4 3 6 These are the two solutions to your problem.

All solutions can be obtained from these by rotation or reflection, for a total of 16.

A 2004 question took a challenging problem and made it harder:

Making a Hard Square Sum Problem Easier My name is Danny and I am in 6th Grade. We are working on fractions and I have been given the following problem to solve. Given these 8 numbers: 1/4, 1/2, 3/4, 1, 1 1/4, 1 1/2, 1 3/4, and 2, I am to place 3 numbers along each side of a square so that the sum of the 3 numbers on each side of the square is equal to 3. It seems like I have tried every combination but when I get to the fourth side the 3 remaining numbers don't add up to 3. Is there a trick to doing this kind of problem? I really would appreciate some help. Thanks!

I answered this question, not by working directly with the ugly numbers given, but by transforming the problem to a nicer one (which may remind you of a trick we used last week):

I suspect you are supposed to just do a lot of trial and error, giving you lots of practice adding fractions. But there are some tricks that I used to solve it--mathematicians are always looking for easier ways to solve problems!One trick is to avoid fractions entirely. Notice that all your fractions are multiples of 1/4. What would happen if we had a solution to your problem, and then multiplied every number by 4? It would still have the sum of each side the same, but those sums would be 4 times as much. So we can solve your problem by first solving an easier problem: Arrange the numbers 1,2,3,4,5,6,7,8 around a square so that the sum of the three numbers on any side is 12. O + O + O = 12 + + O O + + O + O + O = 12 = = 12 12

The numbers in the solution to this problem will all be 4 times those in the other, so dividing them by 4 will give the solution. The whole thing could have been done using the fractions (which I would write using their common denominator, to make adding them easier, at least); but anything that will reduce the chances of error, and make the problem feel more tractable, is good.

From there, I moved on to the trick used above, finding the sum of the corner numbers:

That will take a lot less arithmetic to figure out; but there's still another trick to use. Think about what happens when you add all four sides together: the sum will be 4 times 12, or 48; but you will have added the corners in twice and the side numbers only once. That is, sum of all eight numbers + sum of corners = 48 Do you see that? From this you can figure out what the sum of the corner numbers has to be, and there are only a few ways that can happen. So you have only a few possibilities to try.

Since the sum of the numbers 1 through 8 is 36, the sum of the corners must be 12. They can only be 1+2+3+6, or 1+2+4+5.

Once you solve that, you can change your solution into a solution of the original problem. Think about what we did to change it from the fractions to the whole numbers, and reverse that process to go from the whole numbers back to the fractions. This is an example of how mathematical thinking can change a hard problem into an easier one. And that's what makes math a fun challenge--it's no fun to do a lot of arithmetic, but it's fun to find sneaky ways to avoid it!

We’ll finish the problem as part of the next answer.

In 2014, we got a question about this problem with magic sum 12:

One Box of Eight Digits, Four Sums of Twelve Place the numbers 1, 2, 3, 4, 5, 6, 7, 8 along the outside of a 3x3 grid so that the sum of the numbers in each of the two rows or columns equals 12. Each of the numbers 1-8 can only be placed once. So far, I've figured out that the 8 must appear with the 1 and the 3. I've tried to use that discovery to arrange the other five digits -- and nearly get all four edges to total 12 -- but keep running into a wrong sum along the way, as in the left edge of this array: 1 8 3 5 7 4 6 2 Please help. I'm 42, studying to become a educational assistant. This was an example we were given in one of my courses for fun. I'm so lost and am getting frustrated as I haven't been in school forever.

Shannon has clearly done some good initial work. I answered:

I'm glad this was given to you "for fun"; these things can be frustrating if you feel you have to do them. But learning to meet the challenge can also be exhilarating. (Well, maybe that's too strong a word for most people. But at least, learning that you can control the frustration by looking for ways to reduce the complexity of the problem is a valuable outcome of doing these -- and one that you can then pass on to kids.)

I’m always encouraged when a puzzle is presented in the right way. And I love helping future (or current) teachers.

I chose to do what Shannon must have done (thinking about what sums can make 12), and see what more can be done with that:

You've made a good start by noticing that 8 can only occur with 1 and 3; that means 8 has to be in the middle of a side, since it can't be shared by two sums. I haven't worked out an answer yet, but am just thinking out loud here: why not continue your same line of reasoning, and see if any other numbers can fit only one way? That may lead to wondering if it would help to make a list of ALL ways to add three different numbers to get 12. Let's start listing: 1 3 8 1 4 7 1 5 6 2 3 7 I think we're in luck; this won't be a long list. (Do you see the method I'm using to make an orderly list?)

I wanted to leave as much as possible for Shannon to do; but here is the full list, as I showed it above:

1 + 3 + 8 = 12 1 + 4 + 7 = 12 1 + 5 + 6 = 12 2 + 3 + 7 = 12 2 + 4 + 6 = 12 3 + 4 + 5 = 12

Continuing to Shannon,

Finish this, and then maybe look for a group that uses the 1 (for the left side), a group that uses the 3 (for the right side), and one more triple that can go on the bottom. This will be more like assembling a small jigsaw puzzle than tackling a huge task by trial and error. Now, I'll step aside and try actually solving it with this insight, to make sure I'm not leading you in a wrong direction or missing a really nice trick. ... and it worked just fine!

I often make suggestions without actually solving a problem first, in order to be working with them rather than for them; but when I do that, sometimes I miss an issue that will stump them. This time, there was no problem with my plan.

Here’s how that method worked: We have the top,

3 8 1

There are two possibilities for the column under 3 (2 and 7, or 4 and 5), and two for the column under 1 (4 and 7, or 5 and 6). Since the two columns can’t share any numbers, they must be {2, 7}{5, 6}. Now, the number in the middle of the bottom must be the one unused number, 4; and to make the bottom row sum to 12, the other numbers must be 2 and 6. Our answer is:

3 8 1 7 5 2 4 6

This was a strongly trial-and-error method. What if we had used Doctor Greenie’s method on this one?

First, what is the sum of the corner numbers? The four sides add up to 48, which is 12 more than the sum of the numbers, so the corner numbers must add up to 12. They must be either 1 + 2 + 3 + 6 or 1 + 2 + 4 + 5.

How about parity? Each side, having an even sum, must be either all even, or one even and two odds. The only possible patterns are

O E O O E O O O or E E E E E O E O

Now we can list the possible sums to 12, as we did with full magic squares:

With three evens in a row, we must have (in some orientation)

3 8 1 7 5 2 4 6

With odds in the corners, the sum of the corners would be 16, not 12. So there is only one solution (ignoring rotations and reflections), which is the same one we found by trial and error.

Finishing up Danny’s problem, we have to divide everything by 4:

2/4 4/4 6/4 1/2 1 3/2 7/4 5/4 = 7/4 5/4 3/4 8/4 1/4 3/4 2 1/4

We never heard back from Danny to be sure how he did.

Here is a question from 2001:

Magic Pentagon There is a pentagon, and on each side of the pentagon, there are three circles. How can you make the sum of the three circles all the same as the others? You can only have 4 answers: 14, 16, 17, 19. You can only use the numbers from 1-10, and you can only use each of them once because there are only 10 circles. I figured out all the possible three numbers that could add up to 14. None of them are the same, so it looks as if there are only a few. 1 + 3 + 10 = 14 1 + 4 + 9 = 14 1 + 5 + 8 = 14 1 + 6 + 7 = 14 2 + 3 + 9 = 14 2 + 4 + 8 = 14 2 + 5 + 7 = 14 4 + 3 + 7 = 14 5 + 3 + 6 = 14 I looked in the archive and found a similar question but I still can't figure this one out.

Note that here we are given a list of magic sums; we could have worked out what the possibilities are, but they’ve saved us that work.

Ramona has already done some of the work I’d have suggested!

I had a few more ideas, starting with the old corner trick:

I can suggest a few tricks that help a lot in problems like this. I easily foundthe solution where the sums are 14using these methods, and you can probably do the rest almost as easily. First, what happens if you add all five sides together? The sum will be 5*14, or 70; but that will be the same as adding all ten numbers, and then adding the five corner numbers again (since each of them counts on two sides). This says that 55 (the sum of 1 through 10) plus the sum of the corner numbers is 70; so the corner numbers add up to 70-55, which is 15. A little thought will show you exactlywhich numbers you have to use at the corners! Now, place the first of those numbers (1) at one corner, say the top. You will find that the second number (2) can't go next to the 1, because then the number between them would have to be 11 in order to get a sum of 14. So you can place the 2 at one of the bottom corners. Now where can the third number go? If it is next to the 2, you will find a problem, so that leaves only one place for it. Keep on like this to fill in the corners. Now just find what has to go in the middle of each side in order to add up to 14, and see if it works out. I recommend trying the sum of 19 next, before tackling what are probably the hardest cases, 16 and 17. But I haven't tried them myself yet, so maybe you'll find they're easy! This puzzle is probably meant mostly to give you lots of practice adding, but also lets you develop your own ways to solve logical problems. It won't all be easy, but at the least you will learn how to go through all the possible arrangements in an orderly way. At best, you may find an even better way to solve these than I came up with!

I’ll leave it to you to solve the other cases.

We had a similar question the next year:

Pentagon Puzzle

We have also been asked about magic triangles of the same sort, typically asking a different kind of question:

Magic Triangle Sums

Stay tuned for more puzzles, from time to time.

]]>I’ll start with a relatively simple version of the problem, from 2006:

Number Puzzle with Digits 1-9 in a 3 by 3 Grid In a 3 cell by 3 cell grid, use the digits 1 through 9 to fill in the cells so each horizontal, vertical, and diagonal row of three has a sum of 15. No digit may be used more than once. I've tried multiple ways with no solution! Frustration! This puzzle is my 4th grader's POW (Parent Over Worked). I have no idea why my son's math teacher would send something like this home other than to have the parents do it.

Here the class is given the numbers to use and the total for each row (which is a significant help: We’ll later see it being left for the student to work out). We have to fill this in:

If you don’t know anything about the puzzle, it can seem like a lot of busy work at best, and frustrating trial and error at worst. And, yes, a lot of students probably come away frustrated. But, in fact, trial and error is a valuable skill, and a parent’s primary role may be to encourage patience.

I answered:

This is a standard (and ancient) puzzle called aMagic Square. I'm not sure what the point is in assigning it, myself: many people know about it and can either look it up or build it using some fairly simple rules; those who don't just have to use lots of trial and error. I don't know how one would work it out using any specifically "mathematical" ideas, apart from those very specific techniques for building magic squares. I would hope, since it is so unfair as a test of any particular skill, that its purpose is simply FUN. I'm sure it's not meant to frustrate kids or make their parents do a lot of work. Enjoyment of puzzles is one of the foundations of later math skill!

So how would I approach it as a fourth-grader?

I'll pretend I've never heard of the puzzle, and try talking through what I might do to solve it by trial and error. Maybe that will give you a start at how to guide your child to work on it, and perhaps even enjoy it. I'll just draw the grid as _ _ _ _ _ _ _ _ _ Let's suppose we juststart by trying the 1 in the left corner: 1 _ _ _ _ _ _ _ _ We have to be able to get 15 in the horizontal row, the vertical row, AND the diagonal containing the 1! So we need to make 14 using two numbers, in three different ways. Let's see ... that would be 9+5, 8+6, and 7+7 -- oops! We can't do it, since the numbers have to be different. So1 can't be in a corner. We've learned something important!

We need to fill in three pairs that each add to 14, and we can’t do it:

An important rule for solving unfamiliar puzzles is to just **try something**! Whatever you do, if you **pay attention**, there will be things to learn, even if they are only what **not** to do. (Some of what we’re learning here will be used more deliberately in a more advanced answer later.)

How about putting 2 in the corner; then we need three pairs of numbers that each add up to 13 so that the total in each direction is 15: 2 _ _ _ _ _ _ _ _ We can use 9+4, 8+5, and 7+6. That looks better. But where shall we put them? Let's just try one possibility, and see what goes wrong that we could fix: 2 9 4 7 8 _ 6 _ 5

Again, I’ve just tried something, to see what I can learn:

Again, we don’t have to know what we’re doing; we’re just feeling our way around to learn about the nature of the problem. I arbitrarily put each pair in some direction, and in decreasing order going away from the 2. (My trained instincts actually tell me that might be the *worst* thing to do, but I’m deliberately ignoring that, in order to demonstrate how to learn.)

I’ve put in a row, a column, and a diagonal; what other three-in-a-row have I made?

First, I see we've made a diagonal; does that add up to 15? 6+8+4 = 18, not 15. So maybe the first thing we have to do is to pick one number from each pair to go on the diagonal. We need to take away 3 from the sum; we could do that by justswapping the 8 with the 5. And in fact, that's the ONLY way without moving the pairs themselves to new places, since swapping in the other pairs will always INCREASE the sum. So now we have 2 9 4 7 5 _ 6 _ 8

Rather than arbitrarily place the pairs, I needed to intentionally place numbers on the diagonal. But in fact, I could use my naive first placement as a basis for a modification. Nothing I’ve done has been wasted, because I’m being observant.

Four of the six sums are correct! I've taken you almost all the way to a solution, though maybe not to the only one, as far as we can tell, since there are a lot of rearrangements I didn't try (putting a different pair than 5,8 on the diagonal, for example, or putting 3 in the corner). I'll let you finish, and then try guiding your child to find a solution.

And here’s the final answer:

Note that because we are just using trial and error, we don’t know whether there are other solutions; but at this level, we’ve had a great success in finding a solution at all!

The sort of thinking I've just demonstrated is basic mathematical reasoning--wego through possibilities in an orderly way, looking at what happens andmaking adjustments. I don't know whether this sort of thing is taught in 4th grade (or, perhaps, can really be taught at all); but I think the main benefit in assigning puzzles like this is the opportunity for students to discuss their reasoning and develop the skill oftalking about how they think. This "reflective thought" is an important part of good learning, and I hope your child gets a chance to do it, either with you or in class or with fellow students at other times.

It was fun talking about my thinking here (also called metacognition – being aware of how you are thinking, which is a necessary part of developing greater skills), and I hope it was a good model for both parent and child. The father responded,

Thanks for the help and the quick response. Sometimes things that seem simple can be very frustrating! With your very detailed instructions it made it understandable.

An older student can use a more orderly method; in effect, we will just be front-loading much the same kind of thinking we did in the trial and error approach. Here is a question from 2005:

Solving a 3 x 3 Magic Square Place the numbers 1-9 in a 3 by 3 grid, one number per box, so that the vertical, horizontal, and diagonal sums are all the same. I have tried and tried to figure this out, but I can't seem to get it. I know that small numbers should be on the end because that is what our teacher said, and I'm pretty sure the middle number is 9 but I just haven't been able to find the answer.

I’m not sure what the hint about small numbers means. The middle-number guess is wrong (as we’ll specifically see in our last example below).

Doctor Wilko took this one:

You could certainly use a "trial and error" approach and get a correct solution to the 3x3 magic square, but it sounds like you've tried that without luck, so let's try a more methodical approach. One way a 3x3 magic square can be constructed is by using a little simple arithmetic and algebraic reasoning.

The first issue we face is that in this version of the problem, we haven’t been told what the sum of each row (the “magic number”) has to be. Can we figure it out? This is a classic trick:

One could reason that the numbers 1-9 add up to 45, and since all these numbers are contained in three ROWS (exclusively),the sum of each ROW must be 15. I want to make sure you understand this before proceeding, so look at the little algebraic argument below that "proves" that each row should sum to 15:

This quick explanation in words is enough for some people, but an explicit demonstration will help others:

Since we don't know the order of the numbers 1-9 that correctly fill out the 3x3 magic square, substitute the variables a-i into the square. +---+---+---+ | a | b | c | +---+---+---+ | d | e | f | +---+---+---+ | g | h | i | +---+---+---+ We know that a + b + c + d + e + f + g + h + i = 45 grouping the letters by rows we get (a + b + c) + (d + e + f) + (g + h + i) = 45 But since the sum of each row should be equal (let's say the sum equals X), the rows can be rewritten as (a + b + c) = X (d + e + f) = X (g + h + i) = X and the equation above can then be rewritten as X + X + X = 45, or 3*X = 45, so X = 15 This shows that the three rows sum to 15. It then follows from the definition of a magic square that all the columns and diagonals will also sum to 15.

In some puzzles (as we’ll see next time), a key number like this is not determined by the problem; but in magic squares, it is. That’s an important first step.

Now we have to think about how to arrange the numbers to get that sum. Rather than discover the issues that will arise by trial, Doctor Wilko considers them ahead of time:

OK, now we know that each row, column, and diagonal will sum to 15, so the challenge is to figure out HOW to arrange the numbers to make that happen. This may be done by a brute-force method as follows. Basically, through trial and error, I found all the ways that I could take three numbers from 1-9 and get a sum of 15: 1 + 5 + 9 = 15 1 + 6 + 8 = 15 2 + 4 + 9 = 15 2 + 5 + 8 = 15 2 + 6 + 7 = 15 3 + 4 + 8 = 15 3 + 5 + 7 = 15 4 + 5 + 6 = 15 Again, double check me here! Convince yourself that these are the only ways you can get a sum of 15 from three numbers chosen from 1-9.

I can see that in making this list, he has actually used, not a random trial and error method, but an orderly search. He kept the numbers in increasing order in each sum, and started with the first number being 1, then the second number being the smallest possible value. The result is a list much like a list of numbers in increasing order (158, 168, 249, …) This way, we can be sure that nothing was missed. This is closely related to the way I started with 1 in the corner and listed pairs that add to 14, then tried 2. (Do you see my list of pairs that sum to 14 hidden in there?)

For what he does next, I find it helpful to write the sums as follows, with each number assigned a column; this also shows a pattern in the numbers that helped in making the list:

1 + 5 + 9 = 15 1 + 6 + 8 = 15 2 + 4 + 9 = 15 2 + 5 + 8 = 15 2 + 6 + 7 = 15 3 + 4 + 8 = 15 3 + 5 + 7 = 15 4 + 5 + 6 = 15

Here we can see where each individual number fits into the list. By the way, did you notice that there are 8 sums here, and we’ll need each of them, since there are 3 rows, 3 columns, and 2 diagonals, for a total of 8 sets of three to add? That suggests how “magical” a magic square really is!

Now, from the equations above, note the following connections to the 3x3 magic square: 1, 3, 7, and 9 are each in TWO equations that sum to 15. The middle cells of each outside row/column are each in TWO equations (One row, one column). +---+---+---+ | - | x | - | +---+---+---+ | | | | | +---+---+---+ | | | | | +---+---+---+ (I'm willing to bet that 1, 3, 5, and 7 will each fill one of these middle cells on the outside rows/columns!)

We’re exhaustively examining each possible type of cell, and comparing them to our exhaustive list of sums.

2, 4, 6, and 8 are each in THREE equations that sum to 15. The corner cells are each in THREE equations (One row, one column, and one diagonal). +---+---+---+ | x | - | - | +---+---+---+ | | | \ | | +---+---+---+ | | | | \ | +---+---+---+ (From this, I'd be willing to bet that 2, 4, 6, and 8 are going to fill the corners of the magic square!) 5 is in FOUR equations that sum to 15. The middle cell is in FOUR equations (one row, one column, and two diagonals). +---+---+---+ | \ | | | / | +---+---+---+ | - | x | - | +---+---+---+ | / | | | \ | +---+---+---+ (From this it seems likely that 5 should go in the middle cell of the 3x3 magic square!)

Now we’re all set to start actually build a magic square with confidence (having bypassed all the “errors”, so our “trials” will work):

Using the above observations, let's fill out the square! Looking at a blank 3x3 magic square, one can see that the middle cell should be in four equations (one row, one column, and two diagonals), and looking at the equations, one can see that 5 is the only number in four of the eight equations. Therefore, 5 can be put into the middle cell. +---+---+---+ | | | | +---+---+---+ | | 5 | | +---+---+---+ | | | | +---+---+---+ Now there are four corners which when filled, are each used in three equations. By putting any of the four numbers (2,6,4,8) in the upper-left corner (2 in this example), only one number can go in the bottom-right corner (8 in this example) to make the sum of that diagonal be 15. +---+---+---+ | 2 | | | +---+---+---+ | | 5 | | +---+---+---+ | | | 8 | +---+---+---+ Now, either of the other numbers (4 or 6 in this example) can go in the bottom left corner (6 in this example), leaving only one choice for the top right corner (4 in this example). +---+---+---+ | 2 | | 4 | +---+---+---+ | | 5 | | +---+---+---+ | 6 | | 8 | +---+---+---+ Last, the remaining four numbers (1, 3, 7, 9) can be placed in only one way to make the sums be 15. +---+---+---+ | 2 | 9 | 4 | +---+---+---+ | 7 | 5 | 3 | +---+---+---+ | 6 | 1 | 8 | +---+---+---+ This is one correct solution to the 3x3 magic square. There are seven other solutions. A 3x3 magic square contains eight possible solutions total; four rotations and four reflections.

We had only two points where we made a choice here: We picked one of 4 possibilities for the upper left corner, and then one of 2 possibilities for the upper right. That makes a total of 8 ways we could have done it; and each of these can be obtained by rotating what we did, or reflecting it. So in a sense all 8 solutions are really the same solution placed differently. By chance, we got the very same solution as before.

Let’s look at one more question of this sort, this one from 2001:

Magic Square Variations A magic square consists of numbers arranged in a square so that all rows, columns, and usually the two diagonals will add up to the same sum. Try to create a magic square by arranging the first nine counting numbers in the nine square cells. There is only one possible way. Can you please help me?

This is the usual 3×3 magic square question. As we’ve seen, it’s not quite right to say there is only one way to do it. Doctor Jeremiah answered, first finding the “magic sum”:

There are actually 8 different ways, but they are all rotations and mirror images of the same one. First consider that if you have 3 cells wide by 3 cells high, you will have to put the numbers 1 through 9 in these nine cells. The sum of the diagonals, rows, and columns will be the same. That means that the sum of all three columns must be the same as the sum of all nine numbers because the nine numbers fit into the three columns. (Let's call the sum of a column, row, or diagonal S): sum of 3 columns = sum of all nine numbers 3S = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 3S = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 3S = 45 3S / 3 = 45 / 3 S = 15 So the "magic sum" is 15.

Next, rather than list all possible sums, he focused on the middle cell, using inequalities:

Let's think a bit about what number must be in the middle. It's an important number because it is used in every sum (all the rows, columns and diagonals).If that middle cell holds 6, then what? In which cell can you put the 9? You can't put it anywhere, because 6+9 = 15 with only two numbers, and we need to make _three_ numbers add to 15. So 6 and above cannot be in the middle cell.If that middle cell holds 4, then what? In which cell can you put the 1? You can't put it anywhere, because 4+1 = 5, and to make 15 you need to put 10 into a cell, but 10 isn't a choice because it's not one of the 9 counting numbers. So 4 and below cannot be in the middle cell. That leaves 5. With 5 in the middle cell the solution is easy (especially if you know the magic sum is 15).

He left the “patient” with just these hints. A good next step might be to observe that opposite cells will all have to sum to 10.

Another question we’ve answered dealt with a modified version of the question: a 4×4 square with a special set of numbers, and no diagonals to worry about:

Almost a Magic Square

Most of the questions in the Ask Dr. Math archive about magic squares tell about routine methods to be learned for making magic squares of various sizes, without talking about how those algorithms would have been invented. I’ll eventually put those into a post, but here are a couple of them if you are interested:

Finding Magic Squares (odd sizes) How to Create a 4 x 4 Magic Square Even-Numbered Magic Squares

Next time, I’ll look at some “magic squares” (and triangles and pentagons) that use only the edges of a figure, not a solid square.

]]>Here is the first version we got, from a 4th grader in 1997:

Coconut and Monkey Puzzle Please help me solve this puzzle. "Five men were stranded on an island. They went around picking up coconuts for years. One day, they saw a ship coming. They had a radio so they sent a message to come and pick them up. The ship said "yes, tomorrow morning!" The five men went to sleep but the first man woke up and thought "I don't trust my buddies," so hetook 1/5 of the pileof coconuts. Then a monkey came down andtook 1 coconut. The second man woke up and didn't trust his buddies either, so he took 1/5 of the remaining pile of coconuts. The monkey came down again and took 1 coconut. During the rest of the night, the third, fourth, and fifth men did the same and the monkey took 1 coconut after each man. In the morning, the five men tried to divide the remaining pile of coconuts into five equal portions buthad one left over, which they gave to the monkey. How many coconuts were in the original pile?

This is a classic problem; according to Wikipedia, it originated in a form similar to this one in 1926. There are a couple subtle differences, however, which we’ll see later. One defect in this version is that it implies there is only one answer; any correct statement of such a problem will ask for the smallest possible solution.

Doctor Rob answered this one:

This problem, or variants of it, have been around for a long time. This is how you solve it. Let a be the number of coconuts to start with. After the first man and the monkey took their coconuts, the number left was b = (4/5)*a - 1. After the second man and the monkey took their coconuts, the number left was c = (4/5)*b - 1. The third man left d = (4/5)*c - 1 coconuts. The fourth man left e = (4/5)*d - 1 coconuts. The fifth man left f = (4/5)*e - 1 coconuts. At the end, f = 5*g + 1, where g is the number of coconuts each man got in the morning.

After a bit of work substituting each equation in the previous one (which I’ll let you look at in the original), he arrives at this linear Diophantine equation:

1024*a - 15625*g = 13630. Any positive whole numbers a and g which are a solution of this equation will give you a solution to your original problem. The problem has been reduced to finding the value of a.

He then divides successively by 5 and powers of 2, introducing a new integer variable at each step, to arrive at:

h - 3125*r = 2499. One solution to this is r = 0, h = 2499. There are other, larger ones, such as r = 1, h = 5624, and r = 100, h = 314999, but we will stick with the smallest one. The general solution is h = 2499 + 3125*r, r any nonnegative whole number. Backtracking, we get q = 1, p = 3, n = 12, m = 25, k = 51, j = 204, i = 409, h = 2499, g = 818, f = 4091, e = 5115, d = 6395, c = 7995, b = 9995, and a = 12495. Sure enough, 1024*12495 - 15625*818 = 13630.

So we’ve solved the equation, and found that the smallest possible original pile was 12,495 coconuts.

Does this work? Let's check. Starting with 12495: The first man took 2499 coconuts, and the monkey took 1. This left 12495 - 2500 = 9995 coconuts. The second man took 1999 coconuts, and the monkey took 1. This left 9995 - 2000 = 7995 coconuts. The third man took 1599 coconuts, and the monkey took 1. This left 7995 - 1600 = 6395 coconuts. The fourth man took 1279 coconuts and the monkey took 1. This left 6395 - 1280 = 5115 coconuts. The fifth man took 1023 coconuts and the monkey took 1 This left 5115 - 1024 = 4091 coconuts. In the morning, each man got 818 coconuts and the monkey 1 more. It checks! Hooray! If we backtrack using h = 2499 + 3125*r, we will find that the general answer is a = 12495 + 15625*r coconuts, for any nonnegative whole number r. The men must have done a whole lot of counting in the middle of the night!

This would be a lot of work for a fourth grader, too.

Now, in 1998 we got a different version of the puzzle, still with five people and a monkey:

Coconut Piles Here's the problem: Gilligan and his buddies were stranded on a desert island. Gilligan, the professor, Ginger, Mary Anne, the Skipper, and Fred the monkey were gathering coconuts. One evening they all rounded up all the coconuts they could find and put them in one large pile. Being exhausted from working so hard they decided to wait and divide them up evenly in the morning. During the night Gilligan awoke andseparated the nuts into five equal piles, with one left overwhich he gave to Fred the monkey. Gilligan took one pile, hid it, pushed the other four back together, and went back to his hut. He was followed by Ginger, Mary Ann, the Professor, and the Skipper, each dividing them up equally with one remaining nut going to Fred. The next morning the remaining nuts weredivided up equally with one remaining going to Fred. What is the least number of coconuts they could have started with?

Do you see the difference? The final division is the same (the one taken by the monkey being a remainder from the division), but the first five here have every step working that way, while the first version had the monkey take one after an even division. (It’s possible that that was a mistake in the wording.)

This version is equivalent to the original from which the 1926 form was derived.

Doctor Rob took this question, too, and after referring to the first one, said:

The difference is that in this problem, the monkey gets his coconut before the five-way split, and in the problem on the other Web page, he gets it after. Subtle, but important. The equations for your problem are these. Let a be the number of coconuts to start with. After the first person and the monkey take their coconuts, the number left is b = (4/5)*(a-1). After the second person and the monkey take their coconuts, the number left is c = (4/5)*(b-1). The third person leaves d = (4/5)*(c-1) coconuts. The fourth person leaves e = (4/5)*(d-1) coconuts. The fifth person leaves f = (4/5)*(e-1) coconuts. At the end, f = 5*g + 1, where g is the number of coconuts each person gets in the morning.

He does not go through all the details of solving this new system of equations in separate steps, but does all the substitutions at once, and leaves us to simplify it:

Now when you perform the chain substitution to find the equation relating a and g, you get: 4*(4*[4*(4*[4*(a-1)/5-1]/5-1)/5-1]/5-1)/5 = 5*g + 1 1024*a - 15625*g = 11529

I’ll let you check that he got that right. He leaves Fallon to carry out the same procedure as before, and find the actual solution.

He also suggests a more standard way to solve the equation:

There is another way, using the Extended Euclidean Algorithm. You can use that to find that: 1024*10849 - 15625*711 = 1 Now multiply by 11529, and reduce the a-value modulo 15625 to get the answer.

In 2001, Doctor Rob answered another question equivalent to the last one except that there are seven monkeys doing the division. For the sake of space, I’ll jump to his answer:

Monkeys, Coconuts, and Seven Piles ... The equations you have to solve are a = starting amt of coconuts b = (6/7)*(a-1) = amt after 1 monkey, c = (6/7)*(b-1) = amt after 2 monkeys, d = (6/7)*(c-1) = amt after 3 monkeys, e = (6/7)*(d-1) = amt after 4 monkeys, f = (6/7)*(e-1) = amt after 5 monkeys, g = (6/7)*(f-1) = amt after 6 monkeys, h = (6/7)*(g-1) = amt after 7 monkeys, i = (1/7)*(h-1) = amt each got at the end. Clearing fractions, these become 6*a - 7*b = 6, 6*b - 7*c = 6, 6*c - 7*d = 6, 6*d - 7*e = 6, 6*e - 7*f = 6, 6*f - 7*g = 6, 6*g - 7*h = 6, h - 7*i = 1.

Watch the next step:

Eliminating in turn b, c, d, e, f, g, and h, these equations give, in turn, 6^1*a - 7^1*b = 6*(7^1 - 6^1), 6^2*a - 7^2*c = 6*(7^2 - 6^2), 6^3*a - 7^3*d = 6*(7^3 - 6^3), 6^4*a - 7^4*e = 6*(7^4 - 6^4), 6^5*a - 7^5*f = 6*(7^5 - 6^5), 6^6*a - 7^6*g = 6*(7^6 - 6^6), 6^7*a - 7^7*h = 6*(7^7 - 6^7), 6^7*a - 7^8*i = 7^8 - 6^8.

It’s not immediately obvious, but by constantly clearing fractions, and writing everything as powers rather than calculating actual values, he has made an ugly thing almost beautiful. In an even simpler solution below, we’ll be seeing equations much like these.

This last equation has a particular solution a = -6 and i = -1. (Check to make sure you see why this works.) The general solution is given by a = -6 + 7^8*t, i = -1 + 6^7*t, where t can be any integer. Putting t = 1 gives you the smallest possible positive answer for a and i. I leave it to you to find the number of coconuts each monkey got.

It is easy to find this solution with negative numbers; what isn’t obvious (unless you’ve done enough work with Diophantine equations) is to think of doing so at all, when the problem assumes positive numbers.

So the pile started with *a* = 5,764,795 coconuts, and each got *i* = 279,935 in the final division.

Notice the really nice "virtual solution" starting with a = -6 coconuts: a = b = c = d = e = f = g = h = -6, i = -1, each monkey ends up with -2 coconuts, and 8 end up in the ocean!

Give that some thought!

Earlier in 1998, we had received a different version. The wording is very different, with monkeys taking the place of people; but the only real differences are that we have 3 rather than 5, and that there is no final division. The question at the end is different, too.

Monkeys Dividing the Coconut Pile This is a problem I could not solve. Please help me out. Three monkeys spend a day gathering coconuts together. When they have finished, they are very tired and fall asleep. The following morning the first monkey wakes up. Not wishing to disturb his friends, he decides to divide the coconuts into 3 equal piles, but there is one left over, so he throws this odd one away, helps himself to his share, and goes home. A few minutes later the second monkey awakes. Not realizing that the first has already gone, he too divides the coconuts into 3 equal heaps, finds one left over, throws the odd one away, helps himself to his fair share, and goes home. Then the third monkey does exactly the same. What is the smallest possible number of coconuts left?"

Doctor Anthony answered:

If N = original number of coconuts, then the first monkey takes (N-1)/3 as his share, leaving 2(N-1)/3 behind. Then the second monkey takes: 2(N-1)/3 - 1 2(N-1) 1 ------------ = ------ - --- 3 9 3 leaving behind: 4(N-1) 2 ------ - --- 9 3 The third monkey takes: 4(N-1)/9 - 2/3 - 1 4(N-1) 5 ------------------- = ------ - --- 3 27 9 leaving: 8(N-1) 10 8(N-1) - 30 ------ - --- = ------------- 27 9 27 Here, we assume that the third monkey does not just grab everything left after the other two have gone.

(Yes, since the others have left, we lack the motivation present in other versions!)

We now have an expression for the final amount.

After more work with fractions, he obtains a Diophantine equation as before, and because the numbers are smaller, he suggests just trying numbers.

You’ll see in a moment why I am skipping over all the details.

In subsequent years, Doctor Anthony answered many questions of this type, but in a very different way; these answers were never archived. Here is one that should have been, from 2008:

You posted a solution for the three monkeys and the coconuts, subject "Monkey Problem." I wanted to expand that to five monkeys ans could not seem to come up with a solution. Can you please shed some light onto it? Here's the three monkey problem and your solution: Monkeys Dividing the Coconut Pile

As this referred to his answer, Doctor Anthony responded to it, by replacing that method with one that is far quicker. He did this for the standard problem, with 5 sailors and a final division:

The solution that I gave 07/29/98 is far too long-winded and I would certainly not use the same method again. It is best to use modular arithmetic and solve the problem in a couple of lines. The normal setting would have 5 sailors on a desert island who collect a pile of coconuts and then go to sleep. During the night the sailors wake up in turn and each divides the pile into 5 taking one portion and in each case have 1 left over which they give to a local monkey. In the morning there are still some coconuts left which they divide again for the last time into 5 and again have 1 left over for the monkey. What is the least number of coconuts in the original pile for this situation to be possible?

Here is the entire solution:

We will divide by 5 a total of 6 times altogether counting the last division in the morning. Let x = number of coconuts in the original pile Each division must leave the number of nuts in the same congruence class (mod 5). So x = (4/5)(x-1) (mod 5) (the -1 is because of the monkey) 5x = 4x - 4 (mod 5) x = -4 (mod 5) So if we began in the modulo class -4 nuts then we will remain in the modulo class -4. Since ultimately we have to divide by 5^6 we begin with 5^6 - 4 = 15621 coconuts. So the original pile had 15621 coconuts.

Let’s think through that!

When he talks about a congruence class, he simply means that the result at each step leaves the same remainder, namely 1; so the number at the start and end of each step must differ by a multiple of 5. At each step, if we start with *x*, we end up with \(\frac{4}{5}(x-1)\). So the difference of these must be a multiple of 5, which I’ll write as 5*k* (for some integer *k*): $$x – \frac{4}{5}(x-1) = 5k$$

Multiplying by 5, $$5x – 4(x-1) = 25k$$ $$x + 4 = 25k$$ $$x = 25k – 4$$

This shows that *x* must be 4 less than a multiple of 25 [not 5 …].

The rest is hand-waving; I’m not actually sure whether there are sound reasons for ultimately saying that, in order to pass through 6 steps of division, the original number *has* to be congruent to \(-4 (\mod 5^6)\); but even if we just have a feeling that this will work, we can check it! He finished up by doing so, which justifies the answer.

Back in 1999 we got the following question, which contained a hint that turns out to be lead to a more elementary version of Doctor Anthony’s method:

More Monkeys and Nuts I have looked through your archive and found a couple of variants on the monkeys sharing nuts theme. None is specifically the same as the problem I have (I don't think) although it is very similar to one that is answered at some length with formulae and substitution, etc. The person who set me this puzzle suggested thatit was possible to deduce the answer without going to this trouble, and gave me acluewhich I will add at the end of the puzzle. The puzzle: Five monkeys collect nuts, which they leave in a pile. During the night one wakes up and divides the pile into 5. There is one left over. He eats the remainder nut and his 1/5 share, and mixes the nuts together. The second monkey comes down, divides the pile into 5 with one left over, and so it goes on; each left pile divides into 5 with one left over and each monkey eats its share plus one. The question is, what is the least number of nuts that they had amassed in order for this to work? The clue: Apparently, by askingwhat would have happened if there were 4 more nuts collected, the answer can be found without lengthy calculations - in fact I am told of somebody who solved it in his head over lunch given this advice. I have played around with the idea at length but have grown frustrated, as I have not yet solved the problem. What do you think? Thanks for your help; I look forward to hearing from you.

This is like the classic version, except that it lacks the final division.

I had no special knowledge of the problem, but I had fun figuring out the clue:

Hi, Michael. I've been playing with this off and on for a few days, and getting confused because of the variations among versions of the puzzles! My biggest frustration has been trying to make my answer agree with one of the others. Yes, this clue does help, at least with your version of the puzzle.

I began by setting the stage for the usual procedures:

Let's suppose that the initial number of nuts is X_0. I divide the pile by five and have one left over, so each pile is (X_0-1)/5, and the number I leave is X_1 = (X_0 - 1) * 4/5 The same process is repeated five times until I have a fairly complicated expression for X_5, the number left at the end.

Can we avoid the big equation?

Suppose weset 4 nuts next to the pileand don't touch them through the whole process (so they AREN'T part of the dividing by five - although that's not quite how you described the hint). Thetotal number of nutsis Y_0 = X_0 + 4 Y_1 = X_1 + 4 = (X_0 - 1) * 4/5 + 4 = (Y_0 - 4 - 1) * 4/5 + 4 = (Y_0 - 5) * 4/5 + 4 = Y_0 * 4/5 - 4 + 4 = Y_0 * 4/5 Soat each step, the total number of nuts is just multiplied by 4/5, and we can easily see that Y_5 = Y_0 * (4/5)^5 For this to be a whole number, Y_0 must be a multiple of 5^5, and the smallest possible value would be exactly that, or 3125. Then X_0 is four less than this, or 3121.

Do you see that this is essentially the same as Doctor Anthony’s answer, and is easily justified? We can even see that the 4 we added corresponds to his -4: It’s the amount that brings the total up to a multiple of 4. As he had said, the number at every step is congruent to -4, mod 5.

As always, we have to check:

Now let's try it out: X_0 = 3121 X_1 = (3121 - 1) * 4/5 = 2496 X_2 = (2496 - 1) * 4/5 = 1996 X_3 = (1996 - 1) * 4/5 = 1596 X_4 = (1596 - 1) * 4/5 = 1276 X_5 = (1276 - 1) * 4/5 = 1020 This final number, of course, is 4^5 - 4.

I went on to show that if we modify this to include the sixth round of division in Version 2 above, we get an answer (starting number 15,621, each gets 4092) that satisfies the equation given there.

How would you *invent* the hint? I gave some suggestions:

The trick amounts to a change of variables that simplifies the equation. To find such a change, you could try Y = X + a, and see what value of a will help: X_1 = (X_0 - 1) * 4/5 Y_1 - a = (Y_0 - a - 1) * 4/5 Y_1 = Y_0 * 4/5 + a - (a + 1)*4/5 To make the equation simpler, we want a - (a + 1)*4/5 = 0 5a = 4(a + 1) a = 4 Or, you can just have a flash of insight and try adding four nuts for no reason at all.

This amounts to Doctor Anthony’s reasoning. Or you could just observe that each division leaves a remainder of 1, so the numbers are obviously all congruent to 1, and therefore to -4 (which differs from it by 5). Therefore adding 4 nuts at every stage will result in a multiple of 5.

I think we have a winner!

Our archives also contain a couple more modified forms of the problem; I’ll just give you the links.

First, from 2004, one that is not looking for the smallest starting number:

The Sailor's Reward Problem and Prime Numbers

Next, from 2010, one that gives the final number, so it is just a matter of working backwards:

Coconuts, Forwards and Backwards

So many puzzles, so little time!

]]>We’ve see this problem with a couple different sets of numbers; here is the first version we got, in 1996:

Weighing Bales of Hay You have 5 bales of hay. Instead of being weighed individually, they were weighed in all possible combinations of two: bales 1 and 2, 1 and 3, 1 and 4, 1 and 5, bales 2 and 3, and bales 2 and 4 etc. The weights of each of these combinations were written down and arranged in numeric order, without keeping track of which weight matched which pair of bales. The weights in kilograms are 110, 112, 113, 114, 115, 116, 117, 118, 120, and 121. How much does each bale weigh? Is there more than one possible set of weights? Explain your answer.

Note that with 5 bales, there are \({5\choose 2} = 10\) possible pairs, so we do have all pairs, none of which are equal.

Doctor Alain showed how to start solving the problem, leaving it unfinished:

Let the 5 bales be in increasing weight order and call their weights B1, B2, B3, B4 and B5.There can't be 2 bales of the same weightor else there would be pairs of bales with the same weight (if B1 = B2 then B1 + B3 = B2 + B3). The lightest pair is 110 kg so (i) B1 + B2 = 110. The second lightest pair is 112 kg so (ii) B1 + B3 = 112. The heaviest pair is 121 kg so (iii) B4 + B5 = 121. The second heaviest pair is 120 kg so (iv) B3 + B5 = 120. From (iv) and (ii) we get B5 = B1 + 8. If we put this back in (iii) we get (v) B1 + B4 = 113. so the third lightest pair is bale 1 and bale 4. The fourth lightest pair can be bales 1 and 5 OR bales 2 and 3. So (vi.a) B1 + B5 = 114 OR (vi.b) B2 + B3 = 114. Try each of these equations. One works out fine - the other doesn't.

With ten numbers, we could have written ten equations *if* we knew which sum is which number; we only need five equations to solve for five variables. That’s the problem. We have started with four equations, based on the largest and smallest numbers; the fifth, being derived from those, adds no information to the system of equations, but does help decide what the other sums have to be. The first four, plus one of the two options for the third, will yield our solution.

Not a bad method, though you might prefer to avoid the need to try two possibilities.

For a different method with similar difficulty (and with different numbers), see this answer by Doctor Pete in 1997:

Weighing Bales of Hay

Earlier in 1997, we had a similar question (with the same smaller numbers):

Weight of Each Bale of Hay You have a question like the one I am going to ask but with different numbers, so if you could help me ... You have 5 bales of hay. Instead of being weighed individually, they are weighed in all possible combinations of two: bales 1 and 2, 1 and 3, 1 and 4, 1 and 5, bales 2 and 3, and bales 2 and 4, etc. The weight of each of these combinations is written down and the weights are arranged in numeric order, without keeping track of which weight matches which pair of bales. The weights in kilograms are 80, 82, 83, 84, 85, 86, 87, 88, 90, and 91. How much does each bale weigh? Is there more than one possible set of weights? Explain your answer.

Doctor Rob chose to use a very different method with no explicit algebra:

First, notice thatno two bales can have the same weight, since not enough of the numbers appear twice (in fact, no number appears twice). If two bales were of equal weight we should see at least three pairs of equal numbers. Second, notice that if you add up all the numbers and divide by four, you will get thetotal weight of the five bales, 214 kilograms.

Each of the five weights has been added to each of the other 4, so each appears 4 times among the 10 sums. Adding the 10 sums, we get the sum of 4 times each weight. If the weights are A, B, C, D, and E, we now know that \(A+B+C+D+E = 214\).

Third, notice that thelargest numberis the weight of the two heaviest bales, and thesmallest numberis the weight of the two lightest bales.

Algebraically, \(A+B = 80\) and \(D+E = 91\).

Now if you subtract the largest and the smallest numbers from the total weight, you will get the weight of the middle bale, 43 kilograms. Since 43 added to each of the other four weights are integers, all the weights must be integers.

Adding \(A+B = 80\) and \(D+E = 91\), we get \(A+B+D+E = 171\), and subtracting this from \(A+B+C+D+E = 214\), we get \(C = 43\). And this tells us that A and B must be less than 43, while D and E must be greater than 43.

(You may not have noticed that we aren’t *told* that the weights are all integers or not; it is natural to *assume* that, but it might not have been so! Now we are sure.)

Now we leave the pieces that can be expressed algebraically, and start using the fact that the weights are distinct integers:

Then the lightest two bales must have unequal weights at most 42, and which sum to 80, so they are either (38,42) or (39,41). Since the number 81 is missing, no bale can have weight 81 - 43 = 38, so (38,42) is eliminated. Thus the three lightest bales have weights 39, 41, and 43. This accounts for the numbers 80, 82, and 84. The two heaviest bales must have unequal weights that sum to 91 and which are at least 44, so they are (44,47) or (45,46). Since the number 89 is missing, no bale can have weight 89 - 43 = 46, so the last two weights are 44 and 47.

Since \(A+B = 80\) and neither number can be more than 42, they must be either \(38+42 = 80\) or \(39+41 = 80\). But if A were 38, then another of the sums would be \(38+43 = 81\), and that can’t happen. So we’ve eliminated one pair, and we know that \(A = 39\) and \(B = 41\). Similarly we find that \(D = 44\) and \(E = 47\).

So the weights are 39, 41, 43, 44, and 47 kg.

Now check: 39 + 41 = 80 39 + 43 = 82 39 + 44 = 83 39 + 47 = 86 41 + 43 = 84 41 + 44 = 85 41 + 47 = 88 43 + 44 = 87 43 + 47 = 90 44 + 47 = 91

The check is required, because until now we haven’t used all of the sums. But it works.

Some people would complain that this is not as “mathematical” as one of the algebraic methods, but that is not true; much of mathematics is more logical than algebraic.

In 2002 we again got essentially the same question:

The Haybaler Problem: Reflections and Refinements Say you have five bales of hay. For some reason, instead of being weighed individually, they were weighed in all possible combinations of two: bales 1 and 2, bales 1 and 3, bales 1 and 4, bales 1 and 5, bales 2 and 3, etc. The weights of each of these combinations were written down, and arranged in numerical order, WITHOUT KEEPING TRACK OF WHICH WEIGHT MATCHED WHICH PAIR OF BALES. The weights in kilograms are 80, 82, 83, 84, 85, 86, 87, 88, 90, and 91. How much does each bale weight? Is there more than one set of possible weights? Explain how you know. Once your are done looking for solutions, look back over the problem to see if you can find some easier or more efficient way to find the weights.

(Note that last paragraph: That is Polya’s final step, and is good teaching!)

This time Doctor Greenie answered, giving a quick algebraic solution that has much in common with the elimination method. It happens that, because we already had several such answers in the archive, this answer was not published at the time; we’ll see why it was below. After first referring to the three answers we already had (in the order I have listed them), he offered his method:

Here is my personal approach to this problem, which is quite similar to the method used on the third page referenced above: (1) Since the combined weights of the bales two at a time are all different, the individual weights of the bales are all different (if they were not, some of the weights obtained by weighing two bales at a time would be the same) (2) Let the weights of the bales, from lightest to heaviest, be denoted by a, b, c, d, and e

This is how all answers have begun. So is the next bit:

(3) We can logically conclude that a + b = 80 [lightest combined weight = two lightest bales] a + c = 82 [second lightest weight = lightest plus third lightest] c + e = 90 [second heaviest weight = heaviest plus third heaviest] d + e = 91 [heaviest combined weight = two heaviest bales] (A common error in trying to solve this problem is to think that, for example, the third lightest combined weight is a + d; however, it could also be b + c. The four combinations above are the only ones we can logically be sure of.)

That is a valuable addition: in observing someone solve a problem, it is important not only to see what he does (here, identifying those four pairs), but also what he does not do! If you were to try solving without thinking very carefully, momentum might lead you to write more equations that are not necessarily true. Math requires this level of care.

(4) Now here is the key to my method: If you add up all the figures for the bales weighed two at a time, then each bale gets counted in that grand total 4 times -- once when weighed with each of the other bales. So you can find the sum of the weights of the 5 bales: a + b + c + d + e = (80 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 90 + 91)/4

You will recognize this from Doctor Rob’s method, though he didn’t express it algebraically. This sum is 214.

He briefly describes how to finish up:

(5) Using two of the results from (3) above, we can find a + b + d + e; then, comparing that sum to the sum a + b + c + d + e which we know from (4), we can find the value of c Once we have the value of c, the weights of the other bales are found very easily, using the equations in (3).

Let’s do that. We now know that \(c = 214 – (80 + 91) = 43\). Putting that into the second equation, \(a + c = 82\), we find that \(a = 82 – 43 = 39\), and from the third equation, \(c + e = 90\), we find that \(e = 90 – 43 = 47\). Then from the first equation, \(a + b = 80\), we get \(b = 80 – 39 = 41\); and from the fourth equation, \(d + e = 91\), we find that \(d = 91 – 47 = 44\).

The “patient” got the answer:

This is what I got as an answer: a = 39, b = 41, c = 43, d = 44, e = 47 Is that correct?Is that the only possible answerand why/why not?

The answer is correct, and either way of stating it (listing weights, or identifying individual bales in order) is good. Doctor Greenie acknowledged that:

Those are the numbers I got. We know there is only one solution because there is nothing in our solution process where we had to make an arbitrary choice or make a guess as to where to go next. The equations we used exactly described the problem, and that set of equations had only one answer.

Then, 11 years later (2013) a reader (Jim) wrote us, having apparently read only the first answer above (1996), and suggesting a better way. I responded, pointing out that his answer was much like Doctor Rob’s and then quoting for him Doctor Greenie’s not-yet-published answer above, which is even more like it. As a result, the latter was then added to the archive, and Jim’s communication was appended to it – giving the accidental impression that it is a response to Doctor Greenie, when in fact it is responding to Doctor Alain. Here it is:

I'd like to explain a cleaner way to finish solving the problem, and provide generalizations that can help students solve other "equivalent" problems. When I first saw the problem, I solved it as a discrete math problem, using very little (almost no) linear algebra. That is a bit tedious -- but it worked well for my daughter, who didn't have linear algebra skills. The solution you gave starts with linear algebra, but then (in the last step) views the problem as a discrete math problem, asking you to "try" a limited set of possibilities. It turns out that you can finish the problem quite nicely with *only* linear equations, which also proves uniqueness. The critical realization is thatthe sum of all the given pair-wise weights is exactly 4 times the sum of all the actual hay bale weights. As a result, is is easy to calculate what the sum of all the bale weights are. In linear algebra terms, "you now have a 5th equation" to accompany the first four (re: sum of the 1st and 2nd; sum of the 1st and 3rd; sum of the 4th and 5th, sum of the 3rd and 5th).

I’ll be showing my own “discrete math” (logical) method soon.

But there is a much nicer way to solve these -- a way that kids who haven't seen simultaneous equations can understand. Since you realized that the least and second-to-least bales summed to one number, and the largest two bales summed to a second number, you can subtract that from the "sum of all 5 bales."This instantly gives you the weight of the middle bale.:-) It is then easy to substitute back into the equations you had earlier and get all the answers. As an additional benefit, this simplifies the problem, which -- in my opinion -- is always nice.

This summarizes Doctor Greenie’s method.

Now Jim added a new insight we haven’t seen yet:

I've seen a couple of variants of the hay baler problem on the Internet, but I didn't see any solutions that took advantage of the following insight. When given some set of pairwise weight sums, you can generally reduce the problem by asking:What would happen if I took away the same weight from each hay bale?For example, with sums of 110, 112, 113, 114, 115, 116, 117, 118, 120, and 121, what would happen if we took away 50 pounds from every hay bale? The answer is of course that all pairwise weights would be reduced by 100 pounds, and then the problem would involve only 10, 12, 13, 14, 15, 16, 17, 18, 20, and 21. Working with "small numbers" tends to cause fewer arithmetic mistakes, and diverts your brain less from the "real problem." [I used this technique to run through a tedious set of possibilities when first solving the problem.] Seeing this translation also explains how to solve a wide variety of effectively identical problems. This is an important trick in problem solving.

We’ve seen two sets of numbers so far; have you noticed their similarity? The other set, 80, 82, 83, 84, 85, 86, 87, 88, 90, and 91, differ from the larger numbers by exactly 30; subtracting 35 from each bale, and therefore 70 from each pair sum, will yield exactly the same set of smaller numbers.

(It’s interesting that I’ve almost always seen this problem with one of these two sets of numbers, even though it is not hard to make up a problem like this. Rarer versions involve watermelons, pumpkins, or dogs, and most of them use numbers equivalent to those we’ve seen. One that is different: 236, 244, 228, 250, 258, 230, 246, 238, 242, 252. Have fun!)

I replied,

I like these ideas a lot. The translation is a nice idea -- I use it for ugly magic squares, and I hope I'd think of it if I got a problem like this with big numbers. Your extra equation also makes the solution a lot cleaner.

I’ll be looking at magic squares soon, and we’ll see the same trick used.

In 2003, I gave a non-algebraic method for solving a simpler version of the problem, here:

Find the Four Integers

Rather than include that here, I want to use essentially the same method, in conjunction with Jim’s number-reducing trick, to solve our problem. Here, we have five unknown numbers whose pairwise sums have to be 80, 82, 83, 84, 85, 86, 87, 88, 90, and 91, in some order. After reducing (subtracting 35 from each bale), our sums are, as before, 10, 12, 13, 14, 15, 16, 17, 18, 20, and 21. (I could, instead, have subtracted 40 and worked with 0, 2, 3, 4, 5, 6, 7, 8, 10, and 11!) We can find these reduced numbers.

We can make relationships visible by making an addition table for the five numbers, something like this:

The five bale weights will be A, B, C, D, and E, in increasing order.We only need to add each pair in one order, and don’t need to add any bale to itself, so the blue cells will not be used. That leaves ten places to put our ten sums.

Each row or column in the addition table will also be in increasing order, as indicated by the arrows.

We start, as always, with the lowest and highest two sums, which the arrows clearly say are in the first two cells of the first row and the last two cells of the last column:

(Red indicates what’s new.) I have placed those four numbers, and noted that the second and third bales must differ by 2, and the third and fourth must differ by 1, as indicated by the sums we’ve filled in.

Row and column headings (bale weights) are the same, so what is true of rows is also true of columns; that lets us fill in another row difference and another column difference, and therefore fill in two more sums.

Now we have 14, 15, 16, and 17 left to fill in. The smallest, 14, can go in two places. If it were in the upper right, then the last two columns would differ by 1, and we would need a sum of 19 next to the 20. Therefore, the 14 must go below the 12, and we can fill in the rest:

Now we can fill in the remaining differences:

All that’s left is to find the actual weights! We see that 10 is the sum of two numbers that differ by 2, so they must be 4 and 6; from there we can fill in the rest:

Finally, we add 35 back on to each of these numbers, and we have the answer: 39, 41, 43, 44, and 47.

Certainly this method was a lot longer than the quick algebra technique. But it teaches logical reasoning, and required no algebra.

]]>Today we’ll look at a problem that puts a little twist on the basic idea of translating a graph. The focus is on finding alternate approaches to the problem, which is an important skill in problem solving.

The question came, as many of our most interesting questions do, from Kurisada, this one in February:

If I translate the curve y = x

^{2}– 3x + 2, and the translation goes through (1, 1) and (2, 3), what is the equation of the translation?How many ways can I find this?

Here is what we are talking about:

The solid curve is \(y = x^2 – 3x + 2\); A and B are the two given points; and the dotted curve is a **translation** of the given curve (that is, it has been slid to a new position without stretching or turning) that passes through A and B. I drew this just by looking for a pair of points on the curve with the same relationship as A and B, namely moving right 1 and up 2. The points (2, 0) and (3, 2) jumped out at me, so I shifted the graph left 1 and up 1, yielding the equation \(y = (x+1)^2 – 3(x+1) + 2 + 1 = x^2 – x + 1\). A little thought convinces me that there is only one such curve, though that would not necessarily be true for *any* curve and *any* two points. And depending on a random insight, useful as it is, doesn’t seem like a good problem-solving technique!

Kurisada, who is trying to master problem-solving, is wise to ask for multiple methods, though it is impossible to answer the question if we take it literally! Doctor Rick responded, somewhat tongue-in-cheek, to that question:

I don’t think we could count the ways. We could find a

minimumnumber of ways to solve the problem by solving it one way (so the minimum is 1), then finding another way (so the minimum is now 2), and so on. We’d have to decide, at some point, what constitutes a “different” way.But is that what you really want to do? Let’s start with

oneway. To get things started, my first thought is to write thefamilyof functions that are translations of the given function. How many parameters will be needed to select a member of that family?If you have your own thoughts, I’ll be happy to start by discussing whatever approach you have in mind.

So we’re just looking for as many methods as we can think of, and the way to begin that is to find one way! We’ll eventually be getting back to Doctor Rick’s suggestion.

Kurisada, it turned out, already had two ways to do it:

I think that the number of parameters needed can be 2 or 3 because I think that y = x

^{2}– 3x + 2 can be translated to y = x^{2}– 3x.As far as I have done, I can only find 2 ways to do it.

The

firstone is by using the equation (y – a) = (x – b)^2 – 3(x – b) + 2.The

secondone is by finding the values of y in the set of values of x:x: -2 -1 0 . . .

y: 12 6 2 . . .

Then I find two points that have the same gradient with (1,1) and (2, 3).

(This way is similar by doing it with the graph.)

And I can’t figure any other way, and thinking if there is really any other way to do this (and I really want to know the ways).

It appears that these two methods are just ideas, not fully worked out solutions. (That is, in Polya’s terms, they are plans that have not yet been carried out.)

The **first** method just states what a translation of the function (up *a* units, right *b* units) looks like, without specifying how to find *a* and *b*.

The **second** method involves looking through a table of (*x*, *y*) pairs to find pairs with the same slope (or, really the same \(\Delta x\) and \(\Delta y\) as in the given points. This is essentially what I did above “with the graph”. In the original discussion both methods were discussed alternately; to keep things simple, I’ll untangle them and follow the discussion of the first method for now, then backtrack to the second after we finish this one.

Half an hour later he added:

Now I’m confused about my own way.

I tried my

firstway, and I got a = 1, b = -1.And I got the equation y = x^2 – x + 1. (I checked the graph and this should be correct.)

This answer is what I got above, so he has successfully found the two parameters.

Doctor Rick replied, starting with a comment on the statement, “I think that the number of parameters needed can be 2 or 3 because I think that y = x^{2} – 3x + 2 can be translated to y = x^{2} – 3x”:

Here you are giving one example of a translation, namely a

vertical translation(down 2 units). The amount of the vertical translation is one parameter. You can also translate horizontally; the amount of thehorizontal translationis a second parameter. Those two parameters together fully span the possible translations of the function. This is one way to find the answer to my question; we’ll see how it relates to various other observations we can make.

On the first method, where Kurisada gave the form (y – a) = (x – b)^{2} – 3(x – b) + 2, he answered,

Ah, good — the a and b here are the two parameters I was talking about above.

He then acknowledged that “a = 1, b = -1, y = x^{2} – x + 1″ is the correct answer.

Since nothing was said explicitly about how this was obtained, let’s try it. Presumably what was done was to put each (*x*, *y*) pair into the form above, to obtain a system of equations in *a* and *b*:

$$(1, 1)\rightarrow (1 – a) = (1 – b)^2 – 3(1 – b) + 2\rightarrow 1 – a = 1 – 2b + b^2 – 3 + 3b + 2\rightarrow b^2 + a + b – 1 = 0$$

$$(2, 3)\rightarrow (3 – a) = (2 – b)^2 – 3(2 – b) + 2\rightarrow 3 – a = 4 – 4b + b^2 – 6 + 3b + 2\rightarrow b^2 + a – b – 3 = 0$$

So we are solving the system $$b^2 + a + b – 1 = 0$$ $$b^2 + a – b – 3 = 0$$

We can subtract the second from the first to eliminate *a*, and we get \(2b + 2 = 0\), so that \(b = -1\); then put that into either equation to obtain \(a = 1\).

As to the second method, where a list of (*x*, *y*) pairs was given in a table,

x: -2 -1 0 . . . y: 12 6 2 . . .

Doctor Rick initially replied,

I’m not at all sure what you are thinking here. You are finding a set of points on the original curve … ah, perhaps you are thinking, not exactly of the

gradient, but of thevector displacementfrom one of your tabulated points to another, trying to match that to (2-1, 3-1) = (1, 2). In other words, you are looking for two points differing by 1 in x and by 2 in y.This will work, and can be speeded up by noting the pattern in the y differences. It’s still a “guess and check” or what I’d rather call a “directed search” method; it’s good to think about as we look for a better method, and

sometimes a directed search turns out to be the fastest or perhaps even the only method to solve a problem.

By continuing the table and looking for a jump of 2 between successive values of *y*, we do quickly find this:

```
x: -2 -1 0 1 2 3
y: 12 6 2 0
```**0 2**

So we know to translate the point (2, 0) to (1, 1). This is essentially what I did with the graph above.

Kurisada’s additional comment on this method did this:

Then I tried my

secondway:When x = 2, y = 0.

When x = 3, y = 2.

The gradient of both points above is the same with (1, 1), (2, 3).

But, doesn’t it mean that we add 1 to y and minus 1 to x, in order to get the translation?

But it my first way, a = 1, and thus y – 1 = … . (We minus 1 to y to get the translation.)

So which is correct?

Yes, in translating (2, 0) to (1, 1), we will be shifting up 1 and left 1. But there is a (common) misunderstanding of the relationship between a translation and the equation, which we usually see for *horizontal* translations, and the same thing happens in the form Kurisada is using for *vertical* translations.

Doctor Rick answered,

Let me see if I am following your thought this time. You see that the point (2, 0) on the given graph must be translated to (1, 1) on the translated graph. Thus we must subtract 1 from x (2 becomes 1) and add 1 to y (0 becomes 1). That’s what you are saying.

Your first method had the equation (y – a) = (x – b)^2 – 3(x – b) + 2, where a is the vertical translation (up if positive, down if negative) and b is the horizontal translation (right if positive, left if negative). You are apparently thinking that

replacing y in the original equation with (y – 1)represents a translation by 1 unitdownward, but that’s wrong. If we just make this vertical translation,y = x

^{2}– 3x + 2 → y – 1 = x^{2}– 3x + 2y = x

^{2}– 3x + 3then you can see that the resulting graph is shifted one unit

upwardfrom the original. For more on this, see the recent blog:

So both methods in fact give the same equation and represent the same translation.

Continuing, Doctor Rick had a new idea:

After working through your work, it occurs to me that

another possible methodmight be to take your “guided search” method and turn it into an algebra problem. What I mean is, we’re looking for a pair of points on the original graph,(x, x^2 – 3x + 2) and (x+1, (x+1)^2 – 3(x+1) + 2)

and finding the x value such that the difference in the y coordinates is 2:

[(x+1)^2 – 3(x+1) + 2] – [x^2 – 3x + 2] = 2

Once you solve for x, you continue as in method 2. Is that different enough, or is it still your method 2?

I would consider this a different method, though it is built on the same basic idea. Let’s finish it:

The equation simplifies to $$\left[(x+1)^2 – 3(x+1) + 2\right] – \left[x^2 – 3x + 2\right] = 2$$

$$\left[x^2 + 2x + 1 – 3x – 3 + 2\right] – \left[x^2 – 3x + 2\right] = 2$$

$$x^2 + 2x + 1 – 3x – 3 + 2 – x^2 + 3x – 2 = 2$$

$$2x – 2 = 2$$

so \(x = 2\). This means that (2, 0) will translate to (1, 1), and we know the translation we need to do.

Kurisada answered,

I was seeking for a

totally different method(as in my second method, I directly put in the difference of x and y, that is 1 and – 1 to a and b, so the methods are actually the same at the end).But now, I’m curious about the two neater ways you stated above. And I think what I need now is these ways. (I want to do this to have a full understanding in how algebra works especially the function, equality, and inequality, because sometimes I find problems that I can’t solve, while I’ve finished reading my books.)

I like the last way you gave me (it’s different enough from my method and it is one that I was seeking to know).

Doctor Rick replied:

I am glad I aroused your curiosity with my mention of two neater variations on your first method, but I would like you to do some further thinking on your own before I give you my ideas in detail. Do you see what I mean when I say that the original equation, y = x

^{2}– 3x + 2,is itself a transformation of a simpler (very basic) function? What is that function, and how would you write general translations of that function? Then, can you write it usinganother standard formfor quadratic functions? In each case there will be two free parameters, but I’m thinking of one in which the parameters do not directly correspond to the horizontal and vertical shifts.

After a little confusion, he expanded his explanation, showing what he meant in his first response by a “family of functions”:

The simplest “parent function” is y = x

^{2}. You know how to translate functions in general: replacexwith (x–a) to shift the graphaunits to the right, and replaceywith (y–b) to translate itbunits up. This gives thetwo-parameter family of functionsy – b = (x – a)

^{2}[1]Expanding the square, we get

y = x

^{2}– 2ax + (a^{2}+ b)Notice that, by suitable choice of

aandb, we can obtain a quadratic withanyvalues we wish for the coefficient of x and for the constant term. Thus another way to express the family of functions obtained by translating y = x^{2}isy = x

^{2}+ Bx + C [2]which is, again, a two-parameter family (changing the coefficient of x

^{2}would introduce a “stretch” in addition to the translation). We could start with either [1] or [2] and proceed the same as in your method 1 to solve the problem, writing an equation for each given point and solving for the two parameters. When I first tried the problem, I chose to start with [2].

There are two parallel, but different, methods here.

Both begin with the fact that we can find *a* and *b* such that \(x^2– 2ax + (a^2+ b)\) will be the same as our desired function, \(x^2 – 3x + 2\), for all values of *x*. This requires setting the coefficients of each power equal: $$1 = 1$$ $$-2a = -3$$ $$a^2 + b = 2$$

Solving these, we get \(a = \frac{3}{2}\) and \(b = 2 – \frac{9}{2} = -\frac{5}{2}\). This tells us that the given function is \(y = x^2\) translated 3/2 units right and 5/2 units down. (We could have found the same thing by completing the square.)

The same is true of any quadratic of the form \(x^2+Bx + C\). That is, *all* of these (including our starting function) are translations of the same function.

The point is that in asking for a translation of \(y = x^2 – 3x + 2\) that passes through the given points, they are really asking for a translation of \(y = x^2\) through the two points, so we can find it more quickly, and we can use any form.

So we can do what we did in Method #1 above, where we started with \((y – a) = (x – b)^2 – 3(x – b) + 2\), and instead start with either of the forms [1] and [2].

Kurisada gave it a try, first doing as I did above and finding *a* and *b* for the given function, and then using form [1] to solve the problem:

I found that a = 3/2 and b = -9/4 to change it into x

^{2}– 3x.And I found a = 3/2 and b = -1/4 to change it into x

^{2}– 3x + 2.I’m not sure about [1], but here what I’ve done:

First, I input (1, 1) and (2, 3) into [1], and I got

a

^{2}_{ –}4a + b = -1a

^{2}– 2a + b = 0Resulting a = 1/2 and b = 3/4,

then I did 1/2 – 3/2 = -1 (x shift 1 to left).

And 3/4 – 1/4 = 1 (y shift 1 unit up).

And for the [2], I don’t understand how to apply it. (I tried to apply as above but I think it is wrong.)

On the first bit, Doctor Rick answered,

Good. Thus y = x

^{2}– 3x + 2 results from shifting the graph of y = x^{2}3/2 unit to the right and 1/4 unit down, putting the vertex of the parabola at (3/2, -1/4). What you do in findingaandbis essentiallycompleting the square. The axis of symmetry is x = 3/2; you can check that the x-intercepts are (1, 0) and (2, 0), which are symmetrical relative to that axis.

Completing the square is an easier way to do the same thing, but this approach fits in with the other techniques being used here.

He continued, on the attempt at using [1]:

You solved correctly for the parameters

aandbin the formy= (x–a)^{2}+b, but I don’t know what you were trying to do after that. You already have the horizontal and vertical shift respectively (from the graph of the parent functiony=x^{2}), namelyaandb.OK, I think I see what you’re doing now — you’re finding the shifts

. But you weren’t asked to find the shifts, were you? Doesn’t the problem just ask for the equation of the translated function? That’sfrom the given functiony= (x– 1/2)^{2}+ 3/4, which we can expand toy=x^{2}–x+ 1 (the same as the solution we got by other means).Looking back to the problem statement, I see that it asked for “the equation of the translation,” which could be a little ambiguous. I’m taking it to mean the equation of the

translated function, not the amounts of horizontal and vertical shift that constitute thetranslation(but don’t constitute an equation).

Let’s carry out what Doctor Rick (presumably) intended. We want to find an equation of the form \(y – b = (x – a)^2\), which passes through the points (1, 1) and (2, 3). So, as before, we plug these points into the equation and obtain this system: $$1 – b = (1 – a)^2$$ $$3 – b = (2 – a)^2$$ This is a nonlinear system, which can be a little tricky; I would subtract the two equations, eliminating *b*, and we find that \(a = \frac{1}{2}\), and then \(b = \frac{3}{4}\). So our answer is \(y – \frac{3}{4} = (x – \frac{1}{2})^2\), which is equivalent to \(y = x^2 – x + 1\).

How about the method starting with [2]?

You solve for

BandCsimilarly to the way you solved foraandb, though it will be somewhat less work. However,BandCaren’t simply related to the horizontal and vertical shifts, so if that is what you need to find, this method will require more work in the end. If all you need is the equation of the translated function, as I believe, then this method is simpler; it gives you that equation in general form directly.

Now Kurisada made a try; after correcting a misstep, it looked like this:

Yes Doctor the question asked me to find the equation. (I didn’t realise to directly use the a and b to find the equation.)

And now I started to understand about (2).

I input (1, 1) and (2, 3) into y = x

^{2}+ Bx + C,resulting in B = -1 and C = 1

So the equation is y = x

^{2}– x + 1

Let’s look at the details: The substitutions give $$1 = 1 + B + C$$ $$3 = 4 + 2B + C,$$ or $$B + C = 0$$ $$2B + C = -1$$ Subtracting the first from the second, we have \(B = -1\), and then the first tells us that \(C = 1\).

Doctor Rick closed the discussion:

]]>In summary, I’d say we’ve solved the same problem in 5 somewhat different ways, though they are based on just 2 fundamentally different approaches, both of which you saw from the start.

Your first method worked directly with the equation of the transformed function. Your second approach started with the observation that if two curves are related to one another by translation, then any two points on one curve have the same coordinate differences, or vector displacement, between them as the corresponding two points on the other curve.

In each case, there was more than one way to implement the basic concept to arrive at the solution.

I’m going to do something unusual, and post a discussion that was never archived. I ran across it while searching for the original of an archived discussion to check something, and this one stood out as worth posting around the start of the school year. It’s a question from a prospective math major who was discouraged by his calculus class; several of us joined in encouraging him. And this is not only about calculus!

Here is the question, from Rafael in 2015:

I entered college as a math major, since I was good at math in high school and found it interesting. I am in Calculus 1 now but I'm extremelyboredby the content. Does this mean I should probably consider changing majors? The calculus lessons are not that bad, but I hate doing the homework assignments. They are verytediousand feel verypointless. I feel like I could care less about the material. I realized this is only the first class out of probably 20 math courses I'll have to take if I continue as a math major, which made me consider changing my major. Is calculus a boring subject or is it just me?

Rafael was wondering if the rest of a math major would be as boring to him as he found calculus to be.

Doctor Greenie was the first to respond, focusing on calculus itself:

Hi, Rafael -- My basic calculus was a long time ago (hmmm... about 55 years), so I don't remember a lot about my feelings about the subject when I first started studying it. But it seems to me I found it somewhatuninteresting at first. But then as I got deeper into my studies of calculus I found it quite fascinating to see all theapplicationsit had to the real world. I was a math major, too. I was on a course I thought was going to lead to graduate studies in math, which meant studying theoretical mathematics. That's where I lost my interest. Butcalculus with all its visible applications I have always found fascinating, and I still do. I will invite other volunteers here to provide their responses to your question.

At its base, calculus is just “algebra with derivatives”. I recall looking forward to calculus because it sounded like magic; but if you just looked at the work you were doing, it could seem like merely pushing symbols around on paper. That may be what both Rafael and Doctor Greenie saw in it at first. What eventually got Doctor Greenie interested were the many ways it could be used. Anything we learn, from a sport to a language, can become boring if we focus on the current drill and not on the future benefits.

I was the next to respond, paying more attention to the fact that calculus is not typical of a math major:

I wouldn't judge by Calculus 1, which is not primarily aimed at math majors anyway, and sodoes not represent what the major is like. AFTER calculus, you will start getting into Math Major territory, and everything will start to change. Even then, some of your courses will probably be taken by many other majors. Real math is far richer than what the typical calculus course deals with. It will no longer be focused onmere techniques, but will dig in much deeper, emphasizing proofs and bringing inentirely new ideas, rather than just adding new little features (like derivatives and integrals) to the algebra you've been learning for years. Take a look at the titles of the courses you have to look forward to, and see how different some of them are. Then talk to a few professors in the math department and ask about what you will be learning. Maybe they can give you a taste of what it's like so you can see for yourself whether you like it. Butmaking that decision based on Calc 1would be like deciding whether you like the food of a country you arevisiting based on what you eat in the airport on arrival. You're not really in the country yet!

My guess was that Rafael didn’t find calculus interesting enough to explore for a lifetime, or even to keep him going for a school career; I wanted him to know that more interesting things are coming. He may end up choosing a different major, but he doesn’t yet have a basis for that decision.

Then Rafael wrote back to clarify:

I think you might be confusing that I think the material in Calculus 1 is too easy and thus boring for me. But that's not the case. I think Calc 1 isnot hard but not amazingly easy either. In fact, it can be quite hard at times. I still find it boring though. It's sotedious and bland. Now that you know that thinking calculus is too easy is not the reason I find it boring, do your thoughts still stand? Because they seemed like what you were saying is, 'you are bored now but there aremore challenging coursesafter the calculus sequence'

Neither of us had really talked about difficulty; I think his description of “tedious and bland” is probably more or less what both of us had in mind. I responded with more questions about what bores him about it:

No, I don't think either of us assumed it was a matter of being too easy for you. The word you used in contrast to "boring" was "interesting", and both of us took off from that idea. Dr. Greenie appears to be supposing that you think it's uninteresting because you don't see itsapplications, so that you "could care less". (Perhaps you therefore are notmotivatedto deal with the difficult parts.) I am supposing that you think it's uninteresting because it is too muchbusy-workor mere rote procedures, and doesn't explore why things work as they do. That is a common complaint about Calculus 1 from students who really like math -- not that it's too easy (it isn't), but that it istoo routine. I wrote of higher courses being "richer", not "more difficult" -- though I could well have used the word "challenging", if I had, with either meaning. And my main point was that you haven't yet seen what a math major is like, so, regardless of what it is that bores you, you shouldn't assume that it will be true of the rest of the program. Can you explain more about what bores you? I think you do mean what both of us assumed, namely that it doesn't interest you. But what WOULD interest you? What did you find interesting about previous courses?What do you wish it were like?How is it different from what you expected? We can give better answers if we have a clearer picture of what bores you, and what wouldn't bore you.

I can easily understand that it be hard to say exactly how you feel about a math course; I’ve seen students with all different sorts of negative attitudes, and know not to make assumptions about what lies behind a complaint.

Rafael made a good attempt:

I remember finding Precalculus interesting. I can't recall why exactly but I had morefunlearning that than Calculus. I used to find the ideas of calculus really interesting. Like I was amazed at being able to find theslope of curvesand really liked the idea of an integral. I used to think "how is it possible to find theexact area under any curve!?". But then when I got to actually doing the calculus and actually learning it in class it'snot nearly as excitingas I had hyped it up to be. A problem with me is I get very excited atnew and interestingconceptsbut then when I get there and learn them they are not interesting anymore. Like right now I like the idea of 3-D calculus (multivariable calculus) but I'm sure when I get to that class, I will not find it as fascinating as I imagine it will be now. I'm always looking ahead of things because I'm bored by the current topic. Like a few weeks ago I was reading ahead in the book on integrals and now weeks later integrals bore me! It makes no sense. It would be hard to pinpoint exactly what bores me about my calculus class. I just knowit's a pain to do my homework. So much that right now I'm just focused on passing the class with an A andstopped trying to think about the "why" behind things. I just want to get it done with. I do remember really disliking curve sketching. So tedious and not at all fun to do. I know you asked several questions but I have difficulty pinpointing the exact answers.

One thing we can see here is that it is newness that excites him. (That reminds me of my own expectations of calculus.) On the other hand, he does like to think about “the why”, which is fundamental to being a good mathematician; that has just been stomped out of him by the nature of the present class. That’s actually a good sign.

Now Doctor Floor (in the Netherlands) stepped in:

Let me drop in with some thoughts. The thoughts you describe I think are quite common among mathematicians and mathematics lovers. I myself didn't study maths in the United States, in my home country things are somewhat different, but I do remember the disappointment about "calculus" - this being like 30 years ago. What I disliked was that concepts used were basic, homework oftenrepetitive and tedious. Homework focused a lot on calculating techniques, whileI wanted to understand better and dive deep. I wasn't really thrilled by the intermediate value theorem, but later I realized how valuable the theorem is. To get better in maths you need to do the dull work as well in order to create a firm base.Deeper concepts appeared laterin my math study. Sometimes very difficult or even too difficult to understand. It wasmore satisfyingto me. But I had to be able to rely very firmly on what I had learned: perhaps not so much the contents of beginning calculus, but the needed precision. Being precise turns out to be very important. Combined with being creative. I don't think you should drop maths because of this "Calculus 1". Perhaps you shouldtalk to an older studentto ask him what he (she) is learning and how he judges his Calculus 1 now.

So calculus students aiming for a math major need, on one hand, just to be patient because the best is yet to come, but also to learn this material thoroughly, because parts of it will be foundational to later, deeper studies. (Compare those drills in sports or music, compared to thrilling games or concerts to come later.)

I now replied, initially talking to Rafael as if he were just a child expecting everything to be fun, but really knowing he was better than that:

My first reaction is something you're probably not going to like: Suck it up!This is life. Not everything you will do in college, or in life, will be scintillating every moment. Part of the purpose of college is to mature you -- to teach you topersevere in things thatare not always pleasant, in order to accomplish a goal. No matter what you do,there will be things that are fun, and thingsthat are just hard work. You do them both, because you want to excel, and you know that the hard work is necessary. Of course, you want to choose a major, and a career, that you find interesting and rewarding; but that will be the big picture, not a constant throughout the process. You can expect parts that will not be exciting. If you approach all of life by quitting anything as soon as it is no longer new and shiny, please don't get married and have children! These are very rewarding things (at least as much as math), and are a lot of fun (almost as much as math), but also involve slogging along and carrying out commitments that are not fun, just because you know they have to get done in order to get to the parts that are fun (and sometimes not even for that). Marriage and kids get old, just like calculus does -- but old and familiar does not mean they are not worth your best efforts. The same is true of your major (whatever it turns out to be) or your job (whatever you end up doing). One way to make calculus, or whatever, feel worth doing is tokeepreminding yourself of your bigger goals(which implies that you need to *have* bigger goals beyond momentary pleasure). It is also a good idea to use the dull parts as occasions to strengthen your broader skills. If the problem is that it is no longer new,MAKE it new bydeliberately seeking out different perspectives. (Don't expect your professor to make every technique you learn look amazing; he's having a hard enough time getting those less capable students to barely understand what he's teaching.)Find the excitement in it; or else just keep in mind that there will be more new things you will be able to discover *because* you master what you are currently learning. If you were someone who loved mountain climbing, you would keep walking through the valleys because they were getting you closer to the peak you are heading for -- and you'd probably also find pleasure in the streams you pass on the way. (You wouldn't find pleasure in the blisters -- but you'd be able to bear them because of the beauty and challenge you know is coming.) Now, that was my FIRST thought. It's probably far too severe;I doubtthat you are really expecting everything in life to be fun. But it's worth considering whether your expectations are reasonable. My second thought is that you ought tothink a little more about whyyou want to study math in the first place, in order to make your decision. There are a lot of fascinating things about it; but what do you plan to do with it? It may be that you'd be more interested in some field that *uses* math (engineering or science, perhaps). But then, they have to struggle through calculus, too. Gather information from faculty in math and in related fields, and from others who have gone further than you, and consider whether what is yet to come will be worth the struggle. If you change your mind, there's nothing wrong with that. Just don't jump ship hastily.

You can imagine that I was anxious, wondering whether I had been too severe there! Did I judge his real needs accurately?

He wrote back, having seen the right things in it:

Thank you for your eye opening advice on things not always being fun. But I think that actually gives me too much credit.I was worried that thinking Calculus 1 wasboring meant that I didn't really like math.I was thinking "you are in over your head doing a math major when you're already bored in your first course". It wasn't a complaint. It was more of a worry. Any major I would do I'll need the calculus sequence for so I have to take those courses so it wasn't like I was whining and was going to quit on Calculus. I was just saying that 'if this bores you then do you even like math?' BecauseI was looking at linear algebra and itkind of seemed even more bland. Matrices?? So I had this idea that like all the math major would be like that.Dry, uninspired, dull, tedious, routine, and pointlessmaterial. I had thoughts that were telling me, "that is math, you just don't like it and so you need to stop pretending to like it. Liking math in high school doesn't mean you're math major material."I do love the advice about making something old new bylooking at it differently. I'll give that a try.

Yes, he got it. You can like math without liking an introductory calculus course; and you can make the most of even a class that doesn’t make it interesting.

I replied,

As I said, those remarks were just my immediate reaction to your statement that things stopped being fun when they stopped being new; I didn't think you would really have that big an issue. And I sent the reply when I had to go to bed, though I felt I hadn't quite answered your real question. Doctor Floor had done that, I think:being bored in calculus is common among math-lovers. It may even be a necessary sign that you really like math, because that course is not the best that math has to offer, especially as taught to a general audience. (Some schools have a separate calculus course aimed at potential math majors who want a bigger challenge -- not in the sense of a harder course, necessarily, but of going beyond the mechanics.)Linear algebracan seem dull on the surface -- it's just linear, after all, and what's more boring than straight lines? And some linear algebra courses will focus on the mechanics of working with matrices, which might not excite you. Buta good course will get into someamazing stuff. It can be your first introduction to the ideas that are further developed in abstract algebra: that you can invent a new kind of entity (in this case, the matrix) that can be added and multiplied but is not a number, and study how it behaves under various conditions. But it's also very useful -- computer graphics are built around linear algebra, for one thing. Again, ask a faculty member or two to give you examples of what you will learn in these higher courses, and what makes them interesting. If what interests them doesn't sound interesting to you, then maybe you do need to consider another major. (By the way,getting to know facultyis one of the best ways to make the most of your college education.)

He closed with this:

I just want to end with a sincere thank you for taking time out of your life to address my questions. Advice from someone with so much experience is much better than advice coming from my peers or classmates. Thank you for showing me that I was looking at things the wrong way.

Some of the advice we shared is just for potential math majors; but some of it is for everyone. Whatever class you take, make the most of it, and don’t depend on the teacher to make it fun.

]]>Last week we looked at a recent question about basic trigonometric equations. That discussion continued into the subject of identities, which we’ll look at here. We’ll be sitting in on an extended chat about many important aspects of this kind of work. It’s still *very* long, even after extensive editing, but worth reading through.

Picking up the thread, here is Sarah’s new question:

How do you prove an identity?

Doctor Rick picked up the discussion:

Finding a way to prove an identity is something of an art form, learned by practice. Here is an example of a more or less general approach to proving trig identities, which won’t always give the shortest or most elegant proof, but at least it’s a backup:

Proving Trigonometric IdentitiesAgain, you can search the Archive for the words “trig identity proof” to get suggestions for many specific proofs.

If you would like to present a specific example of a trig identity to be proved, we will be happy to work through the details with you.

Sarah answered:

My problem is that after l see the answer, l get it, but I’m not capable of getting to the answer myself, and I’ve been getting a lot of practice. Usually, my mathematical intuition and recognition is quite good, not sure where that went.

I’m attaching some examples:

If you are not familiar with the “triple-equal” symbol “≡”, it means “is identically equal to”, that is, “is equal to, *for all values of the variable*“. This is a way to distinguish *identities* from equations that are to be *solved* for specific values. Not all textbooks use it, but it is a good practice.

Doctor Rick replied, using the first example to illustrate how he thinks:

Thanks. I’d like to walk through one problem at a time with you. Let’s start with the separate image:

Show that -1 + cos α 1 + cos α ------------- + ------------- ≡ 2(1 + tan α) sec α + tan α sec α - tan αThe first thing I would choose to do here is to

carry out the addition of fractionson the left. This looks like a really good first step becauseI can see what will happen with the common denominator: it will be a difference of squares. Do you see that? It’s very possible that we’ll be able to apply a “Pythagorean identity” to that denominator.Give that a try, and show me your work as far as you can take it.

Here we have a step that is both conventional, and supported by a look ahead.Sarah showed how one attempt got her tangled up:

I’ve worked out all of the ones l sent already, but only with some help here and there, once l realised what was the first step, the rest followed easily. I’m attaching one of my original attempts. I’m ending up taking a much longer way which sometimes ends up leading to nowhere. I usually used to manage something like this, but when l don’t manage all the ones l try,

I’m finding it off-putting instead of fun.

Doctor Rick wrote back, again focusing on the thinking:

Hi, Sarah.

Proving trig identities is a lot like solving puzzles. As you know, they can be a lot of fun when you succeed, but really tedious when we can’t find our way through them. I like to do Sudoku, but now and then there is a supposedly easy puzzle that I get stuck on. If I put the puzzle aside for later, I may then find one thing I’d missed, and everything comes together after that. Since Sudoku are just puzzles, I can just skip one if it gets boring. We ought to be able to do that with trig identities, too;it’s OK not to solve them all. We all have a “blind spot” now and then.But you’d like to get better at this. Looking at your work, I wonder

whyyou tried replacing cos α by (sin α)/(tan α). Did you have some other identity in which this actually helped? It isn’t something I’d think of. As Doctor Rob said in the Archive answer I showed you, a good first step (when you don’t know what else to do) is to replace all tan, cot, sec, and csc withexpressions using only sin and cos. Then you only need to consider the identities involving sin and cos — that’ssimplerto think about. Introducing tan when it wasn’t there, doesn’t make things simpler.If you had done what I’m suggesting (which, of course, is different from what I suggested last time), you’d have:

-1 + cos α 1 + cos α sin α ------------- + ------------- ≡ 2(1 + ----- ) 1 sin α 1 sin α cos α ----- + ----- ----- - ----- cos α cos α cos α cos αThis certainly doesn’t look simpler yet, but the fact that we only have sin and cos should help soon. Now there’s something I see to do next:

multiply the numerator and denominatorof each fraction on the left by cos α.Why? Because this will make the expressionsimpler, by getting rid of the “fractions within fractions”.Now, eventually I’m going to come back around to my earlier suggestion: carrying out the addition of fractions (

common denominatorand all that). Asking myselfwhyI’d do this, I’d say that it’s because I don’t know any (basic, memorable) identities involving a sum of fractions. I’m aiming to make things lookmore like what I know. As with putting the expression in terms of sin and cos, I’m trying to increase my chance of recognizing a pattern I can use.Does this help at all? We can keep discussing your thinking on various problems and see what we discover. Let me just say this (which you probably already know, at least in theory): One of the most overlooked steps in problem-solving is the last — to

look over your work to see what lessons you can learn from it. Did you see a pattern that turned out to be useful? Or, looking back with the benefit of hindsight, do you see something youcouldhave done that would have gotten you to the goal more quickly? When I asked myself and you why we did certain things above, it was with the idea of abstracting some possibly useful principles for future problems.

The key idea here is that we are trying to make an expression (a) simpler, (b) more familiar, and (c) more like the other side. Each of these short-term goals makes it likely we will be able to move forward.

After some discussion, he demonstrated both methods for this problem, which I’ll include here. The first, which Sarah said worked better for her, started with combining the fractions:

Here’s my work with the first method:

-1 + cos α 1 + cos α ------------- + ------------- sec α + tan α sec α - tan α (-1 + cos α)(sec α - tan α) + (1 + cos α)(sec α + tan α) ≡ -------------------------------------------------------- (sec α + tan α)(sec α - tan α) -sec α + tan α + cos α sec α - cos α tan α + sec α + tan α + cos α sec α + cos α tan α ≡ ---------------------------------------------------------- sec^{2 }α - tan^{2 }α 2 tan α + 2 ≡ --------------- 1 ≡ 2(1 + tan α)I did more than one thing at a time on some steps to condense the proof somewhat. This method depends on knowing the identity

sec^{2}x - tan^{2}x = 1and a few other identities involving more than just sin and cos. For those who can’t see these things so readily, converting to sin and cos can make the steps easier to see, though it does take longer.

The second method, as mentioned, is a good fall-back when you don’t see what else to do, as it allows you to use the more familiar identities, even though it may get more complicated:

Here is the rest of the sin-and-cos-first method. I hadn’t tried following that method through to the end, but I will now:

To show that -1 + cos α 1 + cos α ------------- + ------------- ≡ 2(1 + tan α) : sec α + tan α sec α - tan α -1 + cos α 1 + cos α LHS ≡ ------------- + ------------- 1 sin α 1 sin α ----- + ----- ----- - ----- cos α cos α cos α cos α cos α (-1 + cos α) cos α (1 + cos α) ≡ ------------------ + ----------------- 1 + sin α 1 - sin α (-1 + cos α)(1 - sin α) + (1 + cos α)(1 + sin α) ≡ cos α ------------------------------------------------ (1 + sin α)(1 - sin α) (-1 + cos α + sin α - sin α cos α + 1 + sin α + cos α + sin α cos α) ≡ cos α ----------------------------------- 1 - sin^{2}α 2(sin α + cos α) ≡ cos α ---------------- cos^{2}α 2 (sin α + cos α) ≡ ----------------- cos α ≡ 2(tan α + 1) ≡ 2(1 + tan α), RHS of identity to be proved.

Back in the original discussion, Sarah responded:

l don’t know why l changed cos to sin/tan, but l probably said if you can change tan to sin/cos then it works that way too. l now realise it makes it much longer.

Also,

you substituted on both the left and right hand side. I was told that you can’t do that, because you need to start working on one side, and get to the other, or first work on one side and reach a dead end, do the same on the other side, and have both dead ends equal.I’ve tried a couple of others and l seem to be getting the hang of it slowly.

Doctor Rob’s article is helpful.

I think l should practice easy ones to get the technique and confidence, then move to harder ones, seeing them as a challenge.

If you want to discuss some others, and we can both show our methods, l’m open to that – we can both analyse after the different methods (if they’re different)

Doctor Rick answered her question, then suggested the next problems to try:

Working on both sidesis something we have discussed inAsk Dr. Math, and Dr. Peterson looked at some of these discussions in our Blog:

Different Ways to Prove a Trigonometric Identity(The first thing he looks at is Dr. Rob’s general method that I showed you earlier. Then he gets into your question about whether we have to start at one end and go through to the other.)

For practice, let’s look at the four-part Question 6 that you showed me earlier. I consider part (a) to be much simpler than the one we’ve been discussing. Part (b) is also relatively easy.

(a) (cos x + sin x)(cos x – sin x) ≡ 1 – 2 sin

^{2}x(b) sin

^{2}x – sin^{4}x ≡ cos^{2}x – cos^{4}xWhat did you do with these identities? Did you notice any patterns or things to try right away? What happened when you tried them? The first thing that occurs to me in each case works out well, but it may be that my intuition has been trained by lots of practice so that I see things that you don’t notice yet – or I don’t even notice things that you do, that

don’twork out. Our goal, at least in part, is totrain your intuition to focus on truly useful things.

A teacher may consider some things “obvious” that a student can’t yet see at all; and may totally miss the distracting obstacles the student needs to avoid. This is why we want to see it through the student’s eyes in order to help!

Sarah showed her work for each problem:

l tried these two again; this time, intuition worked both times and am attaching my method.

Doctor Rick commented on the thinking behind each solution:

Regarding the

first problem,(cos x + sin x)(cos x - sin x) ≡ 1 - 2 sin^{2}xyou have done well. I see that you multiplied out the left side and then canceled the “cross terms”. Were you able to see, without doing that all out, that you’d get a

difference of squares? If you can see this ahead of time, it can help you recognize that multiplying out the product is definitely a simplifying step. I’d probably multiply out anyway in this situation, butgetting a glimpse of what’s coming nextis part of the skill set that makes proving identities easier.On my part, I also recognize that the difference of squares that you get, cos

^{2}x – sin^{2}x, is the double-angle identity — it’s cos(2x). This isn’t useful in proving the identity, but I also know that 1 – 2sin^{2}x (or something like that — I may not remember it exactly) is an alternate form of that identity. ThusI saw something coming— namely, that this proof will be something I’ve seen before, when the alternate form was proved. The more you’ve seen before, the easier it is to recognize useful patterns.Your method on the

second problemis not what I did, but I can see that you used a good technique. I’m supposing that you noticed that the right-hand side of the identity to be proved had only cosines, so you chose to rewrite the left-hand side in terms of cosines as well. That’s good thinking,using the form of the “target” expression to guide youin choosing your steps.Here’s my method. I worked on both sides at once in my

exploration. Where one side is distinctly simpler than the other, it’s good to start work on the more complicated side, on the theory that it will be easier to recognize when you’re heading toward the simpler expression. In this problem, though, both sides are equally complicated. So I began like this, factoring on both sides:sin^{2}x - sin^{4}x cos^{2}x - cos^{4}x siin^{2}x (1 - sin^{2}x) cos^{2}x (1 - cos^{2}x) sin^{2}x (cos^{2}x) ≡ cos^{2}x (sin^{2}x)Now I had identically equal expressions on both sides, so I could rework my exploration into a standard-style proof. This is the idea of “

buildingthe bridge from both sides toward the middle, thencrossingthe bridge from one side to the other.”sin^{2}x - sin^{4}x ≡ sin^{2}x (1 - sin^{2}x) ≡ sin^{2}x (cos^{2}x) ≡ (1 - cos^{2}x)(cos^{2}x) ≡ cos^{2}x - cos^{4}xThis looks a little simpler than your proof, but yours is perfectly good, and it has the advantage that the reader can make a good guess at how you thought it through.

“Elegant” proofs(not that mine is particularly elegant)tend to hide the thought processthat produced the proof, so that you may think, “I would never have thought of that.” Thus they aren’t so much help in learning to do your own proofs!

Sarah expanded an earlier thought:

I just realised something from what you said: sometimes

the more you know, the more it can interfereand make it harder – how do you know what is useful and what is not? The more you know, the more you need to sift to see what you need and what will actually work!Also, thank you – especially for getting my interest into this, highlighting the whys, the thought process, explaining things so clearly, the advantages of certain methods and for everything

Doctor Rick responded:

To tell the truth, as I was writing about “the more you’ve seen before,” I had a contrary thought similar, in a way, to yours: As I get older, I find that more of the people I see remind me of someone I once knew — just because I’ve known a lot of people! That doesn’t do me much good, though; it just confuses me — could this actually

bethe person I’m reminded of? (If you’ve ever read Agatha Christie’s Miss Marple mystery novels, you’ll recognize that this is how the elderly Miss Marple solved crimes — they reminded her of people and situations she’d known in her little village, and that gave her insight into likely motives. But that’s fiction, and in any case, my mind doesn’t work that way.)Getting back to math, all I can say is that we

develop our intuitionby noting what stepshave proved usefulin the problems we have worked. Yes, the number of things we might do at a given step can grow, but we find that not all of them are equally likely to move us forward in proving an identity. In this way, we developheuristicssuch as those listed by Dr. Rob — techniques that aremore likelyto help solve a problem. We can’t be sure these things will help, but we try them first.Mentioning heuristics reminds me that another of Dr. Peterson’s blogs examined a discussion I had with a student about a challenging identity proof. You might be interested in this one too:

Sarah added:

A bit of a digression here, but you got me thinking;

what would you say mathematical intuition is?And how do you train your intuition (other than by practice)? Do you think it is innate or do you develop it? I personally think it is both, because not everyone can “see” certain things, but l think you can develop and work on what you have.

Doctor Rick answered:

Regarding the nature of intuition, I haven’t studied psychology, I’m just writing as a layman regarding that field. To me,

intuition is essentially subconscious pattern-matching— making associations between a current situation and things we’ve experienced before, so as to reach a conclusion without formal logical reasoning. Of course, in mathematical proof, we can’t forget about formal logical reasoning! Rather, we use the intuitive process as an aid in theexplorationphase as we search for a line of formal logical reasoning.Under this understanding,

intuition is learned, as it is built up of our experiences. Thus practice is the key to mathematical intuition, or problem-solving skill. But as I have already said, in order for that practice to develop our skill effectively, we need to do that final step in problem-solving: tothink about what we have done, looking for lessons to be learned.

Sarah was ready for a challenge:

Do you have a good one for me, which requires some easy stuff, but which may be harder to see please? I’m willing to try out a more challenging one. If you do have one, l’m very ready to try it out. Or any one really, which might teach me the techniques required.

Your part about intuition – very interesting; agreed.

Doctor Rick offered a problem to try:

It’s hard to tell how difficult you might find a particular identity proof problem, just as the difficulty ratings of Sudoku puzzles don’t always match my experience with them. But I have some problems that at least look interesting. Let’s see how you do with this one:1 Prove that ------------- ≡ sec x – tan x sec x + tan x

Sarah was up to the task:

Thank you for the question.

l managed this one on my own.

I did

LHS = 1/((1/cosx) + sinx/cosx)

= cosx/ (1+sinx)

Then l multiplied by (1-sinx) /(1-sinx)

cosx – cosx sinx / (1-sin^2x) = cosx(1-sinx) / cos^2 x = (1-sinx)/cosx = sec x – tan x

Getting the hang of them now, thanks for the help!

Doctor Rick responded:

Your work is good.

You used the fall-back idea of

writing everything in terms of sin and cos. Then, I suppose, you may have recognized the useful pattern that multiplying (1 ± sin x) or (1 ± cos x) by what we might call itstrig conjugate(I just made that up) results in adifference of squaresto which the basic Pythagorean identity can be applied.If you were more familiar with the

other Pythagorean identities, you could have done the same with fewer steps. (I’ve told you that I don’t have these identities fully memorized myself, I have to derive them in my head to be sure.) Here is what this approach would look like:1 sec x - tan x sec x - tan x ------------- × ------------- ≡ --------------- sec x + tan x sec x - tan x sec^{2}x - tan^{2}x sec x - tan x ≡ ------------- ≡ sec x - tan x 1Again, you did well. Let me also show you how one might approach this as if we were solving an equation – something that I know you have been trained not to do:

1 ------------- = sec x – tan x sec x + tan x 1 = (sec x - tan x)(sec x + tan x) 1 = sec^{2}x - tan^{2}xBut this is always true (if necessary, you can do this to verify it:)

1 = 1/cos^{2}x - sin^{2}x / cos^{2}x 1 = (1 - sin^{2}x)/cos^{2}x cos^{2}x = 1 - sin^{2}xThis you definitely recognize as an identity.

Now, this “solution of the equation” has a clear relationship to my proof of the identity, Rather than multiplying both sides of the equation by (sec x + tan x), we work with the LHS alone, multiplying it by 1 in the form (sec x + tan x)/(sec x + tan x). This is the idea presented in Dr. Peterson’s blog “

Different Ways to Prove a Trigonometric Identity“, in the section “Can you work on both sides?”.

This was the end of the discussion. I’m sure the subject will come up again.

]]>While I’m showing some recent explanations of basic trigonometry techniques, this is a good time to look at an even more basic explanation of the essentials of the subject for a beginner.

Here is the question, from 2001:

Trigonometry in a Nutshell I'm in 8th grade in my school and in my math class we're doing stuff about trigonometry (sine cosine hypotenuse). Butwhat is trigonometry?Can you give me somegood easy questionsin trigonometry so I can try using it? Thanks.

This calls for a non-scary introduction to the subject that will show some of the power of trig, without showing difficult parts. Doctor Ian took up the challenge:

Hi Jimmy, Believe it or not, I just spent part of last weekend explaining trigonometry to my mother, who was upset because about 50 years ago she wanted to become a radio technician in the navy, but ended up as a pharmacist's assistant because she couldn't get the hang of trigonometry. So I'm going to tell you what I told her.

The best things to tell someone who is just being introduced to a subject may be the same things you would tell someone who has struggled with it. An overview of what it’s all about, giving the big picture without getting tangled up in details, can help anyone.

Trigonometry is typically introduced using right triangles, and that’s where Doctor Ian goes:

When you have a right triangle, /| /b| C / | / | A / | /_a___| B there are basically five things that you can know about it: the lengths of the sides (A, B, and C), and the measures of the acute angles (a and b). The third angle is always 90 degrees because it's a right triangle.If you know two of the sides, you can use the Pythagorean theorem to find the other side: A = sqrt(C^2 - B^2) B = sqrt(C^2 - A^2) C = sqrt(A^2 + B^2) Andif you know either angle, a or b, you can subtract it from 90 to get the other one: a + b = 90

Note that his notation is the opposite of what we usually see; he is using upper-case letters for lengths of sides, and lower-case letters for angles. A more typical picture would look like this:

But this is just a common convention, not a mathematical necessity.

The Pythagorean Theorem and the sum of angles allow you to find a missing side from two given sides, or a missing angle from two given angles (one being 90°). Where trigonometry proper is needed is to handle relationships *between* sides and angles, mixing the two together.

Butwhat if you know the sidesand you want to know the angles? Or you knowan angle and a sideand you want to know the other sides? Well, here is the central insight of trigonometry: If you multiply all the sides of a right triangle by the same number (k), you get a triangle that is a different size, but which has the same angles: /| /b| / | /| k*C / | k*A /b| / | C / | / | k*A A / | A / | --- = -, etc. / | / | k*B B /_a___| /__a_____| B k*B Why is that interesting? Well, it means that if you know the _ratio_ of any two sides, it tells you what the angles are.

That is, **similar** triangles have the **same angles**, and the **same ratios of sides**; so the angles *determine* what the ratios will be, and the ratios determine what the angles will be. But in most cases, it doesn’t actually *tell* you what they are, until you use trigonometry!

There are some special triangles for which mere geometry is enough. One of these is half of an equilateral triangle:

For example, let's look at a right triangle in which the acute angles are 30 and 60 degrees: /| / | /30| C / | / | A / | /_60___| B If side B is 1 unit long, then side C is 2 units long, and side A is A = sqrt(2^2 - 1^2) = sqrt(4 - 1) = sqrt(3) units long. Now, notice that I haven't said what a 'unit' is. It could be a mile, or an inch, or 13.5 cm, or the distance from my big toe to the base of a bookcase on the other side of the room. If I know that angle a is 60 degrees, then I know that the following must be true: the ratio of A to C is sqrt(3)/2 the ratio of B to C is 1/2 the ratio of A to B is sqrt(3)/1 And, just as importantly, if I know that for a particular triangle, the ratio of A to B is sqrt(3)/1, then angle a _must_ be 60 degrees. It can't be any other angle.

This illustrates how the angle determines the ratio of sides, and the ratio determines the angle. The sides themselves could be any size, but they *must* have these ratios.

So, what we can do is write down atable, in which we list all the ratios for all the angles of interest: angle a ratio A/B ------- --------- 0 0 . . <= values for other angles filled in . . 30 sqrt(3)/3 . . . . 45 1/1 . . . . 60 sqrt(3)/1 . . . . Now we can use this table to find the ratio A/B if we know angle a - just find the angle in the column on the left, and read the ratio from the column on the right. Or we can use the same table to find angle a if we know the ratio A/B - just find the ratio in the column on the right, and read the angle from the column on the left.

Most angles don’t have nice ratios like these; they have to be calculated as decimal approximations (using methods most of don’t need to know) and put into tables (or, these days, into calculators) for you to use. But the idea is the same.

And since we see that the value of any of these ratios is the same for *any* triangle with a given angle, each ratio is a **function of the angle**.

All that’s lacking is **names** for these functions:

But instead of 'ratio A/B for angle (a)', we use the shorter name 'tangentof angle a', or just 'tan(a)'. Since there are three possibilities for which pair of sides you might know - A and C, B and C, A and B - we have three different functions: angle a => sin(a) = A/C cos(a) = B/C tan(a) = A/B So we can make up a table that looks like this: Machinery Handbook Math Pages: Trig Tables http://www.industrialpress.com/ext/staticpages/handbook/trigpages

A sample of the table (whose link I have updated from the original):

Before calculators (and even now, in places where calculators are not commonly available), much more detailed tables were needed. Here is an example of such a table for the sine.

By the way, the names, “sine”, “cosine”, and “tangent”, along with “secant”, “cosecant”, and “cotangent”, can be considered as arbitrary names that just have to be memorized. Here are one page from *Ask Dr. Math* about the names, and another about memorizing their meanings:

Latin Origins of Trig Functions Explaining How SohCahToa Works

I’ve seen many other mnemonics for them.

Note that we don't really need include the sec, csc, and cot functions, since we can just compute them from the sin and cos functions: sec(a) = 1 / cos(a) csc(a) = 1 / sin(a) cot(a) = cos(a) / sin(a)

The first three functions listed (sine, cosine, and tangent) cover all three *pairs* of sides; the last three are their reciprocals, so that we have a name for every possible *ratio* of two sides (in either order). That’s overkill, but can be useful sometimes to make a formula simpler.

Now Doctor Ian moves on to how these functions can be used to solve a triangle (that is, find all the missing parts when you know two):

So, having said all that, the whole _point_ of trigonometry is this: If you have a right triangle in which you know one side and any other side or angle, you canfigure out the remaining sides and angleswithout having to measure them. In fact, here areallthe possibilities: You know How you find the others ------------- ----------------------------------- two sides Use the Pythagorean theorem to find the remaining side. Use the ratios of the sides to find the angles. one side and Use the sin, cos, and tan functions one angle to find the remaining sides. The other angle is just 90 minus the one you know.

It’s good to have a few examples, not just a dry, general rule:

That's it. The rest of it is shortcuts and tricks. For example, if you have a triangle like /| / | C / | / | / | A / | /_17___| 25 it must be true that A / 25 = tan(17) 25 / C = cos(17) A = 25 tan(17) 25 / cos(17) = C 25 * (1 / cos(17)) = C 25 sec(17) = C where 'sec' is short for 'secant', and sec(x) is the just another way to write 1/cos(x). Anyway, when you've put in about a thousand hours of practice, you will be able to just label the triangle immediately: /| / | 25 sec(17) / | / | / | 25 tan(17) / | /_17___| 25

Using the table or a calculator, we would find that the vertical side is $$25\tan(17°) \approx (25)(0.3057) \approx 7.64,$$ and the hypotenuse is $$\frac{25}{\cos(17°)} \approx \frac{25}{0.9563} \approx 26.14.$$

Note, by the way, that the picture shows only relationships, and is not at all to scale; we don’t need that. But if we drew it accurately, we would see that because 17° is a small angle, the vertical side is much less than 25, just as we found; whereas the hypotenuse is always longer than either side, in this case just a little longer:

Also, you will be able to use formulas (called 'identities') like sin(x-y) = sin(x)cos(y) - cos(x)sin(y) to do tricks like this: sin(15) = sin(45 - 30) = sin(45)cos(30) - cos(45)sin(30) = (1/sqrt(2))(sqrt(3)/2) - (1/sqrt(2))(1/2) = sqrt(3)/[2 sqrt(2)] - 1/[2 sqrt(2)] = [sqrt(3) - 1] / sqrt(2) Whether being able to do these things from memory instead of from a book is _worth_ a thousand hours of your life isn't clear. You'll have to take that up with your state legislature or the Department of Education.

This is just a taste of the more complex things included in trig. When needed, you can look up these things, like the values of the trig ratios, in a table, though many are very much worth knowing, at least as long as you are going to be working actively with them.

How about a taste of what trig can be used for? Jimmy asked for some easy sample problems. Many important applications can’t be understood until later math courses, but there are many that are easy to appreciate.

Anyway, that's trigonometry in a nutshell. All you have to do to make up problems is draw a right triangle: /| /b| / | C / | A / | / | /_a____| B and then make up a story to go with it, in which you know two sides, or a side and an angle. For example, a ladder is leaning against a wall at an angle of 70 degrees with the ground. It just touches the bottom of a window 10 feet off the ground. How long is the ladder? How far from the wall is the bottom of the ladder? window /| / | / | ladder/ | 10 feet / | / | /_70___| ?

Answer: The tangent of 70° is the ratio of the opposite side (10) to the unknown adjacent side, so $$\frac{10}{x} = \tan(70°)$$ $$x = \frac{10}{\tan(70°)} = \frac{10}{2.747} \approx 3.64\text{ feet}$$

To turn it into a different problem, just change what you know: window /| / | / | 20 ft / | ? / | / | /_?____| 8 ft

Answer: First, use the Pythagorean Theorem to find the height: $$8^2 + x^2 = 20^2$$ $$x = \sqrt{20^2 – 8^2} = \sqrt{336} \approx 18.33\text{ feet}$$

The cosine of the unknown angle is the ratio of the adjacent side (8) to the hypotenuse (20), so $$\cos(A) = \frac{8}{20}$$ $$A = \cos^{-1}\left(\frac{8}{20}\right) = \cos^{-1}(0.4) \approx 66.42°$$

Here we used the **inverse cosine** function, which just means reading the table backward, finding the angle that has a desired tangent.

Or, if you get bored with ladders and windows, make up a different story, e.g., a bird is sitting on a flagpole, and the sun is at an elevation of 57 degrees. The shadow of the bird is 11 feet from the base of the flagpole. How tall is the flagpole? bird /| / | / | / | ? / | / | /_57___| 11 ft

Answer: The tangent of 57° is the ratio of the unknown opposite side (*x*) to the adjacent side (11), so $$\frac{x}{11} = \tan(57°)$$ $$x = 11\tan(57°) \approx (11)(1.540) \approx 16.94\text{ feet}$$

Or one person is at the top of the Grand Canyon, and another is at the bottom. They use a laser range finder to determine that they are 1200 meters apart, and the one below has to look up at an angle of 78 degrees to see the one above. How deep is the canyon?

Answer: The sine of 78° is the ratio of the unknown opposite side (*x*) to the hypotenuse (1200), so $$\frac{x}{1200} = \sin(78°)$$ $$x = 1200\sin(78°) \approx (1200)(0.9781) \approx 1174\text{ feet}$$

Some people need extra help seeing how to decide which function to use to solve a triangle; here is general explanation of that process:

Sine, Co-sine, and Tangent: SOHCAHTOA

Doctor Ian concluded:

Making up your own problems will give you a much better feel for why this is souseful, and with any luck, you'll start to see why some people even think it'sfun. So that's how you make up problems. You solve problems made up by other people by reversing the steps. That is, you read the problem and try to figure out what is at the vertex of each triangle. Then you try to figure out which sides and/or angles you've been given, and which one you're supposed to find. Then you use the Pythagorean theorem and the sin, cos, and tan functions to find it.

Jimmy slightly overstated his response:

Thanks! You really helped me and saved me some money from buying books about trigonometry. This always was a toughy for me on tests, but I think I can work it out next time. Thanks again!

No, this doesn’t take the place of textbooks! But it does make the subject more approachable.

The day before, another student had asked a similar question, which was combined into this page:

I am totally confused about sine, cosine, and tangent.What are they and where do they come from?All I have been taught is when to use them and where the button is on the calculator. I have tried finding a beginners' guide or tutorial on the net but everything is too advanced. They even use sine etc. withcircles and waves, where I thought it was just to do withtriangles. Please could you explain them? I think it would be very useful to have explanations on your site, as everybody in my class can use them but nobody knows what they really are.

This time, Michael is familiar with the right triangle trigonometry that was covered above, but wonders about the bigger picture.

Doctor Ian answered this as well, connecting the trigonometric functions first with circles, and then with their graphs:

Hi Michael, What does trigonometry have to do with circles? Well, draw a circle whose center is at the origin of the x-y plane, and whose radius is 1. Now choose any point on the circle, draw a line segment from the center, and mark the angle a between the positive x-axis and the line segment. You should have something that looks like this: 1|. | .(x,y) | / . | / | / . | / | / . | / a --------------- 1 Guess what? The coordinates of the point you chose are (x,y) = (cos(a), sin(a)) Furthermore, since the radius of the circle is 1, the Pythagorean theorem tells us that (sin(x))^2 + (cos(x))^2 = 1 Actually, a lot of formulas, like the ones you can find in the Ask Dr. Math FAQ: Trigonometry Formulas, http://mathforum.org/dr.math/faq/formulas/faq.trig.html are easiest to understand if you think about the unit circle rather than triangles of arbitrary size.

To see clearly why the sine and cosine show up here, we can add a line to make a right triangle:

And what does this have to do with waves? If you start taking different values of a, and plot the corresponding values of x and y (that is, if you plot x and y as functions of a, the way you would normally plot y as a function of x), you get something like this: x x | x x x = cos(a) | x x +------x-----------x------------ | x x | x x x a=0 90 180 270 360 | y | y y y = sin(a) |y y y-----------y-----------y------ | y y | y y | y a=0 90 180 270 360 Each plot keeps wiggling back and forth between 1 and -1, repeating itself every 360 degrees, which is another way of saying that if you move 360 degrees around a circle, you end up where you started. Anyway, this shape is what is normally thought of as a 'wave'. Lots of things in nature can be understood in terms of waves, so much so that even though the history of the sin and cos functions is mostly about triangles, the major uses of the functions today have to do with describing waves.

Here we’ve started extending the concept of sine and cosine, by allowing our point to go all around the circle rather than staying in the first quadrant where *x* and *y* are positive. This is the beginning of an amazing journey through trigonometry, where many new applications open up beyond solving right triangles.

For a deeper answer to Michael’s question, “What are they,” see my post What Are Trig Functions, Really?

]]>