Math Vectors Vectors between two points

Vector between two points

A column vector connecting the initial point $P(p_1|p_2)$ and the terminal point $Q(q_1|q_2)$ can be determined as follows:

$\overrightarrow{PQ}=\begin{pmatrix}q_1-p_1\\q_2-p_2\end{pmatrix}$

And in three-dimensional space with $P(p_1|p_2|p_3)$ and $Q(q_1|q_2|q_3)$:

$\overrightarrow{PQ}=\begin{pmatrix}q_1-p_1\\q_2-p_2\\q_3-p_3\end{pmatrix}$
!

Note

The coordinates of the column vector between two points correspond to the coordinate differences of the terminal point and initial point.

Example

Vector $\overrightarrow{PQ}$ with $P(1|3)$ and $Q(4|1)$

$\overrightarrow{PQ}=\begin{pmatrix}4-1\\1-3\end{pmatrix}=\begin{pmatrix}3\\-2\end{pmatrix}$