Distance between two points

Before we discuss the procedure of finding the distance between points, we shall first throw some light on the position of two points with respect to a given line. These concepts lay the foundation for various other concepts and hence are extremely useful for attempting numerical.

Consider a point (x1, y1) and a line ax + by + c = 0. Then, if ax1 + by1+ c is of the same sign as ‘c’, then the point (x1, y1) lie on the same origin side of ax + by + c = 0 . Conversely, if the sign of c and ax1 + by1+ c is opposite, then the point (x1, y1) will lie on the non-origin side of ax + by + c = 0.

Let the line be ax + by + c = 0 and P(x1, y1), Q(x2, y2) be two points. Then, we have two cases:

Case 1:

If P(x1, y1) and Q(x2, y2) are on the opposite sides of the line ax + by + c = 0, then the point R on the line ax + by + c = 0 divides the line PQ internally in the ratio m1 : m2, where m1/m2 must be positive.

If ax1 + by1 + c and ax2 + by2 + c have the same signs then m1/m2 = –ve, so that the point R on the line ax + by + c = 0 will divide the line PQ externally in the ratio m1 : m2 and the points P(x1, y1) and Q(x2, y2) are on the same side of the line ax + by + c = 0.

Illustration:

Find the range of θ in the interval (0, π) such that the points (3, 5) and (sin θ, cos θ) lie on the same side of the line x + y – 1 = 0.

Solution:

As discussed above, we know that ax1 + by1 + c and ax2 + by2 + c both must be of the same signs for the points to be on the same side of the line.

Now, 3 + 5 – 1 = 7 > 0 ⇒ sin θ + cos θ – 1 > 0

⇒ sin(π/4 + θ) > 1/√2

⇒ π/4 < π/4 + θ < 3π/4

⇒ 0 < θ < π/2.

Hence, this is the required range of θ in the interval (0, π) such that the points (3, 5) and (sin θ, cos θ) lie on the same side of the line x + y – 1 = 0.

Illustration:

Two fixed points A and B are taken on the co-ordinate axes such that OA = a and OB = b. Two variable points A’ and B’ are taken on the same axes such that OA’ + OB’ = OA + OB. Find the locus of the point of intersection of AB’ and A’B.

Solution:

Let A ≡ (a, 0), B (0, b), A’ ≡ (a’, 0), B’ ≡ (0, b’).

Equation of A’B is x/a' + y/b' = 1. …. (1)

and equation of AB’ is x/a + y/b' = 1. …. (2)

Subtracting (1) from (2), we get, x (1/a – 1/a') + y(1/b' – 1/b) = 0.

⇒ x(a'–a)/aa' + y(b–b')/bb' = 0. [Using a’ – a = b – b’]

⇒ x/a(b–b'+a) + y/bb' = 0

⇒ b’ = a(a+b)y/ay–bx. ….. (3)

From (2), b’x + ay = ab’ ….. (4) we get x + y = a + b which is the required locus.

The distance between two points P(x1, y1) and Q(x2, y2) is (see the figure given below).

Length PQ = √(x2 – x1)2 + (y2 – y1)2

Proof:

Let P(x1, y1) and Q(x2, y2) be the two points and let the distance between them be ‘d’. Draw PA, QR parallel to y-axis and PR parallel to x-axis.

Angle QRP = 90o

⇒ d2 = PR2 + RQ2

⇒ d2 = (x2 – x1)2 + (y2 – y1)2

⇒ d = √(x2 – x1)2 + (y2 – y1)2.

You may also view the video on distance formula

Similarly, in three dimensions, we shall have a third coordinate and the formula in that case changes a bit: