Calculate the distance from the point (3,5) to the line y = x + 4.
The shortest distance is measured along the line which contains the point and is perpendicular to the original line. Since it is perpendicular it has a slope, m = -1, we can substitute this slope and the point (3,5) into y = mx+b to find the general equation of the line.
5 = -1(3) + b
8 = b
So the equation of the line is y = -x + 8.
Now we find the intersection of the two lines. Sub y = -x + 8 into y = x + 4 and solve for the x coordinate of the intersection point.
-x + 8 = x + 4
4 = 2x
x = 2
Back substitute to find the y coordinate, sub x = 2 into y = x + 4
y = 2 + 4
y = 6
The point of intersection is (2, 6).
Now we need to find the length of the line segment from (2,6) to the original point (3, 5)
D = sqrt [ (x1 - x2)^2 + (y1 - y2)^2 ]
D = sqrt [ (2 - 3)^2 + (6 - 5)^2 ]
D = sqrt [ 1 + 1 ]
D = sqrt [2]
D is approximately 1.4 units