Determine if a point lies between two parallel lines

7.7k Views Asked by At

Let's say I'm given the equations of two parallel lines, and an arbitrary point. What is the method I should use to check if that point lies in between the parallel lines?

For example, let's say I have two equations and a point A: $$2x+3y=7$$ $$2x+3y=12$$ $$A (3, -5)$$ How do I check if $A$ lies in between the two lines?

3

There are 3 best solutions below

4
On BEST ANSWER

The equations $2x+3y=a$ for $7<a<12$ lie between the lines. The point $(3,-5)$ gives $a=-9$ so it does not lie between the lines.

0
On

For a line defined in form as $Ax+By=C$. You can rewrite it to be $y=-\frac{A}{B}x+\frac{C}{B}$. Then you can substitute in your x-coordinate and compute $y$ in equation.

Say for you have $y_1, y_2$ computed from the equation and $y_p$ from point, verify that $y_p \in (y_1,y_2)$ (suppose $y_1<y_2$ or you reverse it) then you get the result. This is basically a more geometrical solution with the same idea of Rene.

0
On

Assuming that you are dealing with two dimensions, every line divides the $x-y$ plane into two half-planes. Let the equation of the line be $y=f(x)$. Then, for all points on one half plane, we will have $y\gt f(x)$ and in the other, $y\lt f(x)$.

Let the parallel lines be $y=f(x)$ and $y=f(x)+c$, where $c\ne0$. They divide the plane into three regions. Assume here that $c\gt0$. Each will be demarcated by whether $y\lt f(x)$, $f(x)\lt y\lt f(x)+c$, and $y\gt f(x)+c$. The region between the lines is given by $f(x)\lt y\lt f(x)+c$.

Let $g(x)=f(x)+c$. In general, this gives a condition that $y\gt f(x)$ anf $y\lt g(x)$ where $f(x)$ and $g(x)$ are the equations of the two parallel lines.

Thus, to check for a given point, just plug in the values of $x$ and $y$ for that point into the equations. The directions of the inequalities should be different.