Vector joining two points

Give a GPS app the coordinates of two towns and it instantly draws an arrow from one to the other — direction, distance, everything. That arrow is a vector, and there is one clean rule for building it: subtract the tail's position vector from the head's. If AA and BB are points with position vectors a⃗\vec a and b⃗\vec b from a common origin OO, then AB→=b⃗−a⃗\overrightarrow{AB} = \vec b - \vec a. This single line is the workhorse of the Vector Algebra chapter. It is the first move on almost every coordinate-based vector question — finding a displacement, a distance, a direction, or checking whether three points sit on one straight line. It also quietly sets up two topics still to come: the section formula (which scales and adds this very vector) and direction ratios in Three-Dimensional Geometry (which are just its components). This article derives the rule from the triangle law and works two exam-style examples — a distance calculation and a collinearity proof.

The core insight

The vector from point AA to point BB is always head minus tail: AB→=b⃗−a⃗\overrightarrow{AB} = \vec b - \vec a, built from position vectors measured from one common origin.

The core idea

From a picture to a formula. Draw the triangle formed by OO, AA, and BB. Walking from OO to AA and then from AA to BB lands you at the same place as walking directly from OO to BB — that is the triangle law of vector addition, and it is the entire proof, stated in the derivation block below.

In coordinates. If A(x1,y1,z1)A(x_1,y_1,z_1) and B(x2,y2,z2)B(x_2,y_2,z_2), the rule becomes purely arithmetic: subtract corresponding coordinates.

AB→=(x2−x1)i^+(y2−y1)j^+(z2−z1)k^\overrightarrow{AB} = (x_2-x_1)\hat i + (y_2-y_1)\hat j + (z_2-z_1)\hat k

where: (x1,y1,z1)(x_1,y_1,z_1) is the tail point AA, (x2,y2,z2)(x_2,y_2,z_2) is the head point BB, and i^,j^,k^\hat i, \hat j, \hat k are the unit vectors along the axes.

Length and direction. The magnitude of this vector is the straight-line distance ABAB, and its coefficients are direction ratios of the line through AA and BB — divide each by the magnitude to get direction cosines. This single computation therefore answers three different-sounding exam questions at once: "find the vector," "find the distance," and "find the direction ratios of the line."

∣AB→∣=(x2−x1)2+(y2−y1)2+(z2−z1)2|\overrightarrow{AB}| = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}

where: the right side is the 3D distance formula applied to AA and BB.

Reversing the trip. Swapping which point is the tail flips the sign: BA→=a⃗−b⃗=−AB→\overrightarrow{BA} = \vec a - \vec b = -\overrightarrow{AB}. Same line, same length, opposite arrow.

Why the origin never shows up in the answer. It is worth pausing on this, because it looks strange at first: a⃗\vec a and b⃗\vec b both depend on where OO is placed, yet b⃗−a⃗\vec b - \vec a does not. Move the origin anywhere you like and both position vectors shift by exactly the same amount, so that shift cancels in the subtraction. This is precisely why AB→\overrightarrow{AB} is a genuine geometric property of the two points AA and BB alone — a physical arrow you could draw on paper without ever mentioning an origin — even though computing it algebraically happens to route through one.

Figure
A triangle O A B with vectors OA and OB from the origin and vector AB from A to B equal to OB minus OA
Triangle law gives AB = b minus a O A (a) B (b) OA = a OB = b AB = b - a
Derivation AAB equals b minus a

Starting from the triangle law of vector addition applied to triangle OABOAB and the definitions a⃗=OA→\vec a = \overrightarrow{OA}, b⃗=OB→\vec b = \overrightarrow{OB}, derive the formula for the vector AB→\overrightarrow{AB} joining tail point AA to head point BB, showing that it equals the head's position vector minus the tail's position vector regardless of where the two points actually sit in space.

Step 1. Walking from OO to AA and then from AA to BB reaches the same final point as walking directly from OO to BB. The triangle law of addition states this algebraically:

OA→+AB→=OB→.\overrightarrow{OA} + \overrightarrow{AB} = \overrightarrow{OB}.

Step 2. Substitute the given position vectors OA→=a⃗\overrightarrow{OA} = \vec a and OB→=b⃗\overrightarrow{OB} = \vec b:

a⃗+AB→=b⃗.\vec a + \overrightarrow{AB} = \vec b.

Step 3. Isolate AB→\overrightarrow{AB} by subtracting a⃗\vec a from both sides:

AB→=b⃗−a⃗.\overrightarrow{AB} = \vec b - \vec a.

Step 4. This holds for any origin OO and any two points, provided a⃗\vec a and b⃗\vec b are measured from that same origin — the origin itself cancels out of the answer, which is why AB→\overrightarrow{AB} depends only on AA and BB, not on where OO was chosen.

Worked example

Find the vector PQ→\overrightarrow{PQ}, the distance PQPQ, and the unit vector along PQ→\overrightarrow{PQ}, where P(1,−2,3)P(1,-2,3) and Q(4,0,−1)Q(4,0,-1).

Step 1. Apply the rule — head QQ minus tail PP, coordinate by coordinate.

PQ→=(4−1)i^+(0−(−2))j^+(−1−3)k^=3i^+2j^−4k^.\overrightarrow{PQ} = (4-1)\hat i + (0-(-2))\hat j + (-1-3)\hat k = 3\hat i + 2\hat j - 4\hat k.

Step 2. Find the magnitude, which is the distance PQPQ.

∣PQ→∣=32+22+(−4)2=9+4+16=29.|\overrightarrow{PQ}| = \sqrt{3^2+2^2+(-4)^2} = \sqrt{9+4+16} = \sqrt{29}.

Step 3. Divide the vector by its own magnitude to get the unit vector along PQ→\overrightarrow{PQ}.

PQ^=129(3i^+2j^−4k^).\hat{PQ} = \frac{1}{\sqrt{29}}\left(3\hat i+2\hat j-4\hat k\right).

So PQ→=3i^+2j^−4k^\overrightarrow{PQ} = 3\hat i+2\hat j-4\hat k, the distance is 29\sqrt{29} units, and the direction ratios of line PQPQ are 3,2,−43, 2, -4. Final answer: PQ→=3i^+2j^−4k^\overrightarrow{PQ}=3\hat i+2\hat j-4\hat k, PQ=29PQ=\sqrt{29}.

Competitive stretch

If AA, BB, CC have position vectors a⃗=i^+2j^+3k^\vec a = \hat i + 2\hat j + 3\hat k, b⃗=3i^+4j^+7k^\vec b = 3\hat i + 4\hat j + 7\hat k, c⃗=−3i^−2j^−5k^\vec c = -3\hat i - 2\hat j - 5\hat k, show they are collinear.

Step 1. Compute AB→=b⃗−a⃗=2i^+2j^+4k^\overrightarrow{AB} = \vec b-\vec a = 2\hat i+2\hat j+4\hat k.

Step 2. Compute AC→=c⃗−a⃗=−4i^−4j^−8k^\overrightarrow{AC} = \vec c-\vec a = -4\hat i-4\hat j-8\hat k.

Step 3. Check proportionality: AC→=−2(2i^+2j^+4k^)=−2 AB→\overrightarrow{AC} = -2\left(2\hat i+2\hat j+4\hat k\right) = -2\,\overrightarrow{AB}. Since AC→\overrightarrow{AC} is a scalar multiple of AB→\overrightarrow{AB} and they share the common point AA, the points A,B,CA, B, C lie on one straight line — collinear.

Common traps

  • Wrong subtraction order. AB→=b⃗−a⃗\overrightarrow{AB}=\vec b-\vec a is always head minus tail; swapping the order silently gives BA→\overrightarrow{BA}, the negative of what was asked.
  • Mixing origins. The formula only works when a⃗\vec a and b⃗\vec b are both measured from the same fixed origin OO; using position vectors quoted from different reference points gives a meaningless result.
  • Picking unrelated vector pairs for a collinearity proof. You must use two vectors that share a common point, like AB→\overrightarrow{AB} and AC→\overrightarrow{AC}, and show they are parallel — not any two of AB→\overrightarrow{AB}, BC→\overrightarrow{BC}, CA→\overrightarrow{CA} chosen at random without checking the shared vertex.
  • Stopping at "parallel" instead of "collinear," and reading direction ratios off the wrong vector. Proportional vectors alone prove the lines are parallel; only a shared point (such as AA in both AB→\overrightarrow{AB} and AC→\overrightarrow{AC}) upgrades that to "the points lie on the same line." Similarly, the direction ratios of line ABAB come from the coordinate differences in AB→\overrightarrow{AB} itself, not from the coordinates of one endpoint quoted alone.

Ask the tutor: Want to see why AB→=b⃗−a⃗\overrightarrow{AB}=\vec b-\vec a feeds directly into the section formula, or try the collinearity proof with a fresh set of points?

Why is it b minus a and not a minus b

Because AB→\overrightarrow{AB} is defined to start at AA and end at BB — it represents the displacement needed to travel from AA to BB. The triangle law OA→+AB→=OB→\overrightarrow{OA}+\overrightarrow{AB}=\overrightarrow{OB} forces AB→=b⃗−a⃗\overrightarrow{AB}=\vec b-\vec a, head's position vector minus tail's. If you instead wanted the vector from BB to AA, you would compute a⃗−b⃗\vec a - \vec b, which is just the negative — same length, opposite direction.

Does the origin O affect the answer

No, and that is the useful part. Even though a⃗\vec a and b⃗\vec b individually depend on where you place OO, their difference b⃗−a⃗\vec b - \vec a does not: moving OO shifts both position vectors by the same amount, and that shift cancels out in the subtraction. The one requirement is that a⃗\vec a and b⃗\vec b must be measured from the same origin — mixing origins breaks the formula.

How is this different from finding the midpoint or a point dividing AB in a ratio, and does the formula change in 2D

This rule only gives the connecting vector and its length — it does not locate any new point. But it is the building block for those questions: once you know AB→=b⃗−a⃗\overrightarrow{AB}=\vec b-\vec a, the midpoint's position vector is a⃗+12AB→=a⃗+b⃗2\vec a + \tfrac12\overrightarrow{AB} = \tfrac{\vec a+\vec b}{2}, and the general section formula scales AB→\overrightarrow{AB} by the given ratio before adding it to a⃗\vec a — the very next topic. The same rule works unchanged in a plane: for A(x1,y1)A(x_1,y_1) and B(x2,y2)B(x_2,y_2), just drop the zz term, giving AB→=(x2−x1)i^+(y2−y1)j^\overrightarrow{AB}=(x_2-x_1)\hat i+(y_2-y_1)\hat j, since the triangle-law derivation never depended on the number of dimensions.

Before this

Where this leads