# Line equation - slope-intercept and implicit forms

This topic is 2975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

The slope-intercept form of the line equation is:
y = ax + b

Tangent vector can be computed like this:
(dy/dx, dy/dy) = (a, 1)

Line equation can also be given in an implicit form:
f(x, y) = y - ax - b

Normal vector to this line can be computed by using the gradient:
(df/dx, df/dy) = (-a, 1)

And here is where my confusion comes in. Since tangent and normal vector are perpendicular to each other, the dot product of these two vectors ( (a, 1) dot (-a, 1) ) should give 0, yet it doesn't. So I must have done some obvious mistake which I just cannot see.

##### Share on other sites
Quote:
 Original post by maxestThe slope-intercept form of the line equation is:y = ax + bTangent vector can be computed like this:(dy/dx, dy/dy) = (a, 1)

No, the tangent vector is (1,a). And it is correct that it is perpendicular to (-a,1).

##### Share on other sites
Your version of the "Tangent vector" from the slope-intercept form is wrong. You have your components flipped. This is easy to see. Suppose that you have a horizontal line such that a is equal to zero (0). Then, y = b. The line is horizontal. Intuitively, the tangent vector is (1, 0). But your equation yields (0, 1). Bottom line, both of your equations are for the normal to the line.

So, mathematically why is this? If we look at it in terms of differential values rather than derivatives, it might make sense. a is equal to dy/dx. What is in the numerator? It is a differential value for y. It is the amount that the line rises or falls, along the y direction, for every unit change in x. And, so dy/dx must go into the y slot of the tangent vector. For a finite value of a, the tangent is (dx/dx, dy/dx) = (1, dy/dx) = (1, a).

Now, to think of this further...if a is infinite....the line is vertical, this is not a nice representation...a tangent value of (1, a) = (1, infinity) is not well defined or easy to use. In any case, you can make a nice tangent as (dx/dy, dy/dy)...basically put "dy" in the denominator instead of dx to get (1/a, 1)...and for infinite a, 1/a == 0, so tangent is (0, 1).

It is not a problem that in one case you have a "-a" and in the other case an "a". That is just due to you, basically, defining your function f slightly different for each form, which is fine.

I hope that helps!

##### Share on other sites
Oh, shame on me. That's obvious and intuitive that in the tangent vector the x-coordinate should be constant since we're making equal steps on the X-axis and Y is the one that changes. Thinking about finite differential values instead of derivates makes it even clearer! Thank you guys for help.

1. 1
Rutin
45
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 13
• 10
• 12
• 10
• ### Forum Statistics

• Total Topics
633001
• Total Posts
3009821
• ### Who's Online (See full list)

There are no registered users currently online

×