# What is the distance between the point (0,1) and the line that passes through the points (1,2) and (-1,-2)?

*print*Print*list*Cite

### 2 Answers

You may evaluate the distance between from point `(x_0,y_0)` to a line `ax + by + c = 0` using the following formula, such that:

distance = `|ax_0 + by_0 + c|/(sqrt(a^2 + b^2))`

The problem provides two points that are on the line `ax + by + c = 0` , hence, you need to find `a,b,c` , such that:

`y - 2 = (-2 - 2)/(-1 - 1)(x - 1)`

`y - 2 = 2(x - 1) => 2x - y = 0 => a = 2, b = -1, c = 0`

distance `= |2*0 - 1*1 + 0|/(sqrt(2^2 + (-1)^2))`

distance =` |-1|/(sqrt 5) => distance = 1/sqrt 5`

Hence, evaluating the distance form point `(0,1)` to the line `2x - y =` 0, yields distance` = 1/sqrt 5.`

To calculate the distance from a point to a line, we need to know the coordinates of the point and the equation of the line. Therefore, we'll have to determine the equation of the line.

The equation of the line that passes through the given points is:

(x2 - x1)/(x - x1) = (y2 - y1)/(y - y1)

x1 = 1, y1 = 2

x2 = -1, y2 = -2

We'll replace x and y by the identified values and we'll get:

(-1-1)/(x-1) = (-2-2)/(y-2)

-2/(x-1) = -4/(y-2)

We'll divide by -2:

1/(x-1) = 2/(y-2)

We'll cross multiply:

2(x-1) = (y-2)

We'll remove the brackets and we'll have:

2x-2 = y-2

We'll subtract y-2 both sides:

2x - 2 - y + 2 = 0

We'll combine and eliminate like terms:

2x - y = 0

The equation of the line is:

2x - y = 0

We'll apply the formula for distance:

d = |2*xA - 1*yA + 0|/sqrt(2^2 + (-1)^2)

d = |2*0 - 1*1 + 0|/sqrt(4+1)

d = 1/sqrt5

d = sqrt5/5