A boat crosses the Kura river. Its engine pushes it straight across at 4 m/s. At the same time the current drags it downstream at 3 m/s. How fast does the boat really move? Not 4 + 3 = 7 m/s — 5 m/s. Look at the picture: the two motions add up, but not “side by side” — at an angle.
A single number is not enough to describe velocity — where it points matters too. Quantities that have both a size and a direction (velocity, force, displacement) are shown by vectors. Quantities with only a size, such as mass and temperature, are ordinary numbers — they are called scalars.
What is a vector?
A vector is a segment with an arrowhead. One end of the arrow is the start, the other is the end. The length of the segment is the vector’s length (magnitude), and the way the arrow points is its direction. The vector drawn from point A to point B is written AB; for short, a vector may also get one letter: a.
VectorDefinition
A directed segment: it has a start, an end, a length (magnitude) and a direction. Vectors with equal lengths and the same direction are equal. Vectors lying on one line or on parallel lines are collinear. A vector of the same length but opposite direction is the opposite vector.
Think of a vector as an instruction: “go 3 steps right and 4 steps up”. Where you start does not matter — from home or from school, the instruction is the same. That is why arrows of the same length pointing the same way are the same vector, wherever they are drawn.
Coordinates and length of a vector
To write a vector with numbers we use its coordinates: how many steps to the right and how many steps up take you from the start to the end? Those two numbers are the vector’s coordinates. Steps to the left or down are written as negative.
Where
- A(x₁, y₁)
- the start of the vector
- B(x₂, y₂)
- the end of the vector
- x₂ − x₁
- how many steps right (negative: left)
- y₂ − y₁
- how many steps up (negative: down)
Remember: end minus start — subtract the coordinates of the start from those of the end.
Where
- |a|
- the length (magnitude) of the vector — never negative
- x, y
- the coordinates of the vector
This is the Pythagorean theorem: x and y are the legs, the vector is the hypotenuse. In space a third coordinate is added: √(x² + y² + z²).
Coordinates and length
Problem
Points A(1, −2) and B(4, 2) are given. Find the coordinates and the length of AB.
Show solutionHide solution
Solution
2) y = 2 − (−2) = 4.
3) AB = (3, 4).
4) Length: |AB| = √(3² + 4²) = √(9 + 16) = √25 = 5.
This is also the distance between the points A and B.
Adding and subtracting vectors
Adding two vectors means walking two paths one after the other. First you walk along the first vector; from where you stop you continue along the second. The sum is the arrow from the very start to the very end. In the picture we go from A to B, then from B to C; in the end we have arrived at C from A.
When two vectors start at the same point, the parallelogram rule is handy: build a parallelogram on the two vectors. The diagonal from the common start is the sum. The other diagonal is the difference — it points from the end of the subtracted vector to the end of the first one.
With coordinates, adding and subtracting is even easier: add or subtract the matching coordinates. Steps to the right add up with steps to the right, steps up with steps up.
Where
- a = (x₁, y₁)
- the first vector
- b = (x₂, y₂)
- the second vector
For example, (3, 1) + (1, 2) = (4, 3): 3 steps right and 1 more make 4 steps right; 1 step up and 2 more make 3 steps up. Subtraction works the same way: (3, 1) − (1, 2) = (2, −1).
Multiplying a vector by a number means stretching or shrinking it. 2a points the same way as a but is twice as long. ½a is half as long. Multiplying by a negative number turns the vector around: −a has the same length but the opposite direction.
Where
- k
- a number (scalar)
- a = (x, y)
- the vector being multiplied
- |k · a| = |k| · |a|
- the new length
Operations in coordinates
Problem
a = (2, −1), b = (−3, 4). Find the vector 2a − b and its length.
Show solutionHide solution
Solution
2) Then subtract coordinate by coordinate: 2a − b = (4 − (−3), −2 − 4) = (7, −6).
3) Length: |2a − b| = √(7² + (−6)²) = √(49 + 36) = √85 ≈ 9.22.
Vectors turn many geometry theorems into one line of arithmetic. Let M and N be the midpoints of the sides AB and BC of a triangle ABC. By the chain rule: MN = MB + BN = ½AB + ½BC = ½(AB + BC) = ½AC. So the midline MN is parallel to AC and half as long — the whole proof is one line.
Midpoints of a quadrilateral
Problem
Prove that the midpoints of the sides of any quadrilateral are the vertices of a parallelogram. Check it for A(0, 0), B(4, 0), C(6, 4), D(0, 6).
Show solutionHide solution
Solution
2) In triangle ABC, PQ is a midline: PQ = ½AC.
3) In triangle ADC, SR is a midline: SR = ½AC.
4) So PQ = SR: two opposite sides are parallel and equal — PQRS is a parallelogram.
Check: P(2, 0), Q(5, 2), R(3, 5), S(0, 3). PQ = (3, 2), SR = (3, 2), ½AC = ½ · (6, 4) = (3, 2) ✓.
Collinear vectors
Two vectors are collinear — they lie on one line or on parallel lines — when one is a stretched, shrunk or reversed copy of the other: b = k · a. With coordinates this is easy to check: the coordinates must be proportional — however many times one coordinate grows, the other grows the same number of times.
Where
- a = (x₁, y₁)
- the first vector
- b = (x₂, y₂)
- the second vector
- x₁ · y₂ − x₂ · y₁
- the “cross product”: zero means collinear (handier when a coordinate is 0)
The collinearity condition
Problem
For which m is the vector c = (m, 3) collinear with a = (2, −1)?
Show solutionHide solution
Solution
2) 3 / (−1) = −3, so m / 2 = −3.
3) m = −6.
Check: c = (−6, 3) = −3 · (2, −1) — the vector c points opposite to a, but it is collinear.
The expression x₁y₂ − x₂y₁ has a geometric meaning: its absolute value is the area of the parallelogram built on a and b. Collinear vectors build a “flat” parallelogram of area 0 — that is why the condition works. At university this number is called the determinant of the 2 × 2 matrix of coordinates; in space the same idea gives the cross product.
The area of a triangle with vectors
Problem
Find the area of the triangle with vertices A(1, 1), B(4, 2), C(2, 5).
Show solutionHide solution
Solution
2) Area of the parallelogram: |3 · 4 − 1 · 1| = |12 − 1| = 11.
3) The triangle is half of it: S = 11 / 2 = 5.5.
No height and no Heron’s formula needed.
The dot product
Two vectors can be “multiplied” so that the result is a number, not a vector. This number tells how much the two arrows point the same way. If they point roughly the same way, the number is positive; if they are perpendicular, it is zero; if they point roughly opposite ways, it is negative. This is the dot product (also called the scalar product — “scalar” means a number).
Where
- a · b
- the dot product — a number, not a vector
- |a|, |b|
- the lengths of the vectors
- φ
- the angle between the vectors, 0° ≤ φ ≤ 180° (draw them from one point and look at the angle between them)
Where
- a = (x₁, y₁)
- the first vector
- b = (x₂, y₂)
- the second vector
To compute it from coordinates: multiply the matching coordinates and add. No angle needed.
Where
- cos φ
- the cosine of the angle between the vectors; φ follows from it
Setting the two formulas equal and solving for cos φ: if the coordinates are known, the angle can be found.
To compute it, multiply the matching coordinates and add: (1, 2) · (3, 1) = 1 · 3 + 2 · 1 = 5. Positive — so the angle is acute. (2, 1) · (−1, 2) = −2 + 2 = 0 — so these two vectors are perpendicular.
Where
- a ⊥ b
- the vectors are perpendicular (the angle between them is 90°)
Because cos 90° = 0. This is the shortest way to test for perpendicularity.
The angle between vectors
Problem
Find the angle between a = (1, 2) and b = (3, 1).
Show solutionHide solution
Solution
2) Lengths: |a| = √(1 + 4) = √5, |b| = √(9 + 1) = √10.
3) cos φ = 5 / (√5 · √10) = 5 / √50 = 5 / (5√2) = √2 / 2.
4) φ = 45°.
Perpendicularity and work in physics
Problem
a) For which k are a = (k, 2) and b = (3, −6) perpendicular?
b) A force of 50 N moves a body 10 m; the angle between the force and the displacement is 60°. Find the work done by the force.
Show solutionHide solution
Solution
1) a · b = k · 3 + 2 · (−6) = 3k − 12.
2) 3k − 12 = 0 ⇒ k = 4.
b) Work is the dot product of force and displacement:
1) W = F · s = F · s · cos φ.
2) W = 50 · 10 · cos 60° = 50 · 10 · 0.5 = 250 J.
Interactive
Where
- |a − b|
- the length of the difference — the third side of the triangle
This is the law of cosines written with vectors: expand (a − b) · (a − b) and it appears. Put a · b = |a| · |b| · cos φ and you get the familiar c² = a² + b² − 2ab · cos φ.
Where
- |a · b|
- the absolute value of the dot product
The Cauchy–Schwarz inequality: true because |cos φ| ≤ 1. Equality holds only for collinear vectors. It solves many “largest value” problems in one line.
A maximum with vectors
Problem
Given x² + y² = 1, find the largest and the smallest value of 3x + 4y.
Show solutionHide solution
Solution
2) |a| = √(9 + 16) = 5, |b| = √(x² + y²) = 1.
3) Cauchy–Schwarz: |3x + 4y| ≤ 5 · 1 = 5.
4) The largest value, 5, is reached when b points the same way as a: (x, y) = (3/5, 4/5). Check: 9/5 + 16/5 = 5 ✓.
5) The smallest value, −5, is reached at (x, y) = (−3/5, −4/5).
Without vectors this problem would need trigonometry or derivatives.
At university a vector is any ordered list of numbers — it may have 3, 100 or a million coordinates. Nobody can draw such a vector, yet the dot product and cos φ are computed in exactly the same way. Recommendation systems compare people’s tastes this way: the closer cos φ is to 1, the more similar the two lists are.
Tastes as vectors
Problem
Aysel, Murad and Leyla rated three films from 1 to 5: Aysel (5, 3, 4), Murad (4, 2, 5), Leyla (1, 5, 2). Whose taste is closer to Aysel’s?
Show solutionHide solution
Solution
cos φ = 46 / √2250 ≈ 0.970 (φ ≈ 14°).
2) Aysel and Leyla: a · l = 5 + 15 + 8 = 28; |l| = √30.
cos φ = 28 / √1500 ≈ 0.723 (φ ≈ 44°).
3) Murad’s taste is closer: the angle between the rating vectors is much smaller.
Remember
- A vector is an arrow with a length and a direction. AB = (x₂ − x₁, y₂ − y₁): “end minus start”. Length: |a| = √(x² + y²).
- Addition — the triangle rule (paths one after the other) or the parallelogram rule; in coordinates, matching coordinates are added. k · a multiplies every coordinate by k.
- Chain rule: AB + BC = AC; difference: AB − AC = CB.
- a ∥ b ⇔ the coordinates are proportional (x₁y₂ − x₂y₁ = 0).
- The dot product is a number: a · b = |a| · |b| · cos φ = x₁x₂ + y₁y₂. Its sign tells the kind of angle; a ⊥ b ⇔ a · b = 0.