2.5. Given points $A(1,2,-2)$ and $B(3,1,4)$. Find the coordinates of vectors $\overrightarrow{A B}$ and $\overline{B A}$: Find $|\overrightarrow{A B}|$ and $|\overrightarrow{B A}|$.
Solution. The coordinates of vectors $\overline{A B}$ and $\overrightarrow{B A}$ are found as the differences of the corresponding coordinates of the end and start points of the vectors, i.e., the differences of the corresponding coordinates of points $A$ and $B$. Thus, we have

$$
\overrightarrow{A B}=\{3-1,1-2,4-(-2)\}=\{2,-1,6\} \text {, i.e., } \overrightarrow{A B}=2 \vec{i}-\vec{j}+6 \vec{k}
$$

Obviously, the coordinates of the vector $\overrightarrow{B A}$ are opposite in sign to the coordinates of the vector $\overrightarrow{A B}$, i.e.,

$$
\overrightarrow{B A}=\{-2,1,-6\} \text { and } \overrightarrow{B A}=-2 \vec{i}+\vec{j}-6 \vec{k} .
$$

The length or modulus of the vector $\overrightarrow{A B}$ is found using formula (2.27). Substituting the coordinates of the vector $\overrightarrow{A B}$ into formula (2.27), we get:

$$
|\overrightarrow{A B}|=\sqrt{(2)^{2}+(-1)^{2}+(6)^{2}}=\sqrt{4+1+36}=\sqrt{41}
$$

Obviously, $|\overrightarrow{A B}|=|\overrightarrow{B A}|=\sqrt{41}$.