01 — Vectors & the Space They Live In

Vectors & the
Space They Live In

What a vector really is — not just a column of numbers, but a geometric object with direction and magnitude. We build dot products from scratch, discover why projection is everywhere, and see how all of this runs through circuits and EM fields.

On this page
01 — The hook 02 — Components & basis 03 — Magnitude 04 — Dot product 05 — The proof 06 — Projection 07 — Into 3D EE / EM connections

What is a vector, really?

Forget the definition for a second. You're standing in a field. You walk 3 steps east and 4 steps north. That walk — the direction and how far — is a vector. It doesn't care where you started. It's pure displacement.

You can represent that displacement as an arrow, a column of numbers, or a magnitude + angle. All three are the same object wearing different clothes.

Formal Definition
A vector in ℝⁿ is an ordered n-tuple of real numbers. Geometrically: an arrow with a magnitude (length) and a direction. Two vectors are equal if and only if both match — regardless of where the arrow starts.

Building vectors from components

A vector v in 2D lives in ℝ². We write it as a linear combination of the standard basis vectors — the atomic unit arrows along each axis:

Column vector notation: v = [v₁, v₂]ᵀ = v₁ê₁ + v₂ê₂

Standard basis in ℝ²: ê₁ = [1, 0]ᵀ   (1 step in x, 0 in y)
ê₂ = [0, 1]ᵀ   (0 in x, 1 step in y)

So v = [3, 4]ᵀ is just: v = 3·[1,0]ᵀ + 4·[0,1]ᵀ = 3ê₁ + 4ê₂
Interactive — Vector Components drag the sliders
3
4
‖v‖ magnitude
5.00
θ angle (x-axis)
53.1°
v̂ unit vector
[0.60, 0.80]

How long is the arrow?

The magnitude (or norm) comes straight from Pythagoras — you're measuring the length of the hypotenuse formed by the components.

Step 1 — Pythagorean theorem in 2D:v‖ = √(v₁² + v₂²)

Step 2 — Plug in v = [3, 4]ᵀ:v‖ = √(3² + 4²) = √(9 + 16) = √25 = 5

Step 3 — Generalize to ℝⁿ (same formula, more terms):v‖ = √(v₁² + v₂² + ... + vₙ²) = √(Σᵢ vᵢ²)

The generalization doesn't change anything structurally — it's still Pythagoras, just in a higher-dimensional right triangle.

Unit Vector
A unit vector v̂ has magnitude exactly 1. Get it by dividing by the magnitude: v̂ = v / ‖v‖. This strips away the size and leaves only direction — essential in EE for the direction of E-fields, current, and force vectors.

Multiplying two vectors — what does it mean?

The dot product takes two vectors and produces a single number (a scalar). Two equivalent definitions — one algebraic, one geometric — that always produce the same answer.

Algebraic — multiply components pairwise, then sum: a · b = a₁b₁ + a₂b₂     (2D)
a · b = Σᵢ aᵢbᵢ         (nD)
a · b = ab             (matrix form)

Geometric — the KEY equation: a · b = ‖a‖ · ‖b‖ · cos(θ)

The dot product measures how much two vectors point in the same direction. cos(θ) = 1 when perfectly aligned, 0 when perpendicular, −1 when opposite. The visualization below shows both formulas updating simultaneously — they always agree.

Interactive — Dot Product Geometry adjust both vectors
30°
3.0
80°
2.5
a · b (algebraic)
‖a‖·‖b‖·cos θ
θ between vectors
relationship

Why the two formulas are the same thing

Let's derive a·b = ‖a‖‖b‖cos(θ) from the algebraic definition. Do this once and you'll never forget the connection between algebra and geometry.

The algebra and the geometry aren't two separate definitions — they're the same truth seen from two angles. This is the Feynman move: when two formulas always give the same number, they're revealing something deep about the structure of space.

The shadow of one vector onto another

Projection answers: "how much of a points in the direction of b?" Geometrically, it's the shadow of a cast onto b. This single operation is behind AC power, Gauss's law, least squares, and Fourier series.

Scalar projection — just the length of the shadow: comp_b(a) = ‖a‖cos(θ) = (a·b) / ‖b

Vector projection — the shadow arrow itself: proj_b(a) = [(a·b) / ‖b‖²] · b

Equivalently, using unit vector b̂ = b/‖b‖: proj_b(a) = (a·) ·

Read the last line: find how much of a aligns with (that's the dot product — a scalar), then scale by that scalar to get the shadow vector. Dot with a direction → how far you go in that direction.

Interactive — Vector Projection watch the shadow update
60°
3.0
scalar proj ‖a‖cosθ
proj_b(a) vector
‖proj_b(a)‖

Everything works the same in ℝ³

In 3D, vectors have three components. All the same rules hold — just one more term in the sums. The intuition is identical:

3D vector and magnitude: v = [v₁, v₂, v₃]ᵀ    ‖v‖ = √(v₁² + v₂² + v₃²)

3D dot product: a·b = a₁b₁ + a₂b₂ + a₃b₃ = ‖a‖‖b‖cos(θ)

In ℝⁿ for any n? Same thing. The intuition you built in 2D extends perfectly to 1000 dimensions — you can't visualize it, but the algebra carries the geometry for you.

Interactive — 3D Dot Product adjust all 6 components
2
1
3
1
3
-1
a · b
‖a‖
‖b‖
θ between
⚡ EE / EM — AC Power

Real power in AC circuits. In phasor form, voltage and current are vectors. Real power (watts) = V · I = ‖V‖‖I‖cos(φ) — the projection of current onto voltage. The perpendicular component (reactive power, VAR) does no work. Power factor is literally cos(θ).

⚡ EE / EM — Gauss's Law

Electric flux. Φ = E · A = ‖E‖‖A‖cos(θ). If the field is parallel to the surface (θ = 90°), flux is zero. If perpendicular (θ = 0°), flux is maximum. The dot product encodes exactly how much field "passes through" the surface.

⚡ EE / EM — Directional Derivatives

Rate of change of a scalar field. The derivative of field φ in direction is ∇φ · . Pure projection. The gradient points in the direction where this dot product is maximized — where cos(θ) = 1.

💡 Geometric Insight — Orthogonality

a · b = 0 ⟺ a ⊥ b. Two vectors are perpendicular exactly when their dot product is zero, because cos(90°) = 0. This single fact is why Fourier series work, why least squares works, and why basis vectors are chosen perpendicular. It is the most important geometric fact in all of linear algebra.

The geometric language you now have