Let P be the point (p,q) and L the line y = m x + b. It is not necessary, but if you like you may assume that P lies below the line L. All your answers below should be algebraic expressions in terms of m, b, p and q. The slope of L is . The slope of a line perpendicular to L is . The line through P perpendicular to L can be written as y = s x + c where s is and c is: . That line intersects L in the point Q = (u,v), where u is: and v is: . The distance of P and Q is .
To find the slope of a line perpendicular to L, we can use the fact that the product of the slopes of two perpendicular lines is -1.
The slope of L is given as m. So, the slope of a line perpendicular to L would be the negative reciprocal of m. Therefore, the slope of the line through P perpendicular to L, denoted as s, is -1/m.
The equation of the line through P perpendicular to L can be written in the form y = s x + c, where s is -1/m.
Therefore, the equation of the line through P perpendicular to L is y = (-1/m) x + c.
To find the value of c, we can substitute the coordinates of point P (p, q) into the equation.
q = (-1/m)(p) + c
Now, we can solve this equation for c.
c = q + (1/m)p
So, the equation of the line through P perpendicular to L is y = (-1/m) x + (q + (1/m)p).
Now, we need to find the point of intersection between this line and L.
Substitute the equation of the line through P perpendicular to L into the equation of L:
(-1/m) x + (q + (1/m)p) = m x + b
Now, solve for x:
(-1/m) x - m x = -((1/m)p + q) - b
Combine the x terms:
(-(1/m) - m) x = -((1/m)p + q) - b
Simplify the right side:
(-(1/m) - m) x = -(p/m + q) - b
Divide both sides by (-(1/m) - m):
x = -((p/m + q) + b) / (-(1/m) - m)
Simplify the right side by multiplying the numerator and denominator by (-m):
x = -(-m(p/m + q) + -mb) / (1 - m^2)
x = (mp + mq + mb) / (1 - m^2)
So, the x-coordinate of the point of intersection Q is u = (mp + mq + mb) / (1 - m^2).
To find the y-coordinate of Q, substitute the value of x into the equation of L:
y = m x + b
y = m((mp + mq + mb) / (1 - m^2)) + b
Simplify:
y = (mmp + mmq + mmb + (1 - m^2)b) / (1 - m^2)
y = (mmp + (1 - m^2)b) / (1 - m^2)
So, the y-coordinate of Q is v = (mmp + (1 - m^2)b) / (1 - m^2).
Finally, to find the distance between P and Q, we can use the distance formula:
Distance = sqrt((u - p)^2 + (v - q)^2)
Substitute the values of u, v, p, and q:
Distance = sqrt((((mp + mq + mb) / (1 - m^2)) - p)^2 + (((mmp + (1 - m^2)b) / (1 - m^2)) - q)^2)
Simplify and factor:
Distance = sqrt(((mp + mq + mb - p(1 - m^2)) / (1 - m^2))^2 + (((mmp + (1 - m^2)b) - q(1 - m^2)) / (1 - m^2))^2)
Simplify further:
Distance = sqrt(((mmp + mb + mp - pm^2) / (1 - m^2))^2 + (((mmq + b - qm^2) / (1 - m^2))^2)
Therefore, the distance between P and Q is sqrt(((mmp + mb + mp - pm^2) / (1 - m^2))^2 + (((mmq + b - qm^2) / (1 - m^2))^2).