Review

Use these notes to review Chapter 4 quickly.

Key Ideas

  • A point is a location in a space.
  • A direction is a movement or change.
  • A coordinate system is a convention for naming points and directions.
  • Length measures the size of one vector.
  • Distance measures the length of the difference between two points.
  • Angle compares two directions.
  • Orthogonal means perpendicular; the dot product is zero.
  • Projection keeps a component of one vector along another direction.
  • A basis gives directions for describing vectors in a space.
  • A subspace is a smaller space closed under addition and scaling.
  • A hyperplane is a boundary written as wx+b=0w \cdot x + b = 0.
  • An embedding is a learned or computed vector representation of an object.
  • A high-dimensional view is a projection or summary of a larger space.

Formulas to Remember

Euclidean length in two dimensions:

[x,y]=x2+y2\|[x, y]\| = \sqrt{x^2 + y^2}

Euclidean length in (d) dimensions:

x=x12+x22++xd2\|x\| = \sqrt{x_1^2 + x_2^2 + \cdots + x_d^2}

Distance:

d(a,b)=bad(a, b) = \|b - a\|

Dot product and angle:

uv=uvcos(θ)u \cdot v = \|u\|\|v\|\cos(\theta)

Projection onto a nonzero vector:

projb(a)=abbbb\operatorname{proj}_b(a) = \frac{a \cdot b}{b \cdot b}b

Hyperplane:

wx+b=0w \cdot x + b = 0

Signed distance from a point to a hyperplane:

wx+bw\frac{w \cdot x + b}{\|w\|}

Reading Guide

  • For coordinates, ask: point or direction?
  • For distance, ask: which metric defines close?
  • For a dot product, ask: score, angle, or projection?
  • For projection, ask: scalar component or projected vector?
  • For a residual, ask: what did the projection remove?
  • For a hyperplane, ask: score positive, negative, or zero?
  • For a boundary score, ask: raw score or normalized distance?
  • For an embedding, ask: evidence of structure, or overclaim?
  • For a projection plot, ask: what was kept, and what was discarded?
  • For high dimension, ask: does the picture need a formula, numerical example, or code check?

Checks Before You Move On

  1. Treating a point and a direction as the same idea because the numbers match.
  2. Forgetting that distance depends on the chosen metric.
  3. Calling vectors orthogonal without checking the dot product.
  4. Projecting onto a non-unit vector without dividing by bbb \cdot b.
  5. Confusing the boundary with the regions on either side.
  6. Forgetting that a subspace must contain zero.
  7. Treating nearby embeddings as complete explanations.
  8. Trusting a two-dimensional picture too much in a high-dimensional setting.
  9. Reading raw classifier score as distance without accounting for w\|w\|.
  10. Forgetting that coordinates are weights on a chosen basis.
  11. Treating a PCA, t-SNE, or UMAP plot as the full original space.

Mental Model

Geometry gives shape to computation.

When a formula uses vectors or matrices, ask whether it is measuring length, comparing directions, projecting onto a component, or separating space with a boundary. When a picture shows a high-dimensional object, ask what projection or summary produced the picture.