Math Cosmetics!

Started by
19 comments, last by Dmytry 19 years, 8 months ago
Quote:Original post by Timkin
As to what happens when the line is vertical, you have an infinite vertical change divided by a zero horizontal change, which gives an infinite gradient (which can be confirmed by checking that the tan(pi) = infinity.

Or, more accurately, tan(theta approaches pi) approaches plus or minus infinity, since it goes to different places depending on which way you're coming from.
No Excuses
Advertisement
1) There is no "default" slope formula. Thinking that there is a "default" formula just means that you don't understand your maths.
The reason why they teach you "m=(y2-y1)/(x2-x1)" is to avoid dividing a negative by a negative. It confuses people when they are first learning about gradients. The whole point is that you define gradient as "Rise over Run", so we leave it as a positive over a postive when using cartesian co-ordinates.


as for 2)
with labels there are no official rules involved, but if the labels are in a directly related numerical order, you should follow the co-oridinate system. In the case of cartesian, you should stick p1 on the left and p2 on the right.
On the other hand, if your plotting something that is in order like the names of cash registers, but you are plotting them on a line that only shows revenue earned, they aren't correlated so just wack p1 and p2 wherever it is appropriate.
It comes down to how it is relevent to the data.

I find a naming convetion such as "Fred" on the left and "Rubber Ducky" on the right is usually sufficient enough to confuse any reader into ignoring your labeling convention.
Beer - the love catalystgood ol' homepage
Quote:Original post by liquiddark
Quote:Original post by Timkin
As to what happens when the line is vertical, you have an infinite vertical change divided by a zero horizontal change, which gives an infinite gradient (which can be confirmed by checking that the tan(pi) = infinity.

Or, more accurately, tan(theta approaches pi) approaches plus or minus infinity, since it goes to different places depending on which way you're coming from.

Not really. There are several types of infinity. For real numbers, there are two options: you can add two points "-infinity" and "+infinity", or you can add a single point "infinity" which is reachable from both ends. The first construction is common in Analysis (a.k.a. Calculus) when talking about limits. The second construction is the one used in Projective Geometry, which is the appropriate framework to describe the slope of a line.

The slope of a line should be an element of the 1-D real projective space, instead of a real number. The difference is only that the 1-D real projective space has a valid representation for vertical lines.

Saying that "tan(pi) = infinity" makes perfect sense to me, because we can see tan as a function that takes a real number and returns an element of the 1-D real projective space.

In case it is not clear by now, I like Geometry better than I like analysis. :)
am I on crack, or is it tan(pi/2) = infinity.
Kevin.
Hahahaha. Nice catch, Krumble. I'll stop posting here and annoying Timkin again now.
No Excuses
Krumble, you are perfectly correct... someone else picked up on my typo as well... I just hadn't had time to correct it... sorry...

Of course tan(pi/2) = infinity and not tan(pi), which infact equals zero.

Sorry for the really bad typo and the confusion it may have caused.

Cheers,

Timkin
Woah damn. I saw that and thought it was wrong and then wondered if I was going nuts... O_O
Well, assuming x2 > x1, then x2-x1 is always positive, the intuitive physical interpretation of "difference" between x1 and x2. That's very convenient.
Quote:Original post by Squirm
Ask me to do an arbitrary line and you get a 45 degree positive slope, but maybe that's because I'm a physicist?


OMFG I was thinking the exact same thing. And I'm also a physicist...
My stuff.Shameless promotion: FreePop: The GPL god-sim.
Thanks for all your input!

To summarize:

We label points from left to right, just because we read from left to right.Then:

(y2-y1)/(x2-x1) Is better than (y1-y2)/(x1-x2) because in the first case the the denoninator is *always* positive
(only if we put P1 to the left and P2 to the right)





This topic is closed to new replies.

Advertisement