Vectors in 2D
Work through these tutorials after watching the Vectors in 2D videos. Each subsection walks through the main ideas step by step with worked examples. The exercises on the topic page use different problems — they are not copies of the tutorial or video examples.
1. Vectors in 2D¶
A vector has both magnitude (length) and direction. A scalar has only a value (no direction).
| Vector | Scalar | |
|---|---|---|
| Has direction? | Yes | No |
| Examples | velocity, force, displacement | speed, mass, temperature |
Vectors are drawn as arrows. We write \(\vec{a}\) (arrow over the letter) to show it is a vector, or use bold \(\mathbf{a}\) in printed text. Sometimes a bar, \(\bar{a}\), is used instead, but the arrow \(\vec{a}\) is the standard notation for vectors. Here we use \(\mathbf{a}\) for vectors.
Component form¶
A 2D vector is written as a column vector:
where \(a_1\) is the horizontal component (top entry) and \(a_2\) is the vertical component (bottom entry).
Worked example: Draw \(\mathbf{a} = \begin{pmatrix} -1 \\ 3 \end{pmatrix}\).
From the origin: one step left (\(-1\)), then three steps up (\(3\)). The dashed lines show the horizontal and vertical components. The same vector can be drawn anywhere — only magnitude and direction matter.
Scaling¶
Multiply each component by the scalar \(c\):
- \(c > 1\) stretches the vector
- \(0 < c < 1\) shortens it
- \(c = -1\) reverses direction (\(-\mathbf{a}\))
Worked example: If \(\mathbf{a} = \begin{pmatrix} -1 \\ 3 \end{pmatrix}\), find \(3\mathbf{a}\) and \(-\mathbf{a}\).
Addition and subtraction¶
Add or subtract component by component:
Geometrically, place vectors tip-to-tail (or use the parallelogram rule). Note that \(\mathbf{a} - \mathbf{b} = \mathbf{a} + (-\mathbf{b})\).
Worked example: With \(\mathbf{a} = \begin{pmatrix} -1 \\ 3 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 4 \\ 3 \end{pmatrix}\):
Check your understanding
Try Exercise 1 and Exercise 7 on the topic page.
2. Dot product¶
The dot product (also called scalar product) of \(\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix}\) is:
The result is a scalar, not a vector.
Worked example: For \(\mathbf{a} = \begin{pmatrix} -3 \\ 4 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}\):
Length of a vector¶
This is the Pythagorean theorem applied to the components.
Worked example: For \(\mathbf{a} = \begin{pmatrix} -3 \\ 4 \end{pmatrix}\):
Angle between vectors¶
So (when both vectors are nonzero):
Worked example — perpendicular vectors: For \(\mathbf{a} = \begin{pmatrix} 6 \\ -2 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} \dfrac{1}{3} \\ 1 \end{pmatrix}\):
So \(\cos\theta = 0\) and \(\theta = 90°\). The vectors are orthogonal (perpendicular). We write \(\mathbf{a} \perp \mathbf{b}\).
Projection¶
The projection of \(\mathbf{a}\) onto \(\mathbf{b}\) is the component of \(\mathbf{a}\) in the direction of \(\mathbf{b}\):
Worked example: For \(\mathbf{a} = \begin{pmatrix} 2 \\ 8 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 8 \\ 2 \end{pmatrix}\):
Check your understanding
Try Exercises 2, 3, 4, and 5 on the topic page.
3. Parametric equation of a line¶
A point \(P_0\) with position vector \(\mathbf{r}_0\) and a direction vector \(\mathbf{d}\) determine a line. The parameter \(t\) controls how far we move along \(\mathbf{d}\):
As \(t\) ranges over all real numbers, \(\mathbf{r}\) traces every point on the line.
In components, with \(\mathbf{r}_0 = \begin{pmatrix} x_0 \\ y_0 \end{pmatrix}\) and \(\mathbf{d} = \begin{pmatrix} d_1 \\ d_2 \end{pmatrix}\):
The same line can be described in many ways (different starting points or direction vectors).
Worked example: A line through \(\begin{pmatrix} 3 \\ 0 \end{pmatrix}\) with direction \(\begin{pmatrix} 3 \\ 2 \end{pmatrix}\):
When \(t = 10\):
Worked example — parallel line: Through \(\begin{pmatrix} 2 \\ 4 \end{pmatrix}\) with the same direction \(\begin{pmatrix} 3 \\ 2 \end{pmatrix}\):
Worked example — orthogonal line: A direction vector orthogonal to \(\begin{pmatrix} 3 \\ 2 \end{pmatrix}\) satisfies \(3d_1 + 2d_2 = 0\). One choice is \(\mathbf{d} = \begin{pmatrix} -2 \\ 3 \end{pmatrix}\). A line through \(\begin{pmatrix} 3 \\ 0 \end{pmatrix}\):
Check your understanding
Try Exercises 8, 9, and 10 on the topic page.