# line formulas . point on a line with slope of 0

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

## Recommended Posts

ok, to find if a point is on a line with a slope, i just plug the point into this formula: y - y1 = m (x - x1) what if the slope is 0??? also , if the point is not on the line, or is across the line, what value will be returned?

##### Share on other sites
If your line has a slope of 0, it means it is parallel to the x-axis.

So if y matches y1, the point is on the line, no matter what x is.

y - y1 - m * (x - x1) = r

If r is zero, the point is on the line, otherwise it is not.

Edit:

You may choose to write your line equation in vector form.

If you have a normal vector n perpendicular to the line, then you can calculate

<n, x-p> = s

where <.,.> is the dot product, p a point on the line and x the point to test.

If s = 0, then x is on the line.

You can obtain n from m as:

n = (-m, +1/m)

##### Share on other sites
if the slope is 0 then you just compare y values.

if y = y1 then the point is on the line

##### Share on other sites
As AP mentioned, just compare the y values, if the state is true (that is, if the values are equal to eachother) then the point is on the line, else - it is not.

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

• 9
• 19
• 9
• 31
• 16
• ### Forum Statistics

• Total Topics
632617
• Total Posts
3007459

×