# How to find the slope of a line that is kept at the same proportional distance to two others?

I have been given 4 points which create two separate lines. I have been given another point that falls inside the projection of these two lines. Now I have to draw a line through this point that maintains the same distance from the other lines (as a ratio), but I am having some difficulty working out the slope of this line.

The picture below shows the two lines in red. (1,4) and (3,6) form one line, and (2,1) and (4,2) form the other. The dashed line is where it LOOKS like the line passing through (3,5) should go if it was to be kept at the same proportional distance from the others. I want to know how to calculate the slope and length of it.

Can anyone offer some advice on where I could start on working this out?

The line you need must pass through the intersection point of the two (extended) red lines, i.e. through $(-6,-3)$.

Hence the slope of the line is: $${5-(-3)\over3-(-6)}={8\over9}.$$ Now you can find the intersections of this line with the other two sides of the quadrilateral, to compute the length of the segment.

• Yes this is just what I needed. The fact that the lines would all intersect at the same point is what I was missing in my approach. Thank you Commented Feb 26, 2018 at 2:32
• Notice. You are assuming distance is proportional from the point of intersection and not from the edges of quadrilateral. If you label the endpoints of the line segment where the intersect the sides of the quafirlateral as $A,B$. The proportion of $(2,1)$ - $A$ to $A$ -$(1,4)$ is not the same proportion as $(4,2)$ to $B$ -$(3,6)$. The question is ambiguously worded as to which points are used to measure between lines. You are assuming points corresponding from point of intersection (that makes the quadrilateral and line segments irrelevent). I assumed proportional to quadrilateral. Commented Feb 26, 2018 at 16:38
• To me "distance of a point from a line" can only mean "length of the perpendicular segment from the point to the line". With this interpretation my answer is correct. Commented Feb 26, 2018 at 17:05
• Then the quadrilateral has nothing to do with anything. You should point out the the points that coorispond to (3,5) on the two lines, are a point that is on the red segment on the top line but off and to the right of the red segment on the bottom line. Also if distance "can only mean" perpendicular, then "shows the two lines in red" can only mean entire lines and not segments. Commented Feb 26, 2018 at 17:19
• Also note, with your interpretation the dashed line is out of proportion and doesn't have steep enough slope. Commented Feb 26, 2018 at 17:25

Hint : The distance of a point $(h,k)$ from a line ${\rm L_1}=a_1x+b_1y+c=0$ is given by $$d_1 (h,k)= \frac{|a_1h+b_1k+c_1|}{\sqrt{a_1^2+b_1^2}}$$

What you want is, locus of points such that

$$d_1(h,k)= \lambda \cdot d_2(h,k)$$

Where ${\rm L_1}$ is line passing through $(1,4)$ and $(3,6)$ ; ${\rm L_2}$ is line passing through $(2,1)$ and $(4,2)$.

Bear with me.

Line one is $(y - 1) = \frac 12(x-2)$

Line two is $(y-4) = (x - 1)$

Now your line. The first point $(x, y) = (2,1) + k((1,4) - (2,1))$ the end point is $(x,y) = (4,2) + k((3,6) - (4,2))$ and the slope is $\frac 12 + k(1 - \frac 12)$ where $k$ is the propotion (somewhere between $0$ and $1$). Basical it is the values of the first line plus $k$ times the differences of the values of the two lines.

So first point is $(2 - k, 1 + 3k)$ and the slope is $\frac 12(1+k)$

So formulat for you line is $(y- 1-3k) = \frac 12(1+k)(x + 2+k)$

And it contains the point $(3,5)$.

So $(5 - 1 - 3k) = \frac 12(1+k) (3 + 2 + k)$

$4-3k = \frac 12 (1+k)(5 + k)$

$8 - 6k= 5 + 6k + k^2$ so

$k^2 + 12k +3 = 0$

$k = \frac {-12 \pm \sqrt {144 - 12}}2=$

$-6 + \sqrt{36 - 3}=-6+\sqrt{33}$

The the equation of the line is $(y-19-3\sqrt{33}) = \frac {-5+\sqrt{33}}2(x-4+\sqrt{33})$

• Thank you for this, I really appreciate the effort you have put into your answer, it is very helpful. I really wish I could pick two answers as correct Commented Feb 26, 2018 at 2:31
• @user88720 Note that this answer gives a different result than my answer. The reason is fleablood interpreted the prescription "maintains the same distance from the other lines (as a ratio)" as if this distance should be computed along the lines connecting the endpoints of the red lines. In my opinion that would make sense only if the two red lines had the same length, but that is not the case here. Commented Feb 26, 2018 at 8:30
• Not along the lines connecting the end points but proportionally along ANY lines connecting a point x% along line segment 1 is x% along line segment 2 and x% along line segment 2. No need to make them the same length. I'd claim your assumption "only makes sense" if line segments are equal distance from the point of intersection (which they aren't) and you are assuming the distance between the lines are along to perpendicular and that the endpoints, red segments, and quadralateral have nothing to do with anything. Commented Feb 26, 2018 at 16:24
• I assumed that there is a linear transformation $h$ where $h(0) =$ Line Segment 1, and $h(1) =$ Line segment 2. And $h(k) =$ the middle line segment. That's a pretty standard interpretation of proportion between line segments. And I think the one assumed by the problem. Your interpretation where the line segment hits the edges of the quadrilateral will not be proportional. Commented Feb 26, 2018 at 16:29
• I understand your interpretation, but don't agree with it, see also my comment in reply to yours, below my answer. Of course it may well be the OP intended "distance" your way, I'm not saying your answer is wrong: I just want to warn the OP about the difference. Commented Feb 26, 2018 at 17:11