Math graphic
📐 Concept diagram

02-10 - Vectors (Basic)

Phase: 2 | Subject: 02-10 Prerequisites: 02-05-pythagoras-and-right-triangle-trig.md (trig ratios), 01-04-coordinate-geometry-2d.md (Cartesian plane) Next subject: 03-01-functions.md


Learning Objectives

By the end of this subject, you will be able to:

  1. Represent vectors in component and magnitude-direction form
  2. Perform scalar multiplication, vector addition, and subtraction
  3. Calculate the magnitude (length) of a vector
  4. Compute the dot product of two vectors
  5. Find the angle between two vectors using the dot product
  6. Determine whether vectors are parallel or perpendicular

Core Content

What is a Vector?

A vector is a quantity with both magnitude (size) and direction. A scalar has only magnitude.

Quantity Type Why
Speed (50 km/h) Scalar Only magnitude
Velocity (50 km/h North) Vector Magnitude + direction
Mass (10 kg) Scalar Only magnitude
Force (10 N downward) Vector Magnitude + direction
Displacement (5 km East) Vector Magnitude + direction
Distance (5 km) Scalar Only magnitude

Vectors are written in bold (v) or with an arrow above (v⃗). We'll use bold: v.

Vector Notation

A vector in 2D has two components — horizontal (x) and vertical (y).

Component form:

$v = (v₁, v₂)    or    v = ⟨v₁, v₂⟩
$

Example: v = (3, 4) means 3 units right and 4 units up.

Vectors are drawn as arrows from an initial point to a terminal point. The vector from A(1, 2) to B(4, 6) is:

$AB⃗ = (4-1, 6-2) = (3, 4)
$

⚠️ THIS IS CRITICAL — vectors are fundamental to linear algebra, physics, and machine learning. You will use them constantly.

Magnitude of a Vector

The magnitude (or length) of v = (x, y) comes from Pythagoras:

$|v| = √(x² + y²)
$

Example: |(3, 4)| = √(9 + 16) = √25 = 5

This is the distance from the tail to the tip of the arrow.

A unit vector has magnitude 1. To find the unit vector in the direction of v, divide by its magnitude:

$û = v / |v|
$

Example: For v = (3, 4): |v| = 5, so û = (3/5, 4/5) = (0.6, 0.8)

Scalar Multiplication

Multiply a vector by a scalar c — each component is multiplied by c:

$c·v = c·(x, y) = (c·x, c·y)
$

Geometric effect: The vector stretches by factor |c|. If c is negative, it reverses direction.

Example: 2·(3, 1) = (6, 2). The vector doubles in length but points the same way.

Vector Addition

Add vectors component-by-component:

$a + b = (a₁, a₂) + (b₁, b₂) = (a₁ + b₁, a₂ + b₂)
$

Geometric "tip-to-tail" method: Place the tail of b at the tip of a. The sum goes from the tail of a to the tip of b.

Example: (2, 3) + (1, -1) = (3, 2)

Vector Subtraction

Subtract component-by-component, or think of it as adding the negative:

$a - b = a + (-b) = (a₁ - b₁, a₂ - b₂)
$

Geometric: The vector from the tip of b to the tip of a.

Position Vectors

A position vector goes from the origin O(0, 0) to a point P(x, y). Its components are simply the coordinates of P:

$OP⃗ = (x, y)
$

Any vector AB⃗ can be expressed using position vectors:

$AB⃗ = OB⃗ - OA⃗
$

The Zero Vector

0 = (0, 0) — magnitude 0, no direction. Acts as the identity for addition: v + 0 = v.

Dot Product (Scalar Product)

The dot product of two vectors produces a SCALAR (a number, not a vector):

$a · b = a₁b₁ + a₂b₂
$

⚠️ THIS IS CRITICAL — the dot product is the foundation for projections, work calculations in physics, and similarity measures in machine learning.

Example: (3, 4) · (1, 2) = 3(1) + 4(2) = 3 + 8 = 11

Properties of the Dot Product

Proof of v · v = |v|²: v · v = v₁² + v₂² = (√(v₁² + v₂²))² = |v|² ✓

Angle Between Two Vectors

The dot product relates to the angle θ between vectors:

$a · b = |a| · |b| · cos(θ)
$

Therefore:

$cos(θ) = (a · b) / (|a| · |b|)
$

This is WHY the dot product matters — it measures how much two vectors point in the same direction.

Example: Find the angle between a = (3, 0) and b = (1, 1).

  1. a · b = 3(1) + 0(1) = 3
  2. |a| = 3, |b| = √(1 + 1) = √2
  3. cos(θ) = 3 / (3√2) = 1/√2
  4. θ = 45°

Parallel and Perpendicular Vectors

Parallel Vectors

Two vectors are parallel if one is a scalar multiple of the other:

a = k·b   for some scalar k

Test: The cross-multiplication of components must be equal: a₁·b₂ = a₂·b₁

Example: (2, 6) and (1, 3) — 2/1 = 6/3 = 2. They're parallel. (2, 6) = 2·(1, 3).

Perpendicular (Orthogonal) Vectors

Two vectors are perpendicular if their dot product is 0:

$a · b = 0
$

Why: cos(90°) = 0, so a · b = |a||b|·cos(90°) = 0.

Example: (3, 4) · (-4, 3) = 3(-4) + 4(3) = -12 + 12 = 0. They're perpendicular!



Key Terms

Worked Examples

Example 1: Find the magnitude and direction

Vector v = (5, 12).

  1. Magnitude: |v| = √(25 + 144) = √169 = 13
  2. Direction angle (from positive x-axis): tan⁻¹(12/5) ≈ 67.38°

Example 2: Vector addition — ship navigation

A ship sails 30 km East then 40 km North. Find the resultant displacement.

  1. First leg: a = (30, 0)
  2. Second leg: b = (0, 40)
  3. Total: a + b = (30, 40)
  4. Distance from start: |(30, 40)| = √(900 + 1600) = √2500 = 50 km
  5. Direction: tan⁻¹(40/30) ≈ 53.13° North of East

Example 3: Dot product and angle

Find the angle between a = (4, 0) and b = (2, 2√3).

  1. a · b = 4(2) + 0(2√3) = 8
  2. |a| = 4, |b| = √(4 + 12) = √16 = 4
  3. cos(θ) = 8 / (4 × 4) = 8/16 = 1/2
  4. θ = 60°

Example 4: Determine if vectors are perpendicular

Are a = (6, -2) and b = (1, 3) perpendicular?

a · b = 6(1) + (-2)(3) = 6 - 6 = 0. Yes, perpendicular!



Quiz

Q1: What does the concept of Angle Between Two Vectors primarily refer to in this subject?

A) A computational error related to Angle Between Two Vectors B) A historical anecdote about Angle Between Two Vectors C) A visual representation of Angle Between Two Vectors D) The definition and application of Angle Between Two Vectors

Correct: D)

Q2: What is the primary purpose of Dot Product (Scalar Product)?

A) It is used to dot product (scalar product) in mathematical analysis B) It replaces all other methods in this domain C) It is primarily a historical notation system D) It is used only in advanced research contexts

Correct: A)

Q3: Which statement about Magnitude of a Vector is TRUE?

A) Magnitude of a Vector is an advanced topic beyond this subject's scope B) Magnitude of a Vector is not related to this subject C) Magnitude of a Vector is a fundamental concept covered in this subject D) Magnitude of a Vector is mentioned only as a historical footnote

Correct: C)

Q4: Based on the worked examples in this subject, what is the correct result?

A) An unrelated numerical value B) A different result from a common mistake C) (30, 0) D) The inverse of the correct answer

Correct: C)

Q5: How are Magnitude of a Vector and What Is A Vector? related?

A) Magnitude of a Vector and What Is A Vector? are completely unrelated topics B) Magnitude of a Vector and What Is A Vector? are closely related concepts C) Magnitude of a Vector is a special case of What Is A Vector? D) Magnitude of a Vector is the inverse of What Is A Vector?

Correct: B)

Q6: What is a common pitfall when working with Vector Notation?

A) Vector Notation has no common misconceptions B) The main error with Vector Notation is using it when it is not needed C) A common mistake is confusing Vector Notation with a similar concept D) Vector Notation is always computed the same way in all contexts

Correct: C)

Q7: When should you apply Scalar Multiplication?

A) Scalar Multiplication is not practically useful B) Avoid Scalar Multiplication unless explicitly instructed C) Apply Scalar Multiplication to solve problems in this subject's domain D) Use Scalar Multiplication only in pure mathematics contexts

Correct: C)

Practice Problems

  1. Find the magnitude of v = (8, 6). Answer: |v| = √(64 + 36) = √100 = 10

  2. Compute 3·(2, -1) + (4, 5). Answer: (6, -3) + (4, 5) = (10, 2)

  3. Find the dot product: (2, 5) · (-1, 3). Answer: 2(-1) + 5(3) = -2 + 15 = 13

  4. Find the angle between a = (1, 0) and b = (1, 1). Answer: cos(θ) = 1 / (1 × √2) = 1/√2. θ = 45°.

  5. Are vectors (4, 8) and (1, 2) parallel? Answer: Yes. (4, 8) = 4·(1, 2).

  6. Are vectors (5, 2) and (-2, 5) perpendicular? Answer: Dot product = 5(-2) + 2(5) = -10 + 10 = 0. Yes!

  7. Find the unit vector in the direction of (3, 4). Answer: |(3, 4)| = 5. Unit vector = (3/5, 4/5).


Summary

Key takeaways:


Pitfalls



Next Steps

Next up: 03-01-functions.md