Mathematics · intro

Vectors & Vector Spaces

Vectors as ordered lists, dot products, norms, orthogonality, and the geometric picture of n-dimensional space.

mathematicslinear-algebra

Mental model

A vector is a point and an arrow. The dot product measures alignment (how much one vector projects onto another); orthogonality means zero projection. Most ML objects — embeddings, weights, activations — are vectors living in some space.

How to study Vectors & Vector Spaces

Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use Essence of Linear Algebra (3Blue1Brown), 3Blue1Brown — Vectors, what even are they?, 3Blue1Brown — Dot products and duality to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.

Next, compare Vectors & Vector Spaces with Matrices & Linear Transformations, ML Math Foundations, Derivatives & Gradients. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Compute a dot product and angle and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.

Proof of understanding

  • Explain the mechanism from first principles and identify the state it reads or changes.
  • Give one situation where the concept is the right choice and one where it is not.
  • Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
  • Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.

Where it matters

Embedding similarity, cosine distance, attention scores, gradient directions.

Common mistakes

  • Confusing dot product with element-wise multiplication
  • Treating vectors as scalars when adding dimensions
  • Forgetting that dot product is zero for perpendicular vectors

Learn from primary sources

Practice and explain it back

Compute a dot product and angle

Given u = [3, 4] and v = [1, 2], compute u·v, ||u||, ||v||, and cos θ between them. State whether the vectors are orthogonal.

Expected evidence: u·v = 11, ||u|| = 5, ||v|| = √5, cos θ = 11/(5√5) ≈ 0.98, not orthogonal.

Open the interactive drill →

Review prompts

  • What does the dot product measure geometrically?

Build evidence

Visualize linear projections

Draw vector projection onto a line/subspace: show orthogonal residual. Connect to OLS geometry.

  • Diagram or plot: vector, subspace, projection, residual orthogonal
  • Numeric check: residual · subspace direction = 0

Prerequisites

None assigned yet.

Related concepts

Learning paths