Ask Professor Puzzler
Do you have a question you would like to ask Professor Puzzler? Click here to ask your question!
Everett, from Illinois, writes, "I was born in 1937 in Southern Illinois, Franklin County. We were not taught PEMDAS in school. When did they start teaching this order of operations. Is it taught all over the state now?"
Hi Everett, since the beginning of people writing down mathematical ideas, mathematicians have had to develop conventions for indicating the meaning of expressions on paper. Those rules have not always been consistent. For instance, as a precursor to parentheses, some mathematicians used to write expressions with a horizontal bar over the top to indicate that things should be grouped.
Consider the expressions 7 x 2 + 3. This looks like it should be 14 + 3 = 17. But if the author of a text wanted the addition to be done first, he would write:
_____ 7 x 2 + 3
Typographically, this was cumbersome, and eventually led to the idea that parentheses could be used, and would be simpler to write. This was first suggested in the early 1600s, so it was in vogue as a mathematical ordering notation long before you were born.
Exponents were first used much earlier than the 1600s, but there was no "official" way to write them. Some used Roman Numerals for exponents, some wrote a number after a variable, but not raised (thus, 3x meant 3 times x, but x3 meant x to the third power). It was probably Rene Descartes who made the raised notation popular, and it became the standard. Descartes was doing this in the mid 1600s (not too long after the parentheses started becoming popular). And because of the way it was written, outside the normal baseline of the equation, it had an implicit ordering to it. You would never see the following expression:
23 + 1
and interpret it as though the 3 and the 1 should be combined first, and then 2 raised to the 4th power.
So there you have the first two elements of PEMDAS - parentheses and exponents - that have been implicitly understood since the 1600s.
As for multiplication and division coming before addition and subtraction, I'm not clear on exactly when these became part of the standard ordering notation. However, if you took an Algebra class in high school, you used this ordering of operations, even if no one taught you a name for what you were doing. Consider the following examples:
Example One: Multiplication before Addition
5 + 3x
If multiplication was not evaluated before addition, this would be evaluated (as some of my Algebra students like to do) as:
5 + 3x = 5 + 3 · x = (5 + 3)x = 8x.
The ordering of multiplication and addition was implictly given in the rules for how we can manipulate terms in an expression.
Example Two: Division before Addition
5 + 1/x
If division was not evaluated before addition, this would be evaluated as (5 + 1)/x or 6/x. Again, this order of operations was inherent in the rules for manipulating terms of an algebraic expression.
Which brings me to the answer to your question. First, I do think it's possible that you were never taught PEMDAS as a specific notational convention, but all the rules of the PEMDAS mnemonic were in existence long before you were born. Secondly, even if you weren't taught it specifically, you still used it when you did Algebra, and if you passed your algebra class, then you were doing it correctly! Finally, yes, PEMDAS (or BODMAS*) is taught consistently worldwide. There are still arguments that arise about some ambiguous notations (you may have read one or more posts about those), but PEMDAS is the standard convention for interpreting expressions worldwide.
* BODMAS is used (I believe) in Britain, and perhaps other places as well. B = Brackets, O = Order. Brackets are parentheses, of course, and Order is the word used for Exponents, so even though it looks different, it's the same convention.
S. Ventar writes, "I saw video that explains divisibility for 19. Multiply the last digit by 2 and add to left over digits. repeat until result two digits multiple of 19. Why does method work?"
Hi S! That's a great question. Let's do an example first, to make sure everyone understands the method. Let's take the number 65968 and do the process on it. Ready?
65968: 6596 + 2 x 8 = 6612
6612: 661 + 2 x 2 = 665
665: 66 + 2 x 5 = 76
76: 7 + 2 x 6 = 19
Since the result of this repeated process is 19, the number is divisible by 19. Note that you can stop the process anywhere you happen to know that a number is a multiple of 19. For instance, if you knew that 76 was a multiple of 19, you wouldn't have to do the last step. Similarly, if you knew that 76 wasn't a multiple of 19, you could stop there.
For completeness, let's do one that isn't a multiple of 19, and then we'll explore your questions of why this works. Let's do the number 6121.
6121: 612 + 2 x 1 = 614
614: 61 + 2 x 4 = 69
69: 6 + 2 x 9 = 24
And I know that 24 is not divisible by 19, so I conclude 6121 is not divisible by 19 either.
Before I go any further, I want to introduce you (in case you're unfamiliar) with a branch of mathematics we call "modular arithmetic." In modular arithmetic, we aren't dealing with equations; instead, we're dealing with something called "congruences." A congruence looks like this:
a ≡ b mod c
It looks like an equation, except that instead of an equals sign, the symbol in the middle has three bars. We read this congruence like this:
"a is congruent to b mod c."
It's a short-hand way of saying that if you subtract b from a, you get a multiple of c.
Thus, all of the following are true:
7 ≡ 1 mod 3 (7 - 1 = 6, which is a multiple of 3)
10 ≡ 1 mod 3 (10 - 1 = 9, which is a multiple of 3)
15 ≡ 0 mod 5 (15 - 0 = 15, which is a multiple of 5).
There are a couple of nice rules for congruences that will help us see why this divisibility rule works.
Multiplicative Congruence Property
If a ≡ b mod c, then ax ≡ bx mod c.
Additive Congruence Property
If a ≡ b mod c, and d ≡ e mod c, then a + d ≡ b + e mod c.
These should look very familiar to you; they are just like the multiplicative and additive properties for equality, except that they involve congruences (with the same modular base - note that the c stays constant throughout!).
With all of this in mind, let's explore what happens with our 19 divisibility rule. First of all, I'll start by pointing out that any integer can be written in the form 10x + y, with the y representing the last digit, and x representing the number formed by all the other digits. Here are some examples:
145: x = 14, y = 5; 145 = 10(14) + 5
32794: x = 3279, y = 4; 32794 = 10(3279) + 4
Let's suppose we have a number K which is divisible by 19. We can write K = 10x + y, for some integer x, and y representing the last digit of K. Using congruences, we can write:
Congruence 1. 10x + y ≡ 0 mod 19
Now, just because K is divisible by 19 doesn't mean that 10x is divisible by 19. Let's say that when we divide 10x by 19, we get a remainder of z. This means we can write:
Congruence 2. 10x ≡ z mod 19
Subtracting the second congruence from the first gives us the following:
Congruence 3. y ≡ -z mod 19
If we do our process on the number 10x + y, we obtain the following: x + 2y. (divide 10x by 10, and add twice the last digit). Remember this result, because we're going to return to it later! If we start with 10x + y, the next number in our process is x + 2y. If we can show that x + 2y is congruent to 0 mod 19 whenever 10x + y is congruent to 0 mod 19, then we'll have shown that the divisibility rule works (because each step in the process will recursively be a multiple of 19 as well).
Now it's time to invoke the Multiplicative Congruence Property on Congruences 2 and 3, using the number 2 as our multiplier:
Congruence 4. 20x ≡ 2z mod 19
Congruence 5. 2y ≡ -2z mod 19
Now we note that 19x has no remainder when divided by 19, because x is an integer, so 19x must be a multiple of 19. This means:
Congruence 6. 19x ≡ 0 mod 19
Combining 4 and 6, using the Additive Congruence Property (technically, subtractive property, or multiplication by -1 and then addition) gives us:
Congruence 7. x ≡ 2z mod 19
Now add together Congruences 5 and 7:
Congruence 8. 2y + x ≡ -2z + 2z mod 19
Congruence 9. 2y + x ≡ 0 mod 19.
In other words: if you start with a multiple of 19, and do the process described, you'll end up with another multiple of 19. And if you do the process on that number, you'll still have a multiple of 19. And so on, and so on. And that's why the process works.
Incidentally, I should add that as far as I know, no one actually uses this divisibility rule for anything; the more cumbersome a divisibility rule is, the less useful it is compared to doing long division. After all, if a number is divisible by 19, you probably want to know what the other factor is, so you'll end up doing long division anyway!
Since it's almost the new year, this image (click the image for a larger view) is making the rounds on facebook again, and everyone is reading it and saying, "WHAT? How does that work out to $667.95?"
The answer is, it doesn't. It works out to exactly what you thought it would work out to: 365 pennies, or $3.65. Unless it was Leap Year, and then it would work out to $3.66. Not terribly hard math.
However, even though "a penny a day" is what they said, "a penny a day" is not what they meant. How do I know that? I'll show you in just a minute.
What they meant was, on January 1st you put in one penny. On January 2nd, you put in two pennies. On the 3rd, three pennies. And so on, until December 31st, when you put in 365 pennies, because it's the 365th day of the year.
How do I know that's what they meant? Because there's a really nice formula to calculate the sum of the first n integers:
Sum = n(n + 1)/2
In this case, n = 365, so the sum is:
Sum = 365(365 + 1)/2 = 66,795.
And that's how I know that's what they meant - because if that's what they meant, the math works out correctly to $667.95.
And by the way...if it was leap year?
Sum = 366(366 + 1)/2 = 67,161, or $671.61.
So yes, this will work out to save you a pretty good sum of money by the end of the year. Maybe enough to pay a month's rent, depending on where you live!
Of course, it's not as good as doubling the number of pennies each day; that would save you a boatload of money over the course of a year:
1 + 2 + 4 + ... + 2n = 2n + 1 - 1
So: 1 + 2 + 4 + ... + 2365 = 2366 - 1 = 1.5 x 10110.*
Actually, scratch my last comment; that's not a boatload of money. If a penny's volume is 0.35 cm3, or 0.00000035 m3, that's a volume of 5.25 x 10103 m3. Considering the volume of the sun is 1.4 x 1027 m3, I don't think you're going to fit those pennies in a jar, a boat, or even all the planets of the solar system. Maybe we should just stick to the original plan.
Incidentally, there's also a "Dollar a Week Challenge" in which you save one dollar the first week, two dollars the second week, and so on for an entire year. It sounds like a lot more, since you're saving a dollar instead of a penny, but there are only 52 weeks in the year, so it works out like this:
Sum = 52(52 + 1)/2 = $1,378, which is only a litte more than twice the penny challenge.
If you wanted to get really interesting, you could do a "Dollar Square Weekly Challenge," which would look something like this:
In the first week, you save 12 = 1 dollar.
In the second week, you save 22 = 4 dollars.
And so forth. It turns out, there's a nice formula for the sum of squares as well:
Sum = n(n + 1)(2n + 1)/6
Sum = 52(52 + 1)(2 x 52 + 1)/6 = $48,230. That's a lot of money! How would it compare to a Penny Square Daily Challenge?
Sum = 365(365 + 1)(2 x 365 + 1)/6 = 16,275,715 pennies, or $162,757.15. So even though the Dollar Challenge saves more than the Penny Challenge, the Penny Square Challenge saves more than the Dollar Square Challenge.
It would be interesting to see how many weeks you'd have to do the Dollar Square Challenge in order for it to surpass the Penny Square Challenge for a year. I'll leave that do the reader to figure out!
* This formula is actually for a leap year. Since the first term of the sequence is 20, the 366th term is 2365.
A follow-up question from this year's Christmas Graph Post: "You said we should be able to factor equation T (the Christmas tree outline equation). How?" - Kevin from Nebraska
Hi Kevin, first of all, for anyone who doesn't want to go find the equation in the other post, here it is:
Let T be the equation: 4x2y - y3 + 8y2 - 16y ≤ 0
The first step in factoring this should be easy; every term on the left has a y in it, so we can factor that out:
y(4x2 - y2 + 8y - 16)
The next step is to split 4x2 - y2 + 8y - 16 into groups, in the hope that we can find a grouping that will help us factor it further. Grouping is not always a cut-and-dried process; sometimes it's easy to find a grouping that helps, sometimes it's hard. And, of course, sometimes it's impossible, which makes the process both frustrating (when you can't find a grouping that works) and satisfying (when you do!).
Typically, if I have four terms, the first thing I try is to split it into pairs, and factor each of the pairs:
(4x2 - y2) + (8y - 16)
(2x - y)(2x + y) + 8(y - 2)
If the (y - 2) on the right matched either of the binomials on the left, we'd be able to factor this some more. Alas, no such luck. Let's try another grouping:
(4x2 -16) - (y2 - 8y)
4(x - 2)(x + 2) - y(y - 8)
Still no joy. Let's try another grouping:
(4x2 + 8y) - (y2 +16)
This one is also useless, because we can't factor the second group at all. At this point, I start re-evaluating my method; maybe grouping in pairs isn't the right way to go. Maybe I should create groups that are mismatched in size. For example:
4x2 - (y2 - 8y + 16)
Suddenly, I realize, "Hey! That thing in the parentheses is a perfect square!"
4x2 - (y - 4)2
Wonderful! This is a difference of squares!
[2x + (y - 4)][2x - (y - 4)]
(2x + y - 4)(2x - y + 4)
So the full factorization is:
y(2x + y - 4)(2x - y + 4) ≤ 0
Now you can go back to the page for the Christmas tree graph and see why this graphs as shown at the top of this post.
Merry Christmas from me and my four year old son. Here's a Christmas tree ornament we built this morning. Each face is a triangle, and there are twenty faces in all. The faces are all made from last year's Christmas cards, cut into circles, and then folded around the shape of an equilateral triangle, in order to simultaneously form the face and provide a surface for gluing. Click the image for a larger view.
The icosahedron is one of 5 Platonic solids (regular solids). The complete list is:
- Tetrahedron: Four sides that are all equilateral triangles
- Cube: Six sides that are all squares
- Octahedron: Eight sides that are all equilateral triangles
- Dodecahedron: Twelve sides that are all regular pentagons
- Icosahedron: Twenty sides that are all equilateral triangles
I've made ornaments/decorations from three of those five shapes; maybe when I've done all five I'll publish an instruction sheet for each!
Merry Christmas!