Key points to solve the problem:
• Idea of distance formula- Distance between two points A(x1,y1) and B(x2,y2) is given by- AB = \(\sqrt{x_2 - x_1)^2 + (y_2 - y_1)^2}\)
Given, P(x1, y1) and Q(x2, y2) are two points.
i) When PQ is parallel to y-axis This implies that x – coordinate is constant
⇒ x2 = x1
∴ from distance formula:
PQ = \(\sqrt{(x_2 - x_1)^2 + (y_2-y_1)^2}\) = \(\sqrt{0 + (y_2 + y_1)^2}\) = |y2 - y1|
ii) When PQ is parallel to x-axis This implies that y – coordinate is constant
⇒ y2 = y1
∴ from distance formula:
PQ = \(\sqrt{(x_2 - x_1)^2 + (y_2-y_1)^2}\) =\(\sqrt{0 + (x_2 + x_1)^2}\) = |x2 - x1|
Note: we take modulus because square root gives both positive and negative values but distance is always positive so we make it positive using modulus function.