Math Playground
Back to Algebra

Algebra › Vectors

Vectors

A vector has size and direction. It's an arrow you can drag around — and the math of vectors is the math of arrows joined head to tail.

Add two vectors — head to tail

Slide vector b onto the tip of a and you land at a + b.

a (4, 1)b (1, 3)a + b (5, 4)

Components

a = (4, 1)
b = (1, 3)
a + b = (5, 4)

Magnitudes

|a| = 4.12
|b| = 3.16
|a + b| = 6.40

Drag the dots. The faint b arrow after the tip of a shows the head-to-tail rule.

What a vector is

A plain number — like 5 — is a scalar. It has size but no direction. Five degrees, five kilos, five seconds.

A vector has both. "5 km north" is a vector. "A force of 10 N pushing east" is a vector. We write a 2D vector as a column or row of numbers — its components:

v = (3, 4) — three units across, four units up.

Magnitude

The length of a vector is found with Pythagoras:

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

So (3, 4) has magnitude √(9 + 16) = 5.

Adding — head to tail

To add two vectors, place them tail-to-head and the sum is the arrow from the start to the end. In components, just add component-wise:

(3, 4) + (1, 2) = (4, 6)

Subtracting is just adding the negative

The vector −v points the opposite way. So a − b is the same as a + (−b) — flip b around and add.

Scalar multiplication

Multiplying a vector by a scalar k stretches it by factor |k|. If k is negative, it also flips direction.

2 · (3, 4) = (6, 8)

Where you'll meet vectors

  • Velocity in physics — speed plus direction.
  • Forces, including gravity and friction.
  • Computer graphics — every pixel position is one.
  • Navigation — "30 km on a bearing of 045°" is a vector.

Quick check

  1. Find the magnitude of (6, 8).
  2. Compute (2, 5) + (4, −1).
  3. What is 3 · (1, −2)?

Answers: 10, (6, 4), and (3, −6).

Quick check

Find the magnitude of (6, 8).

Quick check

Compute (2, 5) + (4, −1).