# Given the points (1,2) and (3,4), calculate the distance from (0,0) to the line that passes through the points (1,2) and (3,4).

### 4 Answers | Add Yours

First we need to find the equation for the line passes through (1,2) and (3,4)

y-y1= m(x-x1)

m= (y2-y1)/(x2-x1) = (4-2)/(3-1) = 2/2 = 1

Then:

y-2= 1(x-1)

y= x-1 + 2

y= x+1

y-x-1=0

Now we need to find the distance between the line y-x-1=0 and the point (0,0)

d= l(ax+by + cl/sqrt(a^2 + b^2)

= 0+0 -1/sqrt(1+1) = l-1l/sqrt2 = 1/sqrt2= sqrt2/2

Then the distance is '2sqrt/2' units.

The equation of the line joining (x1, y1) and (x2,y2) is:

y-y1 = (y2-y1)/(x2-x1) . Given (x1,y1) = (1,2) and (x2,y2) = (3,4).

So the equation of the line joining (1,2) (3,4) is:

y-2 = (4-2)/((3-1) {x-1}

y-2 = (x-1)

0 = x-y-1+2

x-y+1 = 0.....................(1)

The distance d of the the point (x1, y1) from the line ax+bx+c is given by:

d = | |(ax1+by1+c)/sqrt(a^2+b^2)|

Therefore , the distance d of (0 , 0 ) from the line at (1) is:

d |( 1*00-1*0+1)/sqrt[1^2+(-1)^2] = 1/sqrt2.

The distance from the origin to the line that passes through the given points is the perpendicular to that line.

We have to determine the equation of the line that passes through the given points.

Because we know the coordinates of the points, we'll calculate the equation of the line in this way:

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

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

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

We'll divide by 2 both sides:

x-1 = y-2

The equation will become:

l: y-x-1=0

The distance between a point and a line is:

d(O,l)=|(-1*0+1*0-1)|/sqrt[(-1)^2+(1)^2]

**d(O,l) = |-1|/sqrt 2**

**d(O,l) = (sqrt 2)/2**

The equation of the line between (1,2) and (3,4) is

y-2={(4-2)/(3-1)}(x-1)=(x-1)

Now y-2=x-1 can be written in the form y=x+1.

The distance of a point (a,b) from a line y=mx+c is

|b-ma-c|/((m^2+1))^(1/2)

The distance of (0,0) from the line y=x+1 is:

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