Find the distance between the points A(x1, y1) and B(x2, y2), when

(i) AB is parallel to the x-axis


(ii) AB is parallel to the y-axis.


(i) Given: AB is parallel to the x-axis.


When AB is parallel to the x-axis, the y co-ordinate of A and B will be the same.


i.e., y1 = y2


Distance


|x2 – x1|


Therefore the distance between A and B when AB is parallel to x-axis is |x2 – x1|


(ii) Given: AB is parallel to the y-axis.


When AB is parallel to the y-axis, the x co-ordinate of A and B will be the same.


i.e., x2 = x1


Distance


|y2 – y1|


Therefore the distance between A and B when AB is parallel to y-axis is |y2 – y1|


1