Position vectors, distance and dividing a line segment
A position vector locates a point relative to a fixed origin. This turns geometric questions about points, distances and line segments into vector calculations.
The central fact is simple but easy to reverse:
In words, the vector from to is end minus start.
Before you begin
Section titled “Before you begin”You should be able to:
- add, subtract and multiply vectors by scalars
- find a vector’s magnitude using Pythagoras’ theorem
- work confidently with fractions and ratios
- use coordinates in two and three dimensions
Review vector arithmetic or magnitude and direction if needed.
What is a position vector?
Section titled “What is a position vector?”Let be the origin and let have coordinates . The position vector of is the vector from to :
Position vectors are often represented by lower case bold letters:
So if and , then
\qquad \mathbf b=\begin{pmatrix}-1\\5\end{pmatrix}.$$ Coordinates describe a point; a position vector describes the displacement from the origin to that point. Their components have the same numbers, but the objects are conceptually different. In three dimensions, $P(2,-4,7)$ has position vector $$\overrightarrow{OP}=\begin{pmatrix}2\\-4\\7\end{pmatrix}.$$ ## The vector between two points Travelling from $O$ to $B$ directly has the same overall effect as travelling first from $O$ to $A$, then from $A$ to $B$: $$\overrightarrow{OB}=\overrightarrow{OA}+\overrightarrow{AB}.$$ Therefore $$\boxed{\overrightarrow{AB}=\overrightarrow{OB}-\overrightarrow{OA}=\mathbf b-\mathbf a.}$$ This derivation is safer than memorising an unexplained subtraction rule. ### Example 1: find a displacement vector Let $A(-2,4)$ and $B(5,1)$. Find $\overrightarrow{AB}$ and $\overrightarrow{BA}$. For $A$ to $B$, subtract the position vector of the start from that of the end: $$\overrightarrow{AB} =\begin{pmatrix}5\\1\end{pmatrix} -\begin{pmatrix}-2\\4\end{pmatrix} =\begin{pmatrix}7\\-3\end{pmatrix}.$$ Reversing the journey reverses every component: $$\overrightarrow{BA} =\begin{pmatrix}-2\\4\end{pmatrix} -\begin{pmatrix}5\\1\end{pmatrix} =\begin{pmatrix}-7\\3\end{pmatrix} =-\overrightarrow{AB}.$$ ### Example 2: an unknown endpoint Point $A$ has position vector $\begin{pmatrix}4\\-1\\2\end{pmatrix}$ and $$\overrightarrow{AB}=\begin{pmatrix}-3\\5\\4\end{pmatrix}.$$ Find the coordinates of $B$. Since $\overrightarrow{OB}=\overrightarrow{OA}+\overrightarrow{AB}$, $$\overrightarrow{OB} =\begin{pmatrix}4\\-1\\2\end{pmatrix} +\begin{pmatrix}-3\\5\\4\end{pmatrix} =\begin{pmatrix}1\\4\\6\end{pmatrix}.$$ Hence $\boxed{B(1,4,6)}$. :::caution[Direction matters] $\overrightarrow{AB}$ means from $A$ to $B$, so calculate $\mathbf b-\mathbf a$. A quick check is that $\mathbf a+\overrightarrow{AB}$ must equal $\mathbf b$. ::: ## Distance between two points Distance is the magnitude of the displacement vector: $$\boxed{AB=\left|\overrightarrow{AB}\right|=|\mathbf b-\mathbf a|.}$$ For $A(x_1,y_1)$ and $B(x_2,y_2)$, $$\boxed{AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.}$$ For $A(x_1,y_1,z_1)$ and $B(x_2,y_2,z_2)$, $$\boxed{AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}.}$$ The formula is Pythagoras' theorem applied to the perpendicular component changes. Unlike $\overrightarrow{AB}$, the distance $AB$ is a non-negative scalar and has no direction. ### Example 3: distance in three dimensions Find the distance between $P(-1,2,3)$ and $Q(3,-1,9)$. First find the displacement: $$\overrightarrow{PQ} =\begin{pmatrix}3-(-1)\\-1-2\\9-3\end{pmatrix} =\begin{pmatrix}4\\-3\\6\end{pmatrix}.$$ Then find its magnitude: $$PQ=\sqrt{4^2+(-3)^2+6^2} =\sqrt{16+9+36} =\boxed{\sqrt{61}}.$$ Do not simplify $\sqrt{61}$ to a decimal unless the question asks for an approximation. ## Midpoints If $M$ is the midpoint of $AB$, then it lies halfway from $A$ to $B$: $$\overrightarrow{OM} =\overrightarrow{OA}+\frac12\overrightarrow{AB} =\mathbf a+\frac12(\mathbf b-\mathbf a) =\boxed{\frac{\mathbf a+\mathbf b}{2}}.$$ Thus the midpoint is found by averaging corresponding coordinates. ### Example 4: midpoint and a missing endpoint $A$ has position vector $\mathbf a=\begin{pmatrix}-2\\5\end{pmatrix}$ and the midpoint $M$ of $AB$ has position vector $\mathbf m=\begin{pmatrix}4\\1\end{pmatrix}$. Find $\mathbf b$. Use $$\mathbf m=\frac{\mathbf a+\mathbf b}{2}.$$ Rearranging gives $\mathbf b=2\mathbf m-\mathbf a$, so $$\mathbf b =2\begin{pmatrix}4\\1\end{pmatrix} -\begin{pmatrix}-2\\5\end{pmatrix} =\begin{pmatrix}10\\-3\end{pmatrix}.$$ Check by averaging $(-2,5)$ and $(10,-3)$: the result is $(4,1)$. ## Dividing a line segment in a ratio Suppose $P$ divides $AB$ internally in the ratio $$AP:PB=m:n.$$ The whole segment contains $m+n$ equal parts, and $P$ is $m/(m+n)$ of the way from $A$ to $B$. Therefore $$\begin{aligned} \mathbf p &=\mathbf a+\frac{m}{m+n}(\mathbf b-\mathbf a)\\ &=\boxed{\frac{n\mathbf a+m\mathbf b}{m+n}}. \end{aligned}$$ Notice the apparently crossed coefficients: $\mathbf a$ is multiplied by $n$, while $\mathbf b$ is multiplied by $m$. The journey form $$\boxed{\mathbf p=\mathbf a+\frac{m}{m+n}(\mathbf b-\mathbf a)}$$ is often easier to reconstruct and less prone to errors. ### Example 5: internal division $A$ and $B$ have position vectors $$\mathbf a=\begin{pmatrix}1\\-2\end{pmatrix}, \qquad \mathbf b=\begin{pmatrix}11\\8\end{pmatrix}.$$ Point $P$ lies on $AB$ such that $AP:PB=2:3$. Find $\mathbf p$. $P$ is $2/(2+3)=2/5$ of the way from $A$ to $B$: $$\begin{aligned} \mathbf p &=\mathbf a+\frac25(\mathbf b-\mathbf a)\\ &=\begin{pmatrix}1\\-2\end{pmatrix} +\frac25\begin{pmatrix}10\\10\end{pmatrix}\\ &=\boxed{\begin{pmatrix}5\\2\end{pmatrix}}. \end{aligned}$$ Check the ratio: $$\overrightarrow{AP}=\begin{pmatrix}4\\4\end{pmatrix}, \qquad \overrightarrow{PB}=\begin{pmatrix}6\\6\end{pmatrix}.$$ Since $\overrightarrow{AP}=\frac23\overrightarrow{PB}$, their lengths are in the ratio $2:3$ and the directions agree. ### Example 6: find an endpoint from a ratio $P(4,7)$ divides $AB$ in the ratio $AP:PB=1:2$, and $A(-2,3)$. Find $B$. Here $$\mathbf p=\frac{2\mathbf a+\mathbf b}{3}.$$ Therefore $$\mathbf b=3\mathbf p-2\mathbf a =3\begin{pmatrix}4\\7\end{pmatrix} -2\begin{pmatrix}-2\\3\end{pmatrix} =\boxed{\begin{pmatrix}16\\15\end{pmatrix}}.$$ Indeed, $\overrightarrow{AP}=(6,4)$ and $\overrightarrow{PB}=(12,8)=2\overrightarrow{AP}$. ## Proving that points are collinear Points are **collinear** if they lie on one straight line. To prove that $A$, $B$ and $C$ are collinear, show that two displacement vectors from a common point are scalar multiples: $$\boxed{\overrightarrow{AC}=\lambda\overrightarrow{AB}}$$ for some real scalar $\lambda$. This establishes parallel direction. Because both vectors begin at $A$, it also establishes that $B$ and $C$ lie on the same line through $A$. ### Example 7: prove collinearity and determine order Let $$A(1,-1,2),\qquad B(3,2,0),\qquad C(7,8,-4).$$ Then $$\overrightarrow{AB} =\begin{pmatrix}2\\3\\-2\end{pmatrix}$$ and $$\overrightarrow{AC} =\begin{pmatrix}6\\9\\-6\end{pmatrix} =3\begin{pmatrix}2\\3\\-2\end{pmatrix} =3\overrightarrow{AB}.$$ Therefore $A$, $B$ and $C$ are collinear. Since the multiplier $3$ is greater than $1$, $B$ lies between $A$ and $C$. Also $AB:BC=1:2$ because $$\overrightarrow{BC}=\overrightarrow{AC}-\overrightarrow{AB}=2\overrightarrow{AB}.$$ A negative multiplier would place the two endpoints on opposite sides of the common point. Merely obtaining equal vector magnitudes is not enough: equal lengths do not prove equal or parallel directions. ### Example 8: determine an unknown coordinate Points $A(2,-1)$, $B(6,5)$ and $C(k,11)$ are collinear. Find $k$. Calculate vectors from $A$: $$\overrightarrow{AB}=\begin{pmatrix}4\\6\end{pmatrix}, \qquad \overrightarrow{AC}=\begin{pmatrix}k-2\\12\end{pmatrix}.$$ For collinearity, $\overrightarrow{AC}=\lambda\overrightarrow{AB}$. The second components give $$12=6\lambda\quad\Rightarrow\quad\lambda=2.$$ The first components then give $$k-2=2(4)=8,$$ so $\boxed{k=10}$. ## Common misconceptions - **Reversing the subtraction:** $\overrightarrow{AB}=\mathbf b-\mathbf a$, not $\mathbf a-\mathbf b$. - **Confusing a point with a vector:** write $A(2,3)$ but $\overrightarrow{OA}=\begin{pmatrix}2\\3\end{pmatrix}$. - **Confusing distance with displacement:** $AB$ is a scalar; $\overrightarrow{AB}$ is a vector. - **Using the wrong fraction in a ratio:** if $AP:PB=2:3$, then $P$ is $2/5$ of the way from $A$ to $B$, not $2/3$. - **Claiming collinearity from proportional lengths:** the vectors themselves must be scalar multiples, with all corresponding components in the same ratio. - **Rounding too early:** keep exact roots and fractions until the final line unless an approximation is required. ## Self-check 1. $A(-3,2)$ and $B(4,-6)$. Find $\overrightarrow{AB}$ and $AB$. 2. $P(1,-2,4)$ and $Q(5,1,-2)$. Find the midpoint of $PQ$. 3. $R$ divides $AB$ internally in the ratio $AR:RB=3:1$, where $\mathbf a=\begin{pmatrix}-2\\4\end{pmatrix}$ and $\mathbf b=\begin{pmatrix}6\\-8\end{pmatrix}$. Find $\mathbf r$. 4. Show that $A(-1,2)$, $B(2,8)$ and $C(4,12)$ are collinear. Which point lies between the other two? 5. Point $M(3,5)$ is the midpoint of $A(-4,1)$ and $B$. Find $B$. <details> <summary>Answers</summary> 1. $\overrightarrow{AB}=\begin{pmatrix}7\\-8\end{pmatrix}$ and $AB=\sqrt{7^2+(-8)^2}=\sqrt{113}$. 2. The midpoint is $\left(\frac{1+5}{2},\frac{-2+1}{2},\frac{4+(-2)}{2}\right)=\left(3,-\frac12,1\right)$. 3. $\mathbf r=\mathbf a+\frac34(\mathbf b-\mathbf a)=\begin{pmatrix}4\\-5\end{pmatrix}$. 4. $\overrightarrow{AB}=\begin{pmatrix}3\\6\end{pmatrix}$ and $\overrightarrow{AC}=\begin{pmatrix}5\\10\end{pmatrix}=\frac53\overrightarrow{AB}$, so the points are collinear. Since $1<5/3$, $B$ lies between $A$ and $C$. 5. $\mathbf b=2\mathbf m-\mathbf a=\begin{pmatrix}10\\9\end{pmatrix}$, so $B(10,9)$. </details> ## What to learn next You can now translate between points, position vectors and displacements, calculate distances, divide segments in a given ratio, and prove collinearity. Next, study [vectors in modelling](/learn/vectors/vector-modelling/) to use these ideas in geometric and physical contexts. For equations and intersections of coordinate lines, revisit [straight lines in coordinate geometry](/learn/coordinate-geometry/straight-lines/).