Directed quantities with magnitude and direction. Addition and scalar multiplication.
Deep-dive lesson - accessible entry point but dense material. Use worked examples and spaced repetition.
When GPS tells you to drive 'north for 2 miles,' it's giving you a vector - a quantity with both size and direction. This seemingly simple idea turns out to be one of the most powerful concepts in mathematics, underlying everything from physics to machine learning.
A vector is a quantity with both magnitude (how much) and direction (which way). You can represent vectors as ordered pairs of numbers, add them component-wise, and scale them by multiplying each component.
Let's start with the core idea: a vector is a mathematical object that captures two pieces of information simultaneously:
The most natural way to visualize a vector is as an arrow. The arrow's length represents the magnitude - a longer arrow means a bigger value. The arrow's orientation tells you the direction - where it's pointing.
This is fundamentally different from regular numbers. A regular number like "5" just tells you "how much" - it answers questions like "how far?" or "how heavy?" We call these regular numbers scalars because they only have scale (size), not direction.
A vector answers a richer question: "how much in which direction?"
Example: Saying "the wind is blowing at 20 mph" gives you a scalar - just the speed. But saying "the wind is blowing at 20 mph from the northwest" gives you a vector - both speed and direction. The second is more useful if you're sailing a boat!
A crucial property: Two arrows that have the same length and point the same direction represent the same vector, regardless of where they're drawn. You could draw an arrow from point A to point B, or an identical arrow from point C to point D - if they have the same length and direction, they're the same vector. We say vectors are "free" - they don't have a fixed position in space.
This might seem abstract, but it's actually what makes vectors so useful: we can move them around, add them together, and manipulate them without worrying about where they're located.
Drawing arrows is great for intuition, but we need a way to work with vectors using numbers. That's where components come in.
Place your vector in a coordinate system - the familiar x-y plane from algebra. Now, any vector from the origin can be described by two numbers:
We write these as an ordered pair. For example:
v = (4, 2)
This notation means: "start at the origin, go 4 units to the right, then go 2 units up." The tip of the arrow lands at the point (4, 2).
Let's be very clear about what these numbers mean:
Different notations you'll encounter:
Mathematicians and physicists use several equivalent ways to write the same vector:
| Notation | Example | Common in |
|---|---|---|
| Parentheses | (4, 2) | Most textbooks |
| Angle brackets | ⟨4, 2⟩ | Physics, some calc texts |
| Column vector | [4; 2] vertically | Linear algebra |
| Unit vector form | 4î + 2ĵ | Physics (we'll cover this later) |
All of these mean exactly the same thing: a vector with x-component 4 and y-component 2. Don't let the notation confuse you - it's just different ways of writing the same object.
Why components are powerful: Once you have components, you can do arithmetic with vectors using ordinary algebra. No more drawing - just calculate with the numbers.
Sometimes you need to know how "big" a vector is without caring about its direction. The magnitude (also called the length or norm) of a vector measures exactly this.
But wait - if a vector is written as (4, 2), is its magnitude 4? Or 2? Or something else entirely?
Here's where geometry helps us. Draw a vector from the origin to point (4, 2). Now draw a horizontal line from the origin to (4, 0), and a vertical line from (4, 0) up to (4, 2).
You've just created a right triangle where:
The Pythagorean theorem tells us the hypotenuse length! For any right triangle:
a² + b² = c²
where c is the hypotenuse.
So for our vector v = (4, 2):
magnitude² = 4² + 2² = 16 + 4 = 20
magnitude = √20 ≈ 4.47
The general formula: For any 2D vector v = (x, y), the magnitude is:
‖v‖ = √(x² + y²)
Those double vertical bars ‖ ‖ are the standard notation for magnitude. Some texts use single bars |v|, but ‖v‖ is more precise (single bars often mean absolute value, which is a related but different concept).
A classic example: Consider v = (3, 4).
‖v‖ = √(3² + 4²) = √(9 + 16) = √25 = 5
This is the famous 3-4-5 right triangle. The vector (3, 4) has magnitude exactly 5. Notice that 5 is not equal to either component - the magnitude is the diagonal distance, not a horizontal or vertical distance.
Key insight: Magnitude is always non-negative (zero or positive). The only vector with magnitude zero is the zero vector (0, 0), which has no direction because it doesn't point anywhere.
Now we get to one of the most useful operations: adding vectors together. When would you want to do this? Any time two vector quantities combine.
Physical example: You walk 3 blocks east, then 2 blocks north. Where are you relative to where you started? You need to add your two displacement vectors.
The geometric method (head-to-tail):
To add vector a and vector b geometrically:
Why does this work? Think about it: a gets you from the start to some intermediate point. Then b takes you from that intermediate point to the final destination. The sum is the "shortcut" - the direct path from start to finish.
The algebraic method (component-wise addition):
Even simpler: just add the corresponding components!
If a = (3, 1) and b = (2, 3), then:
a + b = (3 + 2, 1 + 3) = (5, 4)
That's it. Add the x-components together, add the y-components together.
Why does this work? Think about the x-direction and y-direction separately:
Properties of vector addition:
Vector addition behaves nicely, just like addition of regular numbers:
(Order doesn't matter - you end up at the same place)
(Grouping doesn't matter)
(Adding the zero vector (0, 0) changes nothing)
These properties might seem obvious, but not all mathematical operations have them. It's worth noting when they hold.
What if you want to make a vector longer or shorter without changing its direction? That's scalar multiplication - multiplying a vector by a regular number (a scalar).
The basic operation:
To multiply vector v = (3, 1) by the scalar 2:
2 · v = 2 · (3, 1) = (2 · 3, 2 · 1) = (6, 2)
Just multiply each component by the scalar. The result is a vector that points in the same direction but is twice as long.
What different scalars do:
| Scalar c | Effect on v |
|---|---|
| c > 1 | Longer, same direction |
| c = 1 | No change |
| 0 < c < 1 | Shorter, same direction |
| c = 0 | Zero vector (0, 0) |
| c < 0 | Flipped direction! |
Let's see negative scalars in action. If v = (3, 1):
−1 · v = (−3, −1)
This vector has the same magnitude as v but points in the exactly opposite direction. Multiplying by -1 is like doing a 180° turn.
What about −2 · v?
−2 · v = (−6, −2)
This vector is twice as long as v and points in the opposite direction. The negative sign flips it; the 2 stretches it.
Why this is useful:
Scalar multiplication lets you express related vectors compactly. For example:
The algebraic rule:
For any scalar c and vector v = (x, y):
c · v = (c · x, c · y)
Multiply the scalar through to each component. That's all there is to it.
A unit vector is a vector with magnitude exactly equal to 1. It represents pure direction, with no "size" attached.
Why would you want such a thing? Because sometimes you want to talk about direction independently of magnitude. "Which way is it pointing?" is a different question from "How strong is it?"
The standard basis vectors:
In 2D, two unit vectors are so important they get their own names:
î = (1, 0) - points in the positive x-direction
ĵ = (0, 1) - points in the positive y-direction
(The little hat symbol ˆ indicates a unit vector. You'll see î pronounced "i-hat" and ĵ pronounced "j-hat".)
These two vectors form the standard basis for 2D space. Why "basis"? Because any 2D vector can be built from them.
Decomposing any vector:
Take the vector (3, 2). Using unit vectors:
(3, 2) = 3î + 2ĵ
This says: "go 3 units in the î direction, then 2 units in the ĵ direction."
Let's verify this makes sense:
So the notation 3î + 2ĵ is just another way of writing (3, 2). It emphasizes that the vector is a combination of horizontal and vertical components.
Creating a unit vector from any vector:
Given any non-zero vector v, you can create a unit vector û that points in the same direction by dividing by the magnitude:
û = v / ‖v‖
This process is called normalizing the vector.
Example: Normalize v = (3, 4).
Step 1: Find the magnitude.
‖v‖ = √(3² + 4²) = √(9 + 16) = √25 = 5
Step 2: Divide each component by the magnitude.
û = (3/5, 4/5) = (0.6, 0.8)
Step 3: Verify the result has magnitude 1.
‖û‖ = √(0.6² + 0.8²) = √(0.36 + 0.64) = √1 = 1 ✓
The vector (0.6, 0.8) points in the same direction as (3, 4) but has magnitude exactly 1.
Vector subtraction is defined in terms of addition and scalar multiplication:
a − b = a + (−1 · b) = a + (−b)
In other words, subtracting b is the same as adding the opposite of b.
Example: If a = (5, 3) and b = (2, 1):
a − b = (5, 3) − (2, 1)
= (5 − 2, 3 − 1)
= (3, 2)
Just subtract component by component, just like addition adds component by component.
Geometric interpretation: The vector a − b points from the tip of b to the tip of a (when both are drawn from the origin). It answers: "what vector do I add to b to get a?"
The zero vector:
The zero vector, written 0 or (0, 0), is special:
Every vector has an additive inverse - a vector that "cancels it out":
v + (−v) = 0
For v = (3, 4), the additive inverse is −v = (−3, −4), and:
(3, 4) + (−3, −4) = (0, 0) = 0
Physical interpretation: If you walk 3 blocks east and then 3 blocks west, you're back where you started. Your net displacement is zero - the zero vector.
A hiker walks 4 km east, then 3 km north. Find: (a) their displacement from the starting point, and (b) the total distance they walked.
Model each leg as a vector:
• East leg: d₁ = (4, 0) km (4 units in x-direction, 0 in y)
• North leg: d₂ = (0, 3) km (0 units in x, 3 in y)
Add the vectors to find displacement:
d = d₁ + d₂ = (4, 0) + (0, 3) = (4, 3) km
Find the magnitude of the displacement:
‖d‖ = √(4² + 3²) = √(16 + 9) = √25 = 5 km
This is how far they are from the start, as the crow flies.
Find total distance walked:
Distance = 4 km + 3 km = 7 km
This is the length of the path they actually traveled.
Insight: Distance walked (7 km) and displacement magnitude (5 km) are different! Displacement is a vector - it cares about the net change in position. Distance is a scalar - it accumulates every step regardless of direction. A round trip has zero displacement but positive distance.
Two forces act on an object: F₁ = (6, 8) N and F₂ = (−2, 4) N. Find the net force and its magnitude.
Understand what the forces mean:
• F₁ pushes 6 N to the right and 8 N upward
• F₂ pushes 2 N to the left (negative x) and 4 N upward
Add the force vectors component by component:
F_net = F₁ + F₂
= (6 + (−2), 8 + 4)
= (4, 12) N
Find the magnitude of the net force:
‖F_net‖ = √(4² + 12²)
= √(16 + 144)
= √160
≈ 12.65 N
Insight: You can't just add magnitudes! ‖F₁‖ = √(36+64) = 10 N and ‖F₂‖ = √(4+16) ≈ 4.5 N, but the net force is about 12.65 N, not 14.5 N. The x-components partially canceled (6 − 2 = 4), while the y-components reinforced (8 + 4 = 12). Direction matters.
Find a unit vector pointing in the same direction as w = (5, 12).
First, find the magnitude of w:
‖w‖ = √(5² + 12²) = √(25 + 144) = √169 = 13
(This is the 5-12-13 Pythagorean triple.)
Divide each component by the magnitude:
ŵ = w / ‖w‖
= (5/13, 12/13)
≈ (0.385, 0.923)
Verify the result has magnitude 1:
‖ŵ‖ = √((5/13)² + (12/13)²)
= √(25/169 + 144/169)
= √(169/169)
= √1 = 1 ✓
Insight: Normalization preserves direction while setting magnitude to 1. This is useful when you only care about which way something is pointing, not how strong it is. For example, in computer graphics, surface normals are always normalized.
Given v = (−3, 7), write it in unit vector notation. Then find a vector that is twice as long and points in the opposite direction.
Express v using unit vectors î and ĵ:
v = (−3, 7) = −3î + 7ĵ
(The x-component multiplies î, the y-component multiplies ĵ.)
To flip direction and double length, multiply by −2:
−2v = −2 · (−3, 7)
= (−2 · −3, −2 · 7)
= (6, −14)
Verify the result:
• Original magnitude: ‖v‖ = √(9 + 49) = √58 ≈ 7.62
• New magnitude: ‖−2v‖ = √(36 + 196) = √232 ≈ 15.23
• Ratio: 15.23 / 7.62 ≈ 2 ✓ (twice as long)
• Direction: (6, −14) vs (−3, 7) - signs are opposite ✓
Insight: Scalar multiplication by a negative number does two things at once: it flips the direction (the negative part) and scales the magnitude (the absolute value part). The factor −2 means: flip it around, then stretch it to twice the length.
A vector has both magnitude (length) and direction - think of it as an arrow, not just a number
Components (x, y) describe a vector by how far it goes horizontally and vertically
Magnitude uses the Pythagorean theorem: ‖(x, y)‖ = √(x² + y²)
Vector addition is component-wise: (a, b) + (c, d) = (a+c, b+d)
Scalar multiplication scales each component: c · (x, y) = (cx, cy)
Negative scalars flip direction; positive scalars preserve it
Unit vectors have magnitude 1; the standard basis is î = (1,0) and ĵ = (0,1)
Any vector can be written as xî + yĵ - a weighted combination of the basis vectors
Adding magnitudes instead of vectors: If two perpendicular forces have magnitudes 3 and 4, the combined magnitude is 5 (not 7). You must add the vectors, not the magnitudes. Direction matters!
Confusing magnitude with a component: The vector (3, 4) has magnitude 5, not 3 or 4. The magnitude is the diagonal distance; components are horizontal and vertical steps.
Thinking vectors are fixed in place: Two arrows with the same length and direction are the SAME vector, even if drawn at different positions. Vectors are 'free' - they don't have a home location.
Treating î and ĵ as special: They're just convenient names for (1, 0) and (0, 1). Any vector of magnitude 1 is a unit vector. The î-ĵ notation is just another way to write components.
Given u = (2, −5) and v = (−3, 4), compute:
(a) u + v
(b) u − v
(c) 3u
(d) 2u − v
Hint: For (d), first compute 2u = (4, −10), then subtract v component by component.
(a) (−1, −1)
(b) (5, −9)
(c) (6, −15)
(d) (4−(−3), −10−4) = (7, −14)
Find the magnitude of w = (7, 24) and create a unit vector in its direction.
Hint: Check if 7² + 24² is a perfect square. Then divide each component by the magnitude.
‖w‖ = √(49 + 576) = √625 = 25. Unit vector: ŵ = (7/25, 24/25) = (0.28, 0.96)
A plane aims north at 200 mph airspeed, but a 50 mph wind blows from the west (pushing it eastward). Find the plane's actual velocity over the ground: both speed and direction.
Hint: Plane's heading: (0, 200). Wind's effect: (50, 0). Add them. Find magnitude for speed and use arctan for angle.
v = (0, 200) + (50, 0) = (50, 200).
Speed = √(2500 + 40000) = √42500 ≈ 206 mph.
Direction: arctan(50/200) ≈ 14° east of north.
Vectors build directly on the Coordinate Plane - without coordinates, we couldn't write vectors as components.
From here, vectors unlock:
• Dot Product - measuring alignment between vectors (are they pointing the same way?)
• Matrix Operations - matrices transform vectors via multiplication
• Gradients - the derivative as a vector in multivariable calculus
• Neural Networks - layers are just matrix-vector multiplications
• Vector Embeddings - representing words and concepts as vectors
In physics: force, velocity, and acceleration are all vectors. In ML: feature vectors, weight matrices, gradient descent - vectors everywhere.
Mastering vectors now pays compound interest across everything technical.