# Position Vector - Definition, Formula, and Examples

## What Is A Position Vector?
A **position vector** is a vector that indicates the location of a point relative to a fixed reference point, the **origin** OOO. Its tail always sits at the origin and its head sits at the point; its length is the distance from the origin to the point, and its direction is the orientation of the point as seen from the origin.

A _vector_ is a quantity with both magnitude (size) and direction, drawn as an arrow. What makes a position vector special is that its starting point is **fixed at the origin** - it is not free to float. That anchoring is what lets it name a location.

For a point PPP with coordinates (x,y)(x, y)(x,y) in the plane, the position vector of PPP is written:

OP⃗=xi^+yj^\vec{OP} = x\hat{i} + y\hat{j}OP=xi^+yj^​

Here i^\hat{i}i^ is the **unit vector** (a vector of length 1) pointing along the positive x-axis, and j^\hat{j}j^​ is the unit vector along the positive y-axis. So xi^+yj^x\hat{i} + y\hat{j}xi^+yj^​ means "go xxx units along x, then yyy units along y." The position vector and the coordinates carry the same information in two notations.

## What Is The Formula For A Position Vector In 3D?
In three dimensions, a point P(x,y,z)P(x, y, z)P(x,y,z) has position vector:

OP⃗=xi^+yj^+zk^\vec{OP} = x\hat{i} + y\hat{j} + z\hat{k}OP=xi^+yj^​+zk^

where k^\hat{k}k^ is the unit vector along the positive z-axis. Each component tells you how far to travel along one axis. The 2D case is just this formula with z=0z = 0z=0.

**Magnitude.** The length of the position vector — the straight-line distance from the origin to the point — comes from the Pythagorean theorem extended to vectors:

∣OP⃗∣=x2+y2+z2\|\vec{OP}\| = \sqrt{x^2 + y^2 + z^2}∣OP∣=x2+y2+z2​

In 2D this is ∣OP⃗∣=x2+y2\|\vec{OP}\| = \sqrt{x^2 + y^2}∣OP∣=x2+y2​.

## How Do You Find the Vector Between Two Points?
This is where position vectors do their most useful work. To find the vector that points **from** point AAA **to** point BBB, subtract the position vector of the start from the position vector of the end:

AB⃗=OB⃗−OA⃗\vec{AB} = \vec{OB} - \vec{OA}AB=OB−OA

If A=(x1,y1)A = (x_1, y_1)A=(x1​,y1​) and B=(x2,y2)B = (x_2, y_2)B=(x2​,y2​), then in components:

AB⃗=(x2−x1)i^+(y2−y1)j^\vec{AB} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j}AB=(x2​−x1​)i^+(y2​−y1​)j^​

The rule is always **"head minus tail"** - the destination's position vector minus the starting point's. Get the order backwards and you get the vector pointing the wrong way.

## Examples of the Position Vector
Each example is worked step by step. The problem statement is in bold; the working is not.

### Example 1
**Write the position vector of the point P(2, 5).**

The point has x=2x = 2x=2, y=5y = 5y=5. Substitute into OP⃗=xi^+yj^\vec{OP} = x\hat{i} + y\hat{j}OP=xi^+yj^​:

OP⃗=2i^+5j^\vec{OP} = 2\hat{i} + 5\hat{j}OP=2i^+5j^​.

Final answer: OP⃗=2i^+5j^\vec{OP} = 2\hat{i} + 5\hat{j}OP=2i^+5j^​.

### Example 2
**Find the vector from A(2, 3) to B(7, 1). A student writes AB = OA − OB. Is that right?**

The tempting move is to subtract in reading order: AAA first, so OA⃗−OB⃗\vec{OA} - \vec{OB}OA−OB.

Wrong path: OA⃗−OB⃗=(2−7)i^+(3−1)j^=−5i^+2j^\vec{OA} - \vec{OB} = (2 - 7)\hat{i} + (3 - 1)\hat{j} = -5\hat{i} + 2\hat{j}OA−OB=(2−7)i^+(3−1)j^​=−5i^+2j^​

Check the direction. Going from A(2,3)A(2,3)A(2,3) to B(7,1)B(7,1)B(7,1) moves _right_ (x increases from 2 to 7) and _down_ (y drops from 3 to 1). So the x-component should be **positive** and the y-component **negative**. The wrong answer has them exactly reversed - it describes the trip from BBB to AAA, not AAA to BBB.

The rule is head minus tail: the head is BBB, so AB⃗=OB⃗−OA⃗\vec{AB} = \vec{OB} - \vec{OA}AB=OB−OA: AB⃗=(7−2)i^+(1−3)j^=5i^−2j^\vec{AB} = (7 - 2)\hat{i} + (1 - 3)\hat{j} = 5\hat{i} - 2\hat{j}AB=(7−2)i^+(1−3)j^​=5i^−2j^​

Now the signs match the picture: right and down.

Final answer: AB⃗=5i^−2j^\vec{AB} = 5\hat{i} - 2\hat{j}AB=5i^−2j^​.

### Example 3
**Find the magnitude of the position vector of P(3, 4).**

The position vector is 3i^+4j^3\hat{i} + 4\hat{j}3i^+4j^​. Its magnitude:

∣OP⃗∣=32+42=9+16=25=5\|\vec{OP}\| = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5∣OP∣=32+42​=9+16​=25​=5

Final answer: ∣OP⃗∣=5\|\vec{OP}\| = 5∣OP∣=5 units.

### Example 4
**Write the position vector of the point Q(1, −2, 4) in three dimensions, and find its magnitude.**

Position vector, using all three components: OQ⃗=i^−2j^+4k^\vec{OQ} = \hat{i} - 2\hat{j} + 4\hat{k}OQ​=i^−2j^​+4k^

Magnitude: ∣OQ⃗∣=12+(−2)2+42=1+4+16=21≈4.58\|\vec{OQ}\| = \sqrt{1^2 + (-2)^2 + 4^2} = \sqrt{1 + 4 + 16} = \sqrt{21} \approx 4.58∣OQ​∣=12+(−2)2+42​=1+4+16​=21​≈4.58

Final answer: OQ⃗=i^−2j^+4k^\vec{OQ} = \hat{i} - 2\hat{j} + 4\hat{k}OQ​=i^−2j^​+4k^, magnitude 21\sqrt{21}21​ units.

### Example 5
**The position vectors of A and B are OA = 2î + 3ĵ and OB = 6î + 6ĵ. Find the length of AB.**

First the vector AB⃗=OB⃗−OA⃗\vec{AB} = \vec{OB} - \vec{OA}AB=OB−OA: AB⃗=(6−2)i^+(6−3)j^=4i^+3j^\vec{AB} = (6 - 2)\hat{i} + (6 - 3)\hat{j} = 4\hat{i} + 3\hat{j}AB=(6−2)i^+(6−3)j^​=4i^+3j^​

Then its magnitude: ∣AB⃗∣=42+32=16+9=25=5\|\vec{AB}\| = \sqrt{4^2 + 3^2} = \sqrt{16 + 9} = \sqrt{25} = 5∣AB∣=42+32​=16+9​=25​=5

Final answer: ∣AB⃗∣=5\|\vec{AB}\| = 5∣AB∣=5 units.

### Example 6
**The position vectors of points A and B are a = 2î + ĵ and b = 4î + 5ĵ. Find the position vector of the midpoint M of AB.**

The midpoint's position vector is the average of the two endpoint position vectors: OM⃗=a⃗+b⃗2\vec{OM} = \frac{\vec{a} + \vec{b}}{2}OM=2a+b​=(2i^+j^)+(4i^+5j^)2= \frac{(2\hat{i} + \hat{j}) + (4\hat{i} + 5\hat{j})}{2}=2(2i^+j^​)+(4i^+5j^​)​=6i^+6j^2=3i^+3j^= \frac{6\hat{i} + 6\hat{j}}{2} = 3\hat{i} + 3\hat{j}=26i^+6j^​​=3i^+3j^​

Final answer: OM⃗=3i^+3j^\vec{OM} = 3\hat{i} + 3\hat{j}OM=3i^+3j^​, so M=(3,3)M = (3, 3)M=(3,3).

## Why Position Vectors Matter - "Fixing where things are"
A position vector solves a problem so basic it is easy to overlook: **how do you say exactly where something is?** Coordinates alone are just a pair of numbers. Turning them into a vector - an arrow from a fixed origin - lets you _do arithmetic_ with locations: subtract two positions to get the path between them, average two positions to find a midpoint, add a change to update a position.

That is why position vectors sit under so much applied work:

- **Navigation and GPS** - a satellite reports your location as a vector from Earth's centre; the difference between two such vectors is the route between two places.

- **Physics** - the position vector r⃗(t)\vec{r}(t)r(t) of a moving object, tracked over time, is the starting point for velocity and acceleration. Change in position over change in time is velocity; the whole of motion analysis begins here.

- **Computer graphics and robotics** - every vertex of a 3D model and every joint of a robot arm is stored as a position vector, then moved by adding other vectors.

The idea worth carrying forward: a position vector is _tied to the origin_, but the vector _between_ two points is free — it depends only on the difference, not on where the origin sits. That distinction between "anchored" and "free" vectors is the seed of the whole subject of [vectors](/content/math/geometry/vectors/index.html).

## What Are The Most Common Mistakes With Position Vectors?
### Mistake 1: Subtracting in the wrong order
**Where it slips in:** Finding the vector from one point to another.
**Don't do this:** Writing AB⃗=OA⃗−OB⃗\vec{AB} = \vec{OA} - \vec{OB}AB=OA−OB (tail minus head).
**The correct way:** Always **head minus tail**: AB⃗=OB⃗−OA⃗\vec{AB} = \vec{OB} - \vec{OA}AB=OB−OA. The first-instinct error is to subtract in the order the letters are read (AAA then BBB), which produces the vector pointing from BBB back to AAA - correct magnitude, reversed direction. Match the sign of each component against the picture before trusting the answer.

### Mistake 2: Confusing a position vector with a displacement vector
**Where it slips in:** Any problem that mixes "where a point is" with "how far something moved."
**Don't do this:** Treating the vector between two points as a position vector anchored at the origin.
**The correct way:** A **position vector** is anchored at the origin and names _where_ a point is; a **displacement vector** is free and names _how much_ the position changed. The point of confusion between these two close ideas is exactly this - both are arrows with the same components in some problems, but only the position vector must start at the origin. Ask which the question wants: a location, or a change.

### Mistake 3: Forgetting the square root in the magnitude
**Where it slips in:** Computing the length of a position vector.
**Don't do this:** Reporting x2+y2x^2 + y^2x2+y2 as the magnitude.
**The correct way:** The magnitude is x2+y2\sqrt{x^2 + y^2}x2+y2​ - the sum of squares is only halfway there. The rusher who stops at 9+16=259 + 16 = 259+16=25 and calls the length 252525 has skipped the root; the real length is 25=5\sqrt{25} = 525​=5. This is the vector version of a mistake with real stakes: an aircraft computing straight-line distance to a runway from its east–north offsets must take the square root of the sum of squares, and stopping early would put the reported distance wildly off - the same failure that unit and formula slips have caused in aviation navigation incidents.

## Conclusion
- A **position vector** points from the origin to a point, written OP⃗=xi^+yj^\vec{OP} = x\hat{i} + y\hat{j}OP=xi^+yj^​ (or with zk^z\hat{k}zk^ in 3D).
- The vector from AAA to BBB is AB⃗=OB⃗−OA⃗\vec{AB} = \vec{OB} - \vec{OA}AB=OB−OA - head minus tail.
- Its magnitude is x2+y2\sqrt{x^2 + y^2}x2+y2​ (2D) or x2+y2+z2\sqrt{x^2 + y^2 + z^2}x2+y2+z2​ (3D).
- A position vector is anchored at the origin; a displacement vector is free.
- Position vectors let you do arithmetic with locations - subtract for paths, average for midpoints.
