Question
Mathematics Question on Slope of a line
Find the distance between P(x1,y1) and Q(x2,y2) when: (i) PQ is parallel to the y-axis, (ii) PQ is parallel to the x-axis
Answer
The given points are P(x1,y1) and Q(x2,y2).
(i) When PQ is parallel to the y-axis, x1 = x2.
In this case, distance between P and Q =(x2−x1)2+(y2−y1)2
=(y2−y1)2
=∣y2−y1∣
(ii) When PQ is parallel to the x-axis, y1 = y2.
In this case, distance between P and Q =(x2−x1)2+(y2−y1)2
=(x2−x1)2
=∣x2−x1∣