Skip to content
Tutorials Center
My learning

Topics

Lesson 24 of 37 · Vectors and Matrices

Vectors in the Plane

Learn what a vector is, how to add and scale vectors, find magnitude and direction, and use vectors for velocity and force problems.

Some quantities need only a number: a mass of 3 kg, a time of 12 s. These are scalars. Others need a direction as well: a wind of 40 km/h blowing north-east, a force pushing up a ramp. These are vectors. This lesson covers vectors in two dimensions, the tool that connects algebra to geometry and physics.

Describing a vector

A vector can be drawn as an arrow. Its length is its magnitude, and its direction is where it points. Two arrows with the same length and direction are the same vector, wherever they sit.

In coordinates, write a vector by its components:

Text
v = ⟨a, b⟩

This means "move a units right and b units up". A vector from point P(x₁, y₁) to Q(x₂, y₂) is ⟨x₂ − x₁, y₂ − y₁⟩. Another notation is ai + bj, where i = ⟨1, 0⟩ and j = ⟨0, 1⟩ are the unit vectors along the axes.

Magnitude and direction

The magnitude of v = ⟨a, b⟩ follows from the Pythagorean theorem:

Text
|v| = √(a² + b²)

The direction angle θ (measured counterclockwise from the positive x-axis) satisfies tan θ = b/a, but you must pick the right quadrant. Use atan2(b, a) on a computer, or a reference angle by hand.

Going the other way, a vector with magnitude m and direction θ has components

Text
v = ⟨m cos θ, m sin θ⟩

A unit vector has magnitude 1. To normalize a nonzero vector, divide by its magnitude: v / |v|.

Python Components, magnitude, direction

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Vector arithmetic

Addition is component by component:

Text
⟨a, b⟩ + ⟨c, d⟩ = ⟨a + c, b + d⟩

Geometrically, place the tail of the second arrow at the head of the first (tip-to-tail). The sum runs from the first tail to the last head. Subtraction u − v points from the head of v to the head of u.

Scalar multiplication stretches or shrinks: k⟨a, b⟩ = ⟨ka, kb⟩. A negative k reverses the direction, and |kv| = |k||v|.

Example: with u = ⟨2, −1⟩ and v = ⟨−3, 4⟩:

Text
u + v = ⟨−1, 3⟩
2u − v = ⟨4, −2⟩ − ⟨−3, 4⟩ = ⟨7, −6⟩
flowchart LR
    A["Start"] -->|"u"| B["After u"]
    B -->|"v"| C["End"]
    A -.->|"u + v"| C

Tip-to-tail addition: the dashed arrow is the sum.

Application: velocity and wind

A plane flies at an air speed of 200 km/h heading due east. A wind blows at 50 km/h toward the north. The ground velocity is the sum:

Text
⟨200, 0⟩ + ⟨0, 50⟩ = ⟨200, 50⟩

Ground speed: √(200² + 50²) = √42500 ≈ 206.2 km/h. Direction: arctan(50/200) ≈ 14.04° north of east.

For a plane that wants to travel exactly east in that wind, the pilot must aim partly into the wind, so that the north component of the plane's own velocity cancels the wind's push.

Forces in equilibrium

If an object is at rest, the forces on it add to the zero vector. Two forces of 30 N at 0° and 40 N at 90° are balanced by a third force ⟨−30, −40⟩, of magnitude 50 N.

Python Wind drift and resultant force

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the magnitude of ⟨5, -12⟩?

    √(25 + 144) = √169 = 13.
  2. 2. If u = ⟨1, 2⟩ and v = ⟨3, -1⟩, what is 3u - v?

    3u = ⟨3, 6⟩ and subtracting ⟨3, -1⟩ gives ⟨0, 7⟩.
  3. 3. A vector has magnitude 10 and direction 60°. What are its components?

    ⟨10 cos60°, 10 sin60°⟩ = ⟨5, 5√3⟩.
  4. 4. Which is a unit vector in the direction of ⟨3, 4⟩?

    Divide by the magnitude 5.

Summary

  • A vector has magnitude and direction; in the plane it is written ⟨a, b⟩ or ai + bj.
  • |v| = √(a² + b²); components from magnitude and angle are ⟨m cos θ, m sin θ⟩.
  • Add and scale component by component; addition is tip-to-tail.
  • Use atan2 or a quadrant check for the direction angle.
  • Velocity and force problems reduce to adding component vectors.

Next: The Dot Product and Angles