Wednesday, December 21, 2011

x / 0 = {}

It has been a very long time since I posted here, but I have just had a Eureka! moment.

Since I have started this blog, I have contemplated what 0^0 means, and what x/0 means, and I have been stumped by the lack of a truly real world example that has a neat mathematical equation to go with it. Sure pies are nice, but they leave room for debate.

Lately, I have been working with geometry for 3D image rendering, and I cam across an interesting problem: How do I get the Z coordinate of a point in a triangle when given the X and Y coordinates?

That's easy enough; Use the 3 vertices of the triangle to determine the plane the triangle sets on, and then solve the plane equation:

Ax + By + Cz + D = 0

for the Z coordinate:

z = (-Ax-By-D) / C = x(-A/C) + y(-B/C) + (-D/C)

So here is an obvious situation of x/0, and when you are programming, you need to define the answer so your program doesn't crash.

What does x/0 mean here?
It means you are looking at a plane parallel to the Z axis is what it means. And this is a very real world situation that has a very clear mathematical expression.

A real world example would be, say you are standing on a street corner and you point at the side of a building. Your finger (or what ever pointing apparatus you might be using) points at a single spot on the wall. You can clearly establish one answer. You are pointing at a spot that is 5feet above the side walk and 20feet from the front of the building and that spot is 150feet away from you. Your example may differ, but this illustrates the point.

Now, say you moved yourself so you were in perfect alignment with the wall (so you are on the same plane as it is) and you point at that same spot on the wall. What you will likely think is that you are now actually pointing at the front corner of the building, and you would be right. But imagine the line your finger (or pointing apparatus) makes. It goes through that front corner and extends all the way along the wall. By pointing at the wall, you are actually pointing at many points on that wall at the same time!

You are pointing at that spot on the wall, so that spot is real, and is a valid answer to the question "What are you pointing at?" But you should also realize that you are pointing at every spot on the line that is formed by you pointing at that one spot. This means that there is actually a whole set of correct answers. Remember how you were thinking you were pointing at the front corner of the building? That was ALSO a valid answer!

This proves that what divide by zero represents is multiple answers at once! It's not necessarily infinity, and it's not necessarily 0 or 1 or anything.

In the pure plane equation, for any given X and Y pair that looks down a plain parallel to the Z axis, all the answers from -infinity to +infinity are valid answers.

C = 0 therefore z = (-Ax-By-D) / C = {-inf, inf}

Now, my notation may not be perfect but I wasn't a math major, but this is clear enough to state the point.

In the case of our wall, only a subset of those answers are correct. We have stated that we are pointing at a point ON the wall. The wall does not extend for forever, so the answers are only valid from one side of the wall to the other.

Say you are the reference point so our wall starts 5 feet away and ends 100 feet away. We can say that the range of valid answers are between 5 and 100 feet.
C = 0 therefore z = (-Ax-By-D) / C = {5, 100}

You could even reduce the set to exactly one answer if you defined the parameters well enough. For instance you could just say you are pointing at the front corner of the building. Then our answer is simply:
C = 0 therefore z = (-Ax-By-D) / C = {5}

The whole set of the possible answers is made up of only 1 answer.

And thus x/0 IS defined as a set.







No comments:

Post a Comment