(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
= \(\sqrt{(x_2-x_1)^2+(y_1+y_1)^2}\)
⇒ |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
= \(\sqrt{(x_1-x_1)^2+(y_2+y_1)^2}\)
⇒ |y2 – y1|
Therefore the distance between A and B when AB is parallel to y - axis is |y2 – y1|