Subsection 1.1.2 Distance between two points
Let \(\vec{a}\) and \(\vec{b}\) are the position vectors of two points A and B, as shown in Figure 1.1.2.(b), whose coordinates are given as \((x_{1}, y_{1}, z_{1})\) and \((x_{2}, y_{2}, z_{2}),\) respectively then \(\vec{a} = (x_{1}\hat{i}, y_{1}\hat{j}, z_{1}\hat{k})\) and \(\vec{b} = (x_{2}\hat{i}, y_{2}\hat{j}, z_{2}\hat{k})\text{.}\) From Figure 1.1.2.(b), \(\vec{OA}+ \vec{AB} = \vec{OB}\)
\begin{equation*}
\therefore \quad \vec{AB} = \vec{OB} - \vec{OA} = \vec{b} - \vec{a} = (x_{2}-x_{1})\hat{i}
+ (y_{2}-y_{1})\hat{j} + (z_{2}-z_{1})\hat{k}
\end{equation*}
\begin{equation*}
\text{hence,}\quad AB = \vert\vec{AB}\vert = \sqrt{[(x_{2}-x_{1})^{2} +(y_{2}-y_{1})^{2}+(z_{2}-z_{1})^{2}]}
\end{equation*}