Functions that commute

At the bottom of this post is a one-liner that I use in my classes the first time I present a theorem where two functions are permitted to commute. At many layers of the mathematics curriculum, students learn about that various functions can essentially commute with each other. In other words, the order in which the operations is performed doesn’t affect the final answer. Here’s a partial list off the top of my head:

  1. Arithmetic/Algebra: a \cdot (b + c) = a \cdot b + a \cdot c. This of course is commonly called the distributive property (and not the commutative property), but the essential idea is that the same answer is obtained whether the multiplications are performed first or if the addition is performed first.
  2. Algebra: If a,b > 0, then \sqrt{ab} = \sqrt{a} \sqrt{b}.
  3. Algebra: If a,b > 0 and x is any real number, then (ab)^x = a^x b^x.
  4. Precalculus: \displaystyle \sum_{i=1}^n (a_i+b_i) = \displaystyle \sum_{i=1}^n a_i + \sum_{i=1}^n b_i.
  5. Precalculus: \displaystyle \sum_{i=1}^n c a_i = c \displaystyle \sum_{i=1}^n a_i.
  6. Calculus: If f is continuous at an interior point c, then \displaystyle \lim_{x \to c} f(x) = f(c).
  7. Calculus: If f and g are differentiable, then (f+g)' = f' + g'.
  8. Calculus: If f is differentiable and c is a constant, then (cf)' = cf'.
  9. Calculus: If f and g are integrable, then \int (f+g) = \int f + \int g.
  10. Calculus: If f is integrable and c is a constant, then \int cf = c \int f.
  11. Calculus: If f: \mathbb{R}^2 \to \mathbb{R} is integrable, \iint f(x,y) dx dy = \iint f(x,y) dy dx.
  12. Calculus: For most differentiable function f: \mathbb{R}^2 \to \mathbb{R} that arise in practice, \displaystyle \frac{\partial^2 f}{\partial x \partial y} = \displaystyle \frac{\partial^2 f}{\partial y \partial x}.
  13. Probability: If X and Y are random variables, then E(X+Y) = E(X) + E(Y).
  14. Probability: If X is a random variable and c is a constant, then E(cX) = c E(X).
  15. Probability: If X and Y are independent random variables, then E(XY) = E(X) E(Y).
  16. Probability: If X and Y are independent random variables, then \hbox{Var}(X+Y) = \hbox{Var}(X) + \hbox{Var}(Y).
  17. Set theory: If A, B, and C are sets, then A \cup (B \cap C) = (A \cup B) \cap (A \cup C).
  18. Set theory: If A, B, and C are sets, then A \cap (B \cup C) = (A \cap B) \cup (A \cap C).

However, there are plenty of instances when two functions do not commute. Most of these, of course, are common mistakes that students make when they first encounter these concepts. Here’s a partial list off the top of my head. (For all of these, the inequality sign means that the two sides do not have to be equal… though there may be special cases when equality happens to happen.)

  1. Algebra: (a+b)^x \ne a^x + b^x if x \ne 1. Important special cases are x = 2, x = 1/2, and x = -1.
  2. Algebra/Precalculus: \log_b(x+y) = \log_b x + \log_b y. I call this the third classic blunder.
  3. Precalculus: (f \circ g)(x) \ne (g \circ f)(x).
  4. Precalculus: \sin(x+y) \ne \sin x + \sin y, \cos(x+y) \ne \cos x + \cos y, etc.
  5. Precalculus: \displaystyle \sum_{i=1}^n (a_i b_i) \ne \displaystyle \left(\sum_{i=1}^n a_i \right) \left( \sum_{i=1}^n b_i \right).
  6. Calculus: (fg)' \ne f' \cdot g'.
  7. Calculus \left( \displaystyle \frac{f}{g} \right)' \ne \displaystyle \frac{f'}{g'}
  8. Calculus: \int fg \ne \left( \int f \right) \left( \int g \right).
  9. Probability: If X and Y are dependent random variables, then E(XY) \ne E(X) E(Y).
  10. Probability: If X and Y are dependent random variables, then \hbox{Var}(X+Y) \ne \hbox{Var}(X) + \hbox{Var}(Y).

All this to say, it’s a big deal when two functions commute, because this doesn’t happen all the time.

green lineI wish I could remember the speaker’s name, but I heard the following one-liner at a state mathematics conference many years ago, and I’ve used it to great effect in my classes ever since. Whenever I present a property where two functions commute, I’ll say, “In other words, the order of operations does not matter. This is a big deal, because, in real life, the order of operations usually is important. For example, this morning, you probably got dressed and then went outside. The order was important.”

 

A bit of a fixer upper

I always encourage students to answer occasional questions in class; naturally, this opens the possibility that a student may suggest an answer that is completely wrong or is only partially correct. Naturally, I don’t want to discourage students from participating in class  by blunting saying “You’re wrong!” So I need to have a gentle way of pointing out that the proposed answer isn’t quite right.

Thanks to a recent movie, I finally have hit on a one-liner to do this with good humor and cheer: “To quote the trolls in Frozen, I’m afraid your answer is a bit of a fixer-upper. (Laughter) So it’s a bit of a fixer-upper, but this I’m certain of… you can fix this fixer-upper up with a little bit of love.”

If you have no idea about what I’m talking about, here’s the song from the movie (you can hate me for the rest of the day while you sing this song to yourself):

Math Riots Prove Fun Incalculable

The following column appeared in the Chicago Tribune / DuPage County edition Tuesday June 29 1993 page 2-1.

This one’s dedicated to all mathematicians in cyberspace who can still remember the details surrounding Michael Jordan’s Chicago Bulls’ third straight championship in 6 games over Charles Barkley’s Phoenix Suns in the 1993 NBA Finals.

 


 

MATH RIOTS PROVE FUN INCALCULABLE

by Eric Zorn

News Item (June 23) — Mathematicians worldwide were excited and pleased today by the announcement that Princeton University professor Andrew Wiles had finally proved Fermat’s Last Theorem, a 365-year-old problem said to be the most famous in the field.

Yes, admittedly, there was rioting and vandalism last week during the celebration. A few bookstores had windows smashed and shelves stripped, and vacant lots glowed with burning piles of old dissertations. But overall we can feel relief that it was nothing — nothing — compared to the outbreak of exuberant thuggery that occurred in 1984 after Louis DeBranges finally proved the Bieberbach Conjecture.

“Math hooligans are the worst,” said a Chicago Police Department spokesman. “But the city learned from the Bieberbach riots. We were ready for them this time.”

When word hit Wednesday that Fermat’s Last Theorem had fallen, a massive show of force from law enforcement at universities all around the country headed off a repeat of the festive looting sprees that have become the traditional accompaniment to triumphant breakthroughs in higher mathematics.

Mounted police throughout Hyde Park kept crowds of delirious wizards at the University of Chicago from tipping over cars on the midway as they first did in 1976 when Wolfgang Haken and Kenneth Appel cracked the long-vexing Four-Color Problem. Incidents of textbook-throwing and citizens being pulled from their cars and humiliated with difficult story problems last week were described by the university’s math department chairman Bob Zimmer as “isolated.”

Zimmer said, “Most of the celebrations were orderly and peaceful. But there will always be a few — usually graduate students — who use any excuse to cause trouble and steal. These are not true fans of Andrew Wiles.”

Wiles himself pleaded for calm even as he offered up the proof that there is no solution to the equation x^n + y^n = z^n when n is a whole number greater than two, as Pierre de Fermat first proposed in the 17th Century. “Party hard but party safe,” he said, echoing the phrase he had repeated often in interviews with scholarly journals as he came closer and closer to completing his proof.

Some authorities tried to blame the disorder on the provocative taunting of Japanese mathematician Yoichi Miyaoka. Miyaoka thought he had proved Fermat’s Last Theorem in 1988, but his claims did not bear up under the scrutiny of professional referees, leading some to suspect that the fix was in. And ever since, as Wiles chipped away steadily at the Fermat problem, Miyaoka scoffed that there would be no reason to board up windows near universities any time soon; that God wanted Miyaoka to prove it.

In a peculiar sidelight, Miyaoka recently took the trouble to secure a U.S. trademark on the equation x^n + y^n = z^n as well as the now-ubiquitous expression “Take that, Fermat!” Ironically, in defeat, he stands to make a good deal of money on cap and T-shirt sales.

This was no walk-in-the-park proof for Wiles. He was dogged, in the early going, by sniping publicity that claimed he was seen puttering late one night doing set theory in a New Jersey library when he either should have been sleeping, critics said, or focusing on arithmetic algebraic geometry for the proving work ahead.

“Set theory is my hobby, it helps me relax,” was his angry explanation. The next night, he channeled his fury and came up with five critical steps in his proof. Not a record, but close.

There was talk that he thought he could do it all by himself, especially when he candidly referred to University of California mathematician Kenneth Ribet as part of his “supporting cast,” when most people in the field knew that without Ribet’s 1986 proof definitively linking the Taniyama Conjecture to Fermat’s Last Theorem, Wiles would be just another frustrated guy in a tweed jacket teaching calculus to freshmen.

His travails made the ultimate victory that much more explosive for math buffs. When the news arrived, many were already wired from caffeine consumed at daily colloquial teas, and the took to the streets en masse shouting, “Obvious! Yessss! It was obvious!”

The law cannot hope to stop such enthusiasm, only to control it. Still, one has to wonder what the connection is between wanton pillaging and a mathematical proof, no matter how long-awaited and subtle.

The Victory Over Fermat rally, held on a cloudless day in front of a crowd of 30,000 (police estimate: 150,000) was pleasantly peaceful. Signs unfurled in the audience proclaimed Wiles the greatest mathematician of all time, though partisans of Euclid, Descartes, Newton, and C.F. Gauss and others argued the point vehemently.

A warmup act, The Supertheorists, delighted the crowd with a ragged song, “It Was Never Less Than Probable, My Friend,” which included such gloating, barbed verses as

I had a proof all ready

But then I did a choke-a

Made liberal assumptions

Hi! I’m Yoichi Miyaoka.

In the speeches from the stage, there was talk of a dynasty, specifically that next year Wiles will crack the great unproven Riemann Hypothesis (“Rie-peat! Rie-peat!” the crowd cried), and that after the Prime-Pair Problem, the Goldbach Conjecture (“Minimum Goldbach,” said one T-shirt) and so on.

They couldn’t just let him enjoy his proof. Not even for one day. Math people. Go figure ’em.

How signed integers are represented using 16 bits

xkcdcant_sleep

Source: http://www.xkcd.com/571/

This probably requires a little explanation with the nuances of how integers are stored in computers. A 16-bit signed integer simulates binary digits with 16 digits, where the first digit represents either positive (0) or negative (1). Because this first digit represents positive or negative, the counting system is a little different than regular counting in binary.

For starters,

0000000000000000 represents 0

0000000000000001 represents 1

0000000000000010 represents 2

\vdots

0111111111111111111 represents 2^{16}-1 = 32767

For the next number, 1000000000000000, there’s a catch. The first 1 means that this should represent a negative number. However, there’s no need for this to stand for -0, since we already have a representation for 0. So, to prevent representing the same number twice, we’ll say that this number represents 0 - 32768 = -32768, and we’ll follow this rule for all representations starting with 1. So

0000000000000000 represents 0-32768 = -32768

0000000000000001 represents 1 - 32768 = -32767

0000000000000010 represents 2 - 32768 = -32766

\vdots

0111111111111111111 represents 32767-32768 = -1

Because of this nuance, the following C computer program will result in the unexpected answer of -37268 (symbolized by the sheep going backwards in the comic strip).

main()

{

      short x = 32767;

      printf(“%d \n”, x + 1);

}

For more details, see http://en.wikipedia.org/wiki/Integer_%28computer_science%29