I have sworn upon the altar of God eternal hostility against every form of tyranny over the mind of man. -- Thomas Jefferson

Showing posts with label Math interlude. Show all posts
Showing posts with label Math interlude. Show all posts

Sunday, October 11, 2009

Math Interlude:
Homeschool Math by Rotating Wheat Thins Boxes

I have a theory that if you cannot explain an idea in some form to a bright, attentive six-year-old, then that may be a sign that you do not really get the idea yourself.

So, here is a very simple math exploration that can be done even with a homeschooled six-year-old and that in fact connects to some quite advanced mathematics.

3-D Rotations Need Not Commute:

Get two identical boxes – we used a couple of Wheat Thins boxes.

Put both boxes on the table or floor in front of you facing towards you.

Now, the idea is to perform two rotations on the boxes, but in different orders.

First, take the box on the left and rotate it a quarter turn counter-clockwise towards yourself (i.e., 90 degrees counter-clockwise around the vertical axis): call this rotation Z.

Now, take the box to your right and rotate it a quarter turn so that the front face ends up face down on the floor (i.e., 90 degrees around an axis going from left to right): call this rotation X.

Now, let’s perform rotation X on the left box: i.e., rotate it so that the face which is now vertical and facing towards you is rotated forward and down onto the floor.

Finally perform rotation Z on the right box: i.e., rotate it counter-clockwise around the vertical axis a quarter turn.

In math we usually write transformations like this in reverse order: i.e., the first one performed in time ends up on being written on the right.

So, the left box ends up as X * Z * Box.

The right box ends up as Z * X * Box.

(By the way, the reason for the reverse order is that it seems natural, at least to mathematicians, to put the operation that operates first on the box to the immediate left of the word “Box.” Why does the word “Box” have to go on the right? It doesn’t, of course, but it is usually done that way.)

You’ll see that the boxes end up in very different positions.

In short, X * Z * Box is not equal to Z * X * Box.

So what?

Well… first, this is pretty weird. I would have thought they would end up the same! That such a simple geometry experiment gives unexpected results is rather a surprise.

Second, this invites various other experiments. What if we rotate by half-turns instead of quarter turns? What if we let X be a quarter turn and Z a half-turn. (By the way, I chose “X” and “Z” because the axes we are rotating around are what are usually called the “x-axis” and the “z-axis,” but I did not need to use those particular letters.)

Third, kids nowadays are expected to learn the “commutative laws” of addition and multiplication in early grade school. It tends to be hard for kids to see why these are really a big deal: how could things not commute!

Well, rotating Wheat Thins boxes by quarter turns is something even young children can do, and yet these operations do not commute. Commutativity can fail in fairly simple ways.

Finally, this ultimately connects with some quite advanced math, that is of interest both in pure mathematics and in applied fields ranging from computer graphics and robotics to elementary-particle physics.

Rotations are normally represented by matrices, but they can also be represented by “quaternions,” invented by the nineteenth-century mathematician William Rowan Hamilton: the fact that rotations can fail to commute is therefore a sign that matrices and quaternions will also have to exhibit this kind of non-commutativity.

Hamilton’s invention of quaternions (and their generalization to “octonions”) is an interesting story all by itself, and it connects to another simple math demonstration: the fact that you can rotate a teacup (with tea in it) by two full turns, holding it rigidly in your hand, without spilling a drop and without dislocating your shoulder (this is known variously as the “Philippine Wine Glass trick,” the “plate trick,” etc., but it is not magic, but a simple fact of mathematics).

More broadly, the group of rotations in three-dimensional space is what is knows as a “Lie group” (after the nineteenth-century mathematician Sophus Lie), and most Lie groups have this same property, i.e., that most members of the group fail to commute.

In physics, this failure to commute is one of the most important differences between the strong nuclear force and the electromagnetic force: the electromagnetic force is due to a commutative Lie group, the strong nuclear force to a non-commutative Lie group.

In short, there is a whole lot of math and science hidden behind a couple of Wheat Thins boxes!

So, what does all this have to do with homeschooling?

Well, this is about as simple a homeschool project as you can get in terms of necessary equipment and preparation time.

But, more than that, it illustrates a central point I am trying to make in this blog: ideas that are usually considered very advanced and complex in math, science, etc. can actually be introduced at a very early age.

Young kids cannot of course understand everything (indeed, neither can adults), but they can understand at least a bit about most things.

More than that, nobody can grasp complex ideas in one huge gulp: the idea in American schools – whether public schools or universities – that you can grasp algebra or calculus (or Lie groups) in just one nine-month period is a horrible mistake.

(In fact, I myself recently learned something about Lie groups – a simple proof of a theorem called the Baker-Campbell-Hausdorff theorem, which shows how the violations of the commutative law are almost the only thing that really makes Lie groups complicated. If not for the violation of the commutative laws, Lie groups would turn out to be rather like the surface of doughnuts – hyper-tori, as mathematicians say.)

This belief in teaching subjects in one huge gulp is connected to the “developmentalist” fallacy: i.e., the belief that kids are not ready to learn anything about many subjects until they reach a certain “developmental” level, and then, all of a sudden, the whole huge subject can be shoved down their throats.

Human beings do not learn that way.

One of the greatest advantages of homeschooling is that we can dump this dogma of “developmental appropriateness.”

We can talk to our kids about black holes, or have them see that rotations do not commute, in first grade. They can read about knights and castles, pharaohs and mummies, fossils and plate tectonics, early in grade school.

They will not grasp everything, but they will grasp much more than the dogmatic disciples of “developmental correctness” claim they can grasp.

So, get a couple of Wheat Thins boxes (or Cheerios boxes, or whatever you have in the pantry) and show your kids how simply rotating simple objects is much stranger than it looks.

And, tell them that understanding this strangeness is not only useful in robotics and computer graphics but that it also helps explain what holds protons and neutrons together inside the nuclei of atoms.

Tuesday, September 22, 2009

Math Interlude*:
Lagrange Interpolation as Self-Checking Algebra Practice

My kids started algebra last year, and, while they seem to get the basic concepts, they need practice – practice using the distributive law correctly to simplify algebraic expressions, practice dealing correctly with all those negative signs, etc.

Of course, I could just give them a huge number of polynomials to multiply, but, aside from being boring, that would require me to work out the answers myself in order to check their answers!

I’ve found a simple alternative that goes back to the great eighteenth-century mathematician Lagrange. “Lagrange interpolation” is actually interesting and useful in itself (although even well-educated technical people seem often to be ignorant of it nowadays), it happens to require quite a lot of multiplying of polynomials, checking of signs, etc. so that it is good algebra practice, and, best of all, it is automatically self-checking.

Here in a nutshell is how it works:

You are given a table of values for the variables x and y, and you want to find a polynomial that gives exactly the correct values of y when you plug in the values for x.

Suppose, for example, you are given the following values:
x y
1 1
2 4
3 9
5 9
and you want to find a polynomial
y = a x3 + b x2 + c x + d
that goes through those points.

There are various ways to solve this problem -- for example, you can use linear algebra if you view (a,b,c,d) as a vector in a four-dimensional space.

The method published by Lagrange uses a much simpler idea.

What we do is find four separate polynomial, each of which vanishes at all but one of the values of x.

For example, expression A:
(x - 2) * (x - 3) * (x - 5)
obviously vanishes when x is 2, 3, or 5, but obviously does not vanish when x is 1.

What is the value of expression A when x equals 1? Well, just plug 1 in for x and you find that the value is -8.

Now, when x is 1, according to our table, we need y to have a value of 1, not -8. So, we will just divide expression A by -8 and multiply it by 1, getting expression B:
1 * (x - 2) * (x - 3) * (x - 5) / (-8)
If you do the same thing for the case where x is 2, you get expression C:
4 * (x - 1) * (x - 3) * (x - 5) / (3)
Run the same trick for x equal to 3, and you get expression D:
9 * (x - 1) * (x - 2) * (x - 5) / (-4)
Finally, for x equals 5, you get expression E:
9 * (x - 1) * (x - 2) * (x - 3) / (24)
Now, expression B gives the right value for y when x is 1, and, it is created so that it will vanish at the other three values of x, so it will not mess up the values of y there. Similarly, expression C is created so that it gives the right value for y when x is 2, and it is zero at the other three values of x.

So, if we simplify expressions B, C, D, and E by multiplying each one out, and then add them all together, combining like terms, we will get a polynomial that gives the right values of y for each of the four values of x.

I don't need practice on algebra, so I had my kids do this. Their answer is expression F:
y = (-2/3) x3 + 5 x2 + (-22/3) x + 4
How do they (and I) know that they did the algebra right?

Simple – they plugged into expression F the values 1, 2, 3, and 5 for x. They should find that the values of y will then be 1, 4, 9, and 9 as planned. If they do not get the right values of y, they need to find their algebra error!

Note that Lagrange interpolation always works: you can choose any real numbers, positive, negative or zero, integral or fractional, for x and for y. (You can even use complex numbers if you wish.)

In particular, the values of x do not have to be evenly space: in my example, I
“skipped” 4, and it worked fine. Nor do the values of y have to be in any pattern: 1, 4, and 9 in my example seemed to be starting a pattern, but I wrecked that pattern by using 9 twice instead of using the “obvious” choice of 16.

The values of x do have to all be different (although, you can play some interesting tricks by letting two values of x get “infinitely close” – basically, you can then control the slope at x as well as the value of y).

You can in fact prove that this is the only polynomial of degree three or lower that goes through our four points. (In general, if you have n points, with different values of x, there is always a unique polynomial of degree n-1 or lower that goes through those points.)

The more points you use, the more complicated the algebra gets. I'd start with only two or three points for someone who is just learning algebra.

Isn't this too hard for kids in first-year algebra? No, my kids have learned it without too much trouble: there is no division of polynomials here, no quadratic formula, no trig functions, etc. This really is just first-year algebra.

But, isn't it complicated?

A little.

But this is the kind of complication that you get in real math applied to real problems. No one in real life (not even in science or engineering) ever faces the problem of multiplying ( x - 2 ) times ( x- 3) just for the fun of it. And, it is very, very rare that anyone ever faces the familiar textbook sort of algebra problem: “A train leaves Albuquerque going towards Santa Fe at 70 mph and a train leaves Santa Fe...” or
Jane had five times as many dolls as Ginger, but after Jane got two more dolls....”

Algebra is an abstract science; traditional algebra is about understanding the abstract properties of the four basic arithmetic operations: what does and can happen when you use the operations of addition, subtraction, multiplication and division in a systematic way? (Modern university algebra is about the properties of more general systems of mathematical operations that can operate on elements very different from ordinary real numbers.)

Mathematics is not really about balancing your checkbook or calculating the amount of tile you need to re-tile the kitchen – we have electronic calculators to do that for us.

Mathematics is about the possible abstract structures that can logically exist.

Those structures are often based on arithmetic and geometry, so you do need to know traditional math to understand modern mathematics.

But really learning math means trying not just to learn to get the right answer but actually exploring the universe of mathematics much as traditional explorers explored newly-discovered continents.

Lagrange interpolation is a very simple example of such exploration. Actually graphing the polynomials you get through Lagrange interpolation can also be enlightening: while the method always works, it can give some pretty “snaky” curves if you fit more than three points (for three points, the resulting curve is much nicer).

Is it too complicated? Well, someone unwilling to tackle topics such as Lagrange interpolation is not really learning math. If you want to know what math is really about, rather than just working you way through the watered-down, over-simplified picture of mathematics portrayed in American public-school textbooks, you need to try to wrap you mind around ideas such as Lagrange interpolation.

____________
* From time to time, I plan on posting a “Math Interlude,” in which I’ll try to explain some significant idea in math not known to most educated American adults, that I have in fact taught to my own kids in grade school or middle school, and that a bright middle-school student should be able to grasp.