Determine a distance from origin of x axis to the line that
Determine a distance from origin of x axis to the line that passes through the points (1;1) and (2;3).
Solution
To calculate the distance from the origin (0,0) to the line taht passes through the given points, we\'ll have to determine first the equation of the line.
The equation of the line that passes through the points is:
(x2 - x1)/(x - x1) = (y2 - y1)/(y - y1)
x1 = 1, y1 = 1
x2 = 2, y2 = 3
We\'ll substitute the values and we\'ll get:
(2-1)/(x-1) = (3-1)/(y-1)
1/(x-1) = 2/(y-1)
We\'ll cross multiply:
2(x-1) = y-1
We\'ll remove the brackets and we\'ll have:
2x - 2 = y - 1
We\'ll subtract y - 1:
2x - 2 - y + 1 = 0
We\'ll combine like terms:
2x - y - 1 = 0
Now, we\'ll write the formula for distance:
d = |2*xO - 1*yO + 1|/sqrt(2^2 + (-1)^2)
d = |2*0 - 1*0 + 1|/sqrt(4+1)
d = 1/sqrt5
d = sqrt5/5
