The given points are \\(\\mathrm{P}\\left(x_{1}, y_{1}\\right)_{\ ext { and }} \\mathrm{Q}\\left(x_{2}, y_{2}\\right)\\).
(i) When PQ is parallel to the y-axis, \\(x_{1}=x_{2}\\).
In this case, distance between P and Q
\\(\\begin{array}{l}{=\\sqrt{\\left(x_{2}-x_{1}\\right)^{2}+\\left(y_{2}-y_{1}\\right)^{2}}} \\\\ {=\\sqrt{\\left(y_{2}-y_{1}\\right)^{2}}} \\\\ {=\\left|y_{2}-y_{1}\\right|}\\end{array}\\)
(ii) When PQ is parallel to the x-axis, \\(\\mathrm{y}_{1}=\\mathrm{y}_{2}\\) .
In this case, distance between P and Q
\\(\\begin{array}{l}{=\\sqrt{\\left(x_{2}-x_{1}\\right)^{2}+\\left(y_{2}-y_{1}\\right)^{2}}} \\\\ {=\\sqrt{\\left(x_{2}-x_{1}\\right)^{2}}} \\\\ {=\\left|x_{2}-x_{1}\\right|}\\end{array}\\)