Find the distance between P(x1,y1) and Q(x2,y2) when (i)PQ is parallel to the y−axix.(ii) PQ is parallel to the x−axis.
It is given that P(x1,y1) and Q(x2,y2) are two points(i) PQ is parallel to the y−axis.∴x1=x2 (1)∴PQ=|√(x2−x1)2+(y2−y1)2|=|√(x2−x2)2+(y2−y1)2| [Using equation 1]=|√(y2−y1)|=|y2−y1|(ii)PQ is parallel to the x−axis.∴ y1=y2 (2)∴ PQ=|√(x2−x1)2+(y2−y1)2|=|√(x2−x1)2+(y2−y1)2| [Using equation 2]=|√(x2−x1)2|=|√(x2−x1)|∴PQ=|x2−x1|