Tuesday, March 6, 2007

Imaginary Usefulness

Few subjects frustrate me faster than mathematics. Math is an essential skill and a useful tool. But our school systems, secondary and primary both, totally fail to teach common sense along with it.

I’m constantly amazed at how many smart people are made stupid by an extensive education in Mathematics. Mostly this is because math is taught more as theory than applied science... especially in primary education. Through high-school most people learn a crap-ton of math theory and mechanics.  But there just aren’t many classes taught that apply math in a useful way. 

This leads to the question eventually asked in every math class, “when will I ever need to use this in the real world”. For higher math, anything above basic Algebra, the answer for most people is “probably never”.

That aside, the mechanics and theory still need to be taught so as to give students the possibility of going into a career where they could actually use higher math. A basic familiarity with more advanced math is useful to a sorta degree, but much more useful would be classes on the applied uses of math... classes that show how and when math is useful.  But what I’d like to see taught most is common sense.

For example, in my 10th grade Algebra II class we spent about three straight weeks going over imaginary numbers. Ok, let me get this straight... due to the practical limitations of the universe this math cannot be done. But if you ignore that little rule, you can still use the mechanics of our math system and generate numbers that have no meaning... they are imaginary.

Umm... excuse me, but shouldn’t that be the fucking end of the lesson?!?!?  But NOOOOoooo!  After that we had to spend weeks working math problems that result in imaginary numbers. Then we had tests on how accurately we could solve these problems.

So, we are going to be tested on our ability to come up with accurate answers to a math problem where both the question and the answer have absolutely no meaning at all?

Why can’t I just answer “turd-jam” for all the questions and still get credit? After all, “turd-jam” has just as much meaning in context with the questions as the actual numerical “answer” would... and in 10th grade it would have at least been funny, which is more useful than any other answer I might have derived. This is a classic example of the failure to apply common sense in math. As far as I can tell, the first major failure to teach common sense in math starts when they teach you the concept of negative numbers.  Numbers measure quantity. That’s fucking it... Quantity. The real usefulness of any math is in the question “quantity of what?” 

The only non-intuitive thing about quantity is the concept of zero, but this is fairly easy to explain to kids. Once zero is understood is becomes common sense. Zero also becomes the only non-positive number that remains meaningful. 

But negative numbers are NOT real. They cannot, and do not actually exist. If you solve a math problem, and the result is a negative number then all you have learned is that problem is flawed, you have incomplete information, and/or the number you produced is not a valid measure of anything that exists in the same context as the original question. Since the basis of the question was wrong, any number you derive no longer has any meaning and you should stop right there. If you continue with negative numbers then you are either just making shit up, or you are measuring something in a different context than the context assumed in the original question.... and you had better have a damned good idea what the new context of your answer is, or you are screwed! 

But they never teach that concept in school.

Let us use a practical example.
You own an appliance company. You have 1refrigerator in stock. A customer comes in and buys 4 refrigerators. How many refrigerators do you have left in stock?
If you answered negative three (-3), then just kill yourself now.

In-stock means “physically sitting in your warehouse”. If you walk back to the warehouse, I can only guarantee one thing... you, the fuck, will not see negative three refrigerators sitting back there.  The only meaningful answer to this question is “unknown”. How many refrigerators you have in stock after selling 4 of them depends on if you gave the customer the one fridge you had already, or if you are waiting to deliver all 4 fridges after your vendor deliveres them to you. The original problem contains insufficient information. When you walk back there, you will either see zero or one fridge in your warehouse... So when you see -3 in your answer, what it really means is that you are measuring the wrong thing. You don’t have -3 of anything. You may have +3 of something else, like refrigerators you need to order from a vendor, but that number is valid only in a different context, and only when the new context makes that number a positive number or zero. 

Which brings us back to imaginary numbers. How surprising is it that it is impossible to perform some mathematical operations when you are using numbers that simply mean you are working with values from a different context than the one your math problem represents? In the case of imaginary numbers you are working with numbers from a context that cannot exist at all, so you should just give the fuck up right there, rethink your math problem so that it addresses a real question in a meaningful context.

I see this junk all the time in programming. I get requests like, “I need a report that shows the number of brain cells left in my head”.

Sorry... but that report results in negative numbers and therefore has no useful meaning.

Why not ask a different question like “how many brain cells will I need to have implanted before I regain the ability to chew gum and walk at the same time?”.   Any math should answer a question in such a way that the answer has some useful meaning. If you are coding with negative numbers then your code measures the wrong thing. Flip something around so you are measuring things that exist. Your code will be easier to understand and will produce results that have more meaning.

With math, please always use common sense. Mechanics are neat, but you have to understand the “why” of your math, not just the “how”. That is especially true when you are making up math that gives answers that other people have to interpret.