Vectors
View .md

What is a Vector?

A vector is an arrow with direction and magnitude.

Components

In 2D, a vector v has two components:

  • v₁ — horizontal (x-axis)
  • vā‚‚ — vertical (y-axis)

We write: v = (v₁, vā‚‚)

v=(v1v2)\mathbf{v} = \begin{pmatrix} v_1 \\ v_2 \end{pmatrix}

The first component v1v_1 tells you how far to go horizontally, and v2v_2 tells you how far to go vertically.

Magnitude

The magnitude (or length) of a vector is:

∄v∄=v12+v22\|\mathbf{v}\| = \sqrt{v_1^2 + v_2^2}

This is just the Pythagorean theorem!

Direction

The direction of a vector is the angle it makes with the positive x-axis:

θ=arctan⁔(v2v1)\theta = \arctan\left(\frac{v_2}{v_1}\right)