Tutorials › Calculus III › Deriving a Vector from Two Endpoints

Vector Components and Operations · Tutorial 28 of 999

Deriving a Vector from Two Endpoints

Derive and apply the coordinate formula for the directed vector from one point in three-dimensional space to another.

Beginner 9 min read

What You'll Learn

  • Identify the starting point and ending point in a directed vector.
  • Derive the coordinate differences from the signed changes along the three axes.
  • Calculate a directed vector by subtracting starting coordinates from ending coordinates.
  • Keep coordinate order and vector direction consistent.
  • Check a result by confirming each coordinate change reaches the stated endpoint.

From Two Points to a Directed Vector

A directed vector from \(P\) to \(Q\) records the change needed to go from the starting point \(P\) to the ending point \(Q\). Its components therefore depend on both endpoints and on their order: changing the start or end changes the coordinate differences.

When the endpoints are given in three-dimensional coordinates, the component calculation is systematic. For each coordinate, subtract the starting value from the ending value. This tutorial derives that rule and explains how to apply and check it.

Definition: If \(P=(x_P,y_P,z_P)\) and \(Q=(x_Q,y_Q,z_Q)\) are points in three-dimensional space, the directed vector from \(P\) to \(Q\), written \(\overrightarrow{PQ}\), has components $$ \overrightarrow{PQ} = \langle x_Q-x_P,\;y_Q-y_P,\;z_Q-z_P\rangle. $$ The coordinates of the ending point are written first in each subtraction, and the coordinates of the starting point are written second.

Why the Formula Uses Ending Minus Starting

A vector component describes a signed change along one coordinate axis. For the \(x\)-coordinate, the change starts at \(x_P\) and finishes at \(x_Q\). A change is the final value minus the initial value, so the \(x\)-component is \(x_Q-x_P\). The same reasoning applies independently to the \(y\)- and \(z\)-coordinates.

In particular, a positive component means that coordinate increases as we go from \(P\) to \(Q\); a negative component means it decreases. A zero component means that the coordinate has the same value at both endpoints. These signs are part of the direction information, not errors to be removed.

$$ \begin{aligned} \text{\(x\)-change} &= \text{ending \(x\)-coordinate}-\text{starting \(x\)-coordinate} = x_Q-x_P,\\ \text{\(y\)-change} &= \text{ending \(y\)-coordinate}-\text{starting \(y\)-coordinate} = y_Q-y_P,\\ \text{\(z\)-change} &= \text{ending \(z\)-coordinate}-\text{starting \(z\)-coordinate} = z_Q-z_P. \end{aligned} $$

The three changes, in \(x,y,z\) order, are precisely the three components of the directed vector. This derives the formula directly from the meaning of a component as a signed coordinate change.

Key rule: For \(\overrightarrow{PQ}\), subtract the coordinates of \(P\) from the corresponding coordinates of \(Q\): $$ \overrightarrow{PQ} = \langle \text{\(Q\)'s \(x\)}-\text{\(P\)'s \(x\)},\; \text{\(Q\)'s \(y\)}-\text{\(P\)'s \(y\)},\; \text{\(Q\)'s \(z\)}-\text{\(P\)'s \(z\)}\rangle. $$

A Reliable Calculation Procedure

The main risks are reversing the subtraction and pairing coordinates from different axes. A short, fixed procedure helps avoid both.

1
Read the direction.
In \(\overrightarrow{PQ}\), \(P\) is the start and \(Q\) is the end.
2
Write matching coordinates.
Place the \(x\)-coordinates together, then the \(y\)-coordinates, then the \(z\)-coordinates.
3
Subtract start from end.
Compute \(x_Q-x_P\), \(y_Q-y_P\), and \(z_Q-z_P\), keeping signs.
4
Check each coordinate change.
Starting at each coordinate of \(P\), apply the calculated signed change and confirm that the corresponding coordinate of \(Q\) results.

Worked Examples

Worked Example: Finding a Vector with Positive and Negative Changes

Let \(P=(1,2,3)\) and \(Q=(5,-1,7)\). Find \(\overrightarrow{PQ}\).

The starting coordinates are \(x_P=1\), \(y_P=2\), and \(z_P=3\). The ending coordinates are \(x_Q=5\), \(y_Q=-1\), and \(z_Q=7\). Subtract the starting value from the ending value in each coordinate:

$$ \begin{aligned} x\text{-component} &= x_Q-x_P=5-1=4,\\ y\text{-component} &= y_Q-y_P=-1-2=-3,\\ z\text{-component} &= z_Q-z_P=7-3=4. \end{aligned} $$

Therefore,

$$ \overrightarrow{PQ}=\langle 4,-3,4\rangle. $$

Check: For the \(x\)-coordinate, \(1+4=5\). For the \(y\)-coordinate, \(2+(-3)=-1\). For the \(z\)-coordinate, \(3+4=7\). Each change takes the corresponding starting coordinate to the stated ending coordinate, so the components are consistent with \(P\) to \(Q\).

Worked Example: Subtracting Negative and Positive Coordinates

Let \(P=(-2,4,1)\) and \(Q=(3,0,-5)\). Find \(\overrightarrow{PQ}\).

Keep each coordinate in its own position. The \(x\)-component is \(3-(-2)\), the \(y\)-component is \(0-4\), and the \(z\)-component is \(-5-1\). Evaluate each subtraction:

$$ \begin{aligned} x\text{-component} &= 3-(-2)=3+2=5,\\ y\text{-component} &= 0-4=-4,\\ z\text{-component} &= -5-1=-6. \end{aligned} $$

Thus,

$$ \overrightarrow{PQ}=\langle 5,-4,-6\rangle. $$

Check: In the \(x\)-coordinate, \(-2+5=3\). In the \(y\)-coordinate, \(4+(-4)=0\). In the \(z\)-coordinate, \(1+(-6)=-5\). The three resulting coordinates are exactly those of \(Q\).

Worked Example: A Vector with Fractional Endpoint Coordinates

Let \(P=(\frac12,-\frac32,2)\) and \(Q=(-\frac32,\frac12,-1)\). Find \(\overrightarrow{PQ}\).

Subtract the corresponding coordinates of \(P\) from those of \(Q\). For the first component, subtracting \(\frac12\) from \(-\frac32\) gives \(-\frac32-\frac12=-\frac42=-2\). For the second component, \(\frac12-(-\frac32)=\frac12+\frac32=\frac42=2\). For the third, \(-1-2=-3\).

$$ \begin{aligned} x\text{-component} &= -\frac32-\frac12=-2,\\ y\text{-component} &= \frac12-\left(-\frac32\right)=2,\\ z\text{-component} &= -1-2=-3. \end{aligned} $$

Therefore,

$$ \overrightarrow{PQ}=\langle -2,2,-3\rangle. $$

Check: \(\frac12+(-2)=\frac12-\frac42=-\frac32\), which is \(Q\)'s \(x\)-coordinate. Also, \(-\frac32+2=-\frac32+\frac42=\frac12\), which is \(Q\)'s \(y\)-coordinate. Finally, \(2+(-3)=-1\), which is \(Q\)'s \(z\)-coordinate. Each component checks.

Why the Order of the Endpoints Matters

The notation \(\overrightarrow{PQ}\) specifies a direction of travel: begin at \(P\), finish at \(Q\). The formula follows that order by using \(Q-P\) coordinate by coordinate. If the point order is changed, the role of each coordinate changes too. For example, the \(x\)-component for \(\overrightarrow{QP}\) is \(x_P-x_Q\), not \(x_Q-x_P\).

This is why it is useful to write the endpoint labels in the subtraction before doing arithmetic. The vector is not determined only by the two point labels without an order; the direction indicated by the arrow matters.

Check on the notation: In \(\overrightarrow{PQ}\), the arrow begins at \(P\) and points toward \(Q\). The component subtractions must therefore be \(Q\)'s coordinates minus \(P\)'s coordinates. Reversing the order computes the coordinate changes for the opposite direction.

Common Mistake: Subtracting in the Wrong Order

Suppose \(P=(2,-1,4)\) and \(Q=(6,3,-2)\). A common error is to subtract the coordinates of \(Q\) from those of \(P\), even though the requested vector is \(\overrightarrow{PQ}\):

$$ \langle 2-6,\;-1-3,\;4-(-2)\rangle = \langle -4,-4,6\rangle. $$

Those subtractions start with \(P\)'s coordinates and then subtract \(Q\)'s. They do not give the changes from \(P\) to \(Q\). The correction is to put the ending coordinates first:

$$ \begin{aligned} \overrightarrow{PQ} &=\langle 6-2,\;3-(-1),\;-2-4\rangle\\ &=\langle 4,4,-6\rangle. \end{aligned} $$

Check: Starting from \(P\), the changes give \(2+4=6\), \(-1+4=3\), and \(4+(-6)=-2\), the coordinates of \(Q\). By contrast, the incorrect components would change the coordinates of \(P\) to \((-2,-5,10)\), not to \(Q\). Checking against the endpoints exposes the reversed subtraction.

What the Formula Does—and Does Not—Depend On

Each component uses only the two values of the same coordinate: the \(x\)-component compares \(x_P\) with \(x_Q\), the \(y\)-component compares \(y_P\) with \(y_Q\), and the \(z\)-component compares \(z_P\) with \(z_Q\). Coordinates must not be mixed across axes. For instance, \(x_Q-y_P\) does not represent a coordinate change along any one axis.

The method requires the two endpoints to be expressed in the same three-dimensional coordinate system and in the same coordinate order. Once that is true, the formula applies whether coordinates are positive, negative, zero, or fractional. The arithmetic may require care with signs, but the subtraction rule does not change.

The rule is useful whenever a directed vector is specified by its initial and terminal points: it turns endpoint information into component information in a consistent way. A final coordinate-by-coordinate check then confirms that the computed changes match the requested direction and destination.

Check Your Understanding

For each question, use ending coordinates minus starting coordinates and check the result against the endpoints.

  1. If \(A=(0,3,-2)\) and \(B=(4,-1,5)\), what is \(\overrightarrow{AB}\)?
  2. If \(C=(-3,2,1)\) and \(D=(1,2,-4)\), which component of \(\overrightarrow{CD}\) is zero, and what is the full vector?
  3. For \(E=(5,-2,0)\) and \(F=(-1,4,3)\), write each coordinate subtraction before evaluating \(\overrightarrow{EF}\).
  4. In \(\overrightarrow{GH}\), which point's coordinates are subtracted from which?
  5. A student finds \(\langle x_P-x_Q,y_P-y_Q,z_P-z_Q\rangle\) for \(\overrightarrow{PQ}\). What needs to be corrected?