# Vector fundamentals and dot product

> IB Mathematics: Analysis and Approaches HL · Unit 3: Geometry & Trigonometry
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u3-vector-fundamentals-and-dot-product/

This module covers core vector concepts including position vectors, magnitude, unit vectors, and the scalar (dot) product. You will learn how to use the dot product to find angles between vectors and test for perpendicularity, key skills for all vector geometry problems.

**Prerequisites:** [Coordinate geometry in 2D and 3D](https://www.owlsprep.com/study/ib-math-aa-hl-u3-coordinate-geometry-2d-3d/); [Basic right-angle trigonometry](https://www.owlsprep.com/study/ib-math-aa-hl-u1-right-triangle-trigonometry/)

## Learning objectives

- Represent vectors in 2D and 3D coordinate systems
- Calculate the magnitude of a vector and find unit vectors
- Compute the dot product of two vectors algebraically and geometrically
- Use the dot product to find angles between vectors and check for perpendicularity
- Apply dot product to solve problems involving scalar projections

## Vector Fundamentals in 2D and 3D

**Position Vector** — A position vector connects the origin to a point $(v_x, v_y, v_z)$ in 3D space, with components equal to the coordinates of the point.

*Notation:* \vec{v} = \begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix} = v_x \hat{i} + v_y \hat{j} + v_z \hat{k}

*Example:* The position vector of point $(2, -3, 1)$ is $2\hat{i} - 3\hat{j} + \hat{k}$.

The magnitude (length) of a vector is calculated using the 3D extension of Pythagoras' theorem:

$$|\vec{v}| = \sqrt{v_x^2 + v_y^2 + v_z^2}$$

A unit vector in the direction of $\boxed{\vec{v}}$ is found by dividing $\boxed{\vec{v}}$ by its own magnitude.

**Worked example:** Find the unit vector in the direction of $\vec{v} = 2\hat{i} - \hat{j} + 4\hat{k}$

1. First calculate the magnitude of $\vec{v}$:
2. $$|\vec{v}| = \sqrt{2^2 + (-1)^2 + 4^2} = \sqrt{4 + 1 + 16} = \sqrt{21}$$
3. Divide each component of $\vec{v}$ by the magnitude to get the unit vector:
4. $$\hat{v} = \frac{1}{\sqrt{21}} (2\hat{i} - \hat{j} + 4\hat{k}) = \frac{2}{\sqrt{21}}\hat{i} - \frac{1}{\sqrt{21}}\hat{j} + \frac{4}{\sqrt{21}}\hat{k}$$

## Algebraic Definition of the Dot Product

**Dot Product (Scalar Product)** — For two vectors $\vec{v} = (v_x, v_y, v_z)$ and $\vec{w} = (w_x, w_y, w_z)$, the dot product is the sum of the products of corresponding components.

*Notation:* \vec{v} \cdot \vec{w}

*Example:* If $\vec{v}=(1,2)$ and $\vec{w}=(3,4)$, then $\vec{v} \cdot \vec{w} = (1)(3)+(2)(4)=11$.

$$\vec{v} \cdot \vec{w} = v_x w_x + v_y w_y + v_z w_z$$

The dot product follows standard algebraic properties: it is commutative ($\vec{v} \cdot \vec{w} = \vec{w} \cdot \vec{v}$) and distributive over vector addition ($\vec{v} \cdot (\vec{w} + \vec{u}) = \vec{v} \cdot \vec{w} + \vec{v} \cdot \vec{u}$).

**Worked example:** Calculate $\vec{a} \cdot \vec{b}$ where $\vec{a} = 3\hat{i} - 2\hat{k}$ and $\vec{b} = -\hat{i} + 4\hat{j} + \hat{k}$

1. Write out all components, including the zero $y$-component for $\vec{a}$: $\vec{a} = (3, 0, -2)$, $\vec{b} = (-1, 4, 1)$
2. Multiply corresponding components and sum the results:
3. $$\vec{a} \cdot \vec{b} = (3)(-1) + (0)(4) + (-2)(1) = -3 + 0 - 2 = -5$$

## Geometric Interpretation: Angles Between Vectors

The geometric definition of the dot product connects it to the angle $\theta$ between two vectors placed tail-to-tail, where $0 \leq \theta \leq 180^\circ$:

$$\vec{v} \cdot \vec{w} = |\vec{v}||\vec{w}|\cos\theta$$

Rearranging this formula gives us a way to calculate the angle between any two non-zero vectors:

$$\cos\theta = \frac{\vec{v} \cdot \vec{w}}{|\vec{v}||\vec{w}|}$$

> **info**
>
> Two non-zero vectors are **perpendicular if and only if their dot product equals zero**. This is because $\cos 90^\circ = 0$, so the entire product becomes zero.

**Worked example:** Find the angle between $\vec{p} = (2, 1, -1)$ and $\vec{q} = (1, -1, 1)$, to the nearest degree

1. Calculate the dot product of the two vectors:
2. $$\vec{p} \cdot \vec{q} = (2)(1) + (1)(-1) + (-1)(1) = 2 - 1 - 1 = 0$$
3. Since the dot product is zero and both vectors are non-zero, they are perpendicular:
4. $$\theta = 90^\circ$$

**Check your understanding**

Test your understanding:

1. What is the angle between two non-zero vectors with $\vec{v} \cdot \vec{w} = -|\vec{v}||\vec{w}|$?

   - 0°
   - 90°
   - 180°
   - 45°

   *Why:* Correct! Rearranging gives $\cos \theta = -1$, so $\theta = 180^\circ$, meaning the vectors point in opposite directions.

## Scalar Projection of Vectors

**Scalar Projection** — The scalar projection of $\vec{v}$ onto $\vec{w}$ is the signed length of the component of $\vec{v}$ that lies along the direction of $\vec{w}$.

$$\text{proj}_{\vec{w}} \vec{v} = \frac{\vec{v} \cdot \vec{w}}{|\vec{w}|}$$

A positive projection means the component points in the same direction as $\vec{w}$, while a negative projection means it points in the opposite direction.

**Worked example:** Calculate the scalar projection of $\vec{v} = (3, 4, 0)$ onto $\vec{w} = (1, 1, 0)$

1. First calculate the dot product and magnitude of $\vec{w}$:
2. $$\vec{v} \cdot \vec{w} = (3)(1) + (4)(1) + 0 = 7, \quad |\vec{w}| = \sqrt{1^2 + 1^2} = \sqrt{2}$$
3. Substitute into the projection formula and rationalize:
4. $$\text{proj}_{\vec{w}} \vec{v} = \frac{7}{\sqrt{2}} = \frac{7\sqrt{2}}{2}$$

## Common pitfalls

- **Wrong:** Forgetting to include zero components when calculating the dot product
  - Why it fails: Vectors written only with non-zero components still have zero components for missing axes that contribute to the calculation
  - Correct: Always write out all components (including zeros) for 3D vectors before calculating the dot product
- **Wrong:** Treating the dot product result as a vector instead of a scalar
  - Why it fails: The dot product (scalar product) always outputs a single number, not a multi-component vector
  - Correct: Remember the name: scalar product outputs a scalar, cross product outputs a vector
- **Wrong:** Using the wrong calculator angle mode for angle questions
  - Why it fails: Calculators output different results for radians vs degrees, leading to incorrect final answers
  - Correct: Always check your calculator's angle mode matches the requirement stated in the question
- **Wrong:** Assuming a zero dot product means one vector is the zero vector
  - Why it fails: The most common case of a zero dot product is two non-zero perpendicular vectors
  - Correct: If the dot product is zero and both vectors are non-zero, conclude they are perpendicular

## Cheatsheet

| Concept | Formula |
| --- | --- |
| Vector magnitude | $\|\vec{v}\| = \sqrt{v_x^2 + v_y^2 + v_z^2}$ |
| Unit vector | $\hat{v} = \frac{\vec{v}}{\|\vec{v}\|}$ |
| Dot product (algebraic) | $\vec{v} \cdot \vec{w} = v_x w_x + v_y w_y + v_z w_z$ |
| Dot product (geometric) | $\vec{v} \cdot \vec{w} = \|\vec{v}\|\|\vec{w}\|\cos\theta$ |
| Angle between vectors | $\cos\theta = \frac{\vec{v} \cdot \vec{w}}{\|\vec{v}\|\|\vec{w}\|}$ |
| Perpendicular condition | $\vec{v} \cdot \vec{w} = 0 \ (\vec{v}, \vec{w} \neq 0)$ |
| Scalar projection | $\text{proj}_{\vec{w}} \vec{v} = \frac{\vec{v} \cdot \vec{w}}{\|\vec{w}\|}$ |

## What's next

Vector fundamentals and the dot product form the foundation for all further vector topics in IB AA HL. You will use the dot product constantly when working with lines and planes in 3D space, from finding angles between lines to calculating distances from points to planes. These skills also underpin cross product calculations, which are used for finding areas of parallelograms and normals to planes. Mastery of these core concepts will make more advanced vector geometry problems much more manageable, as almost all vector problems rely on correctly calculating dot products and interpreting their results.

- [Cross product of vectors (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u3-cross-product-of-vectors/)
- [Vector equations of lines and planes (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u3-vector-equations-of-lines-and/)
- [Intersections and angles between lines and planes (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u3-intersections-and-angles-between-lines/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u3-vector-fundamentals-and-dot-product/
