Do you have a question you would like to ask Professor Puzzler? Click here to ask your question!

Happy Valentine's Day, one day late! We hope you all had a wonderful day yesterday, no matter how (or if) you celebrated the day. For all of our online friends, I have the only Valentine's Day card you'll ever need for your mathematician friends.

It references counting principles in combinatoric mathematics, and in case you're not familiar with the notation, please allow me to explain.

Suppose you went to a pizza restaurant, and when you ordered your pizza, they told you, "You can choose from any of the following toppings: pepperoni, olives, hamburg, mushrooms, onions, ham, pineapple, or sausage. Of those, you must choose *three *toppings." (I know, what restaurant demands that you choose *exactly *three toppings?)

So how do you determine the number of possible pizzas? Well, the reasoning goes something like this:

- I have eight ways to choose the first topping (because there are eight toppings available).
- Once I've done that, I now have seven ways to choose the second topping (because I've already chosen one).
- Now for my third topping, I have six choices.
- That gives me 8 x 7 x 6 = 336 possibilities.
- BUT WAIT A MINUTE! If I chose "pepperoni, olives and ham" - is that really any different from choosing "olives, ham, and pepperoni"?? No, it's not; it's the same pizza no matter what order I pick the toppings in. So I have to eliminate the repetitions.
- It turns out the number of repetitions is 6. Why? Because you could put pepperoni in 3 positions, leaving 2 positions for olives, and then 1 position for ham. 3 x 2 x 1 = 6.
- So we take the total number of possibilities (336) and, recognizing that every
*different*pizza has been counted six times, we divide by 6:^{336}/_{6}= 56. There are 56 different ways of choosing your pizza.

There's a nice way of representing the fact that we've got 8 things to choose from, aned we're choosing 3 of them, and it looks like this:

But how do we read that funny notation with the parentheses and two numbers inside of it? Since there are eight things, and we are choosing three, we read it as follows: "Eight choose three."

So, in honor of Valentine's Day, be sure to tell your favorite mathematician:

One of my Pre-Cal students asked me a few days ago if the Law of Sines was hard to prove. I told him I'd write up a proof here. I also made my Pre-Cal class work through the proof themselves. I'll share their train of reasoning here.

First, we stated the Law of Sines:

in triangle ABC, a/sinA = b/sinB = c/sincC.

They quickly recognized that we need a diagram to work from. So we drew something like the diagram to the right.

Then one of the students said, "Maybe we should draw in an altitude." Thus we had the following diagram. Their choice to label that new point F was somewhat random, I think, but I liked it, because F can stand for "foot" of the altitude.

After puzzling over their diagram for a bit, someone suggested setting up an equation involving the sine function and triangle ABF, and after a bit more thinking, a second equation involving the sine function and triangle CBF:

sinA = h/c; sinC = h/a.

They then did one of their favorite algebraic steps: multiplying both sides of an equation by a denominator in order to get rid of fractions (they don't like fractions, so they're always happy to get rid of them):

csinA = h; asinC = h.

A little substitution gives csinA = asinC. They then chose to divide both sides of this equation by sinAsinC, which gives:

c/sinC = a/sinA.

At this point, someone said, "Well we can just do this all over again with another side." Sure enough, if you drew an altitude to a different side, you'd get b/sinB = c/sinC (or b/sinB = a/sinA, depending on which altitude you drew).

Thus, a/sinA = b/sinB = c/sinC, and the Law of Sines is proved. Nice teamwork, class!

Wendy from China asks, "three digit number. When Written in base eight, the number still has three digits, but theY are eXactlY the reVerse of its base ten representation. What is the number?"

If I understand you correctly, you're looking for a base ten number with three digits, such that if you reverse the digits, you get the same number written as a base eight numeral?

In other words, you're looking for digits x,y, and z, such that:

xyz_{ten }= zyx_{eight}.

Well, let's explore this question and see what happens. First, since xyz is a base ten number, we know that x, y, and z must all be less than 10. On the other hand, zyx is a base eight number, so we can conclude that they are actually less than 8.

So we have three digits between zero and seven inclusive. So let's suppose there is a number that works. We can write the following equation:

100x + 10y + z = 64z + 8y + x

2y = 63z - 99x

2y = 9(7z - 11x)

Now, you might be wondering why I moved the z and x terms to the right and then factored out a 9. It wasn't a completely random choice. This equation is what we call a Diophantine equation (an equation in which all the solutions must be integers). In Diophantine equations, we often are looking for factors and multiples, so looking for something we can factor out is often helpful. Since I spotted that both 63 and 99 are divisible by 9, I thought it would be helpful to arrange it like this. So what does that do for us?

Well, since x and z are both integers, we can conclude that the right-hand side of the equation is a multiple of 9. This means that the left-hand side must also be a multiple of 9. But wait a minute! How can 2y be a multiple of 9? Only if y is a multiple of 9. Our first instinct would be to say that y must equal 9, but remember that it has to be less than eight. So what could it be? Only one possibility: y = 0.

But if y equals zero, that means that 7z - 11x must also be zero, in order for the two sides of the equation to be zero.

7z = 11x, or x = (7/11)z.

Since x is an integer, that means (7/11)z is also an integer. But that can only happen if z is a multiple of 11. How many integers between 0 and 7 inclusive are multiples of 11? Only one! z = 0. But this means x = 0 too!

So in the end, the only answer is a very uninteresting one: the number is 000.

000_{ten} = 000_{eight}.

I'd be hard presed to say that 000 is a three-digit number, so I'd prefer to say that there's no solution.

This question comes from one of my Pre-Cal students, who wants to know if there's a nice rule like the "sum and product" factoring rule, that works when the roots are complex numbers.

The sum-and-product method he's referring to is this:

If we have a quadratic x^{2} + bx + c, and we can find two numbers (let's call them m and n) that add to b and multiply to c, then the quadratic factors into (x + m)(x + n). Here's an example:

Factor x^{2} + 13x + 36.

In order to factor this, I look for two numbers that add to 13, and multiply to 36. Can you find them? I usually start by asking, "What are two numbers that multiply to 36?" The first pair I think of is 6 x 6. But 6 + 6 isn't 13, so that doesn't work. Next I think of 9 x 4. Aha! 9 + 4 is 13. So, since 9 x 4 = 36 and 9 x 4 = 13, I conclude that:

x^{2} + 13x + 36 = (x + 4)(x + 9).

Okay, so now the question is, what if the quadratic factors with complex numbers? Is there a nice way of doing this factoring rule?

Let's start with an example:

x^{2} - 4x + 5

If I knew that the factorization of this resulted in complex numbers, I would remember another rule, that complex roots come in pairs: if one root is a + bi, then the other is a - bi.

So, we look for two numbers such that:

(a + bi) + (a - bi) = -4

(a + bi)(a - bi) = 5

Simplifying these gives:

2a = -4, or a = -2

a^{2} + b^{2} = 5

4 + b^{2} = 5

b^{2} = 1

b = ^{+}/_{-} 1

Therefore, this factors as follows:

x^{2} - 4x + 5 = (x - 2 - i)(x - 2 + i) Multiply this out, and sure enough, it's true.

Let's try generalizing this a bit. Suppose the quadratic was x^{2} + mx + n, and we wanted to find complex roots with the sum and product method.

(a + bi) + (a - bi) = m

(a + bi)(a - bi) = n

2a = m

a^{2} + b^{2 }= n

a = m/2

m^{2}/4 + b^{2} = n

b = SQR(n - m^{2}/4)

So let's take another example, and put our rule into practice.

x^{2} + 6x + 13

a is half of 6, or 3.

b is SQR{13 - 6^{2}/4) = SQR{13 - 9} = 2.

Therefore x^{2} + 6x + 13 = (x +3 + 2i)(x + 3 - 2i).

This isn't too bad, but it presumes that the leading coefficient of the quadratic is 1; things might get a bit dicier if it wasn't. And, of course, if you're paying close attention, the result we obtain is actually just a slightly re-arranged version of the quadratic formula as it would appear in the special case of the leading coefficient being one!

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:

2^{3} + 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.