Summary and Revision Notes
Use these notes to review Chapter 2 quickly.
Core Picture
A vector is an ordered list of numbers with meaning.
The same coordinate list can be read in different ways depending on context:
- as a position: where something is
- as a direction: how something changes
- as a representation: how a model stores useful information
Key Ideas
- Coordinates are the entries of a vector.
- Coordinate order matters.
- Matching shape is not enough; coordinate meaning must match too.
- Vector addition and subtraction happen coordinate by coordinate.
- Scalar multiplication stretches, shrinks, or flips a vector.
- The dot product multiplies matching entries and adds the results.
- A norm measures vector length.
- Distance is the norm of a difference.
- Cosine similarity compares direction after accounting for length.
- Projection measures the component of one vector along another.
- Embeddings are learned vectors used as representations.
Key Notation
| Notation | Read as | Meaning |
|---|---|---|
| v has coordinates v one and v two | a two-dimensional vector | |
| a plus b | add matching coordinates | |
| a minus b | subtract matching coordinates | |
| c times v | multiply every coordinate by scalar c | |
| a dot b | multiply matching entries, then add | |
| norm of v | length of v | |
| norm of a minus b | distance between a and b | |
| cosine similarity | directional similarity | |
| projection of a onto b | part of a along b |
Operation Types
| Operation | Input | Output |
|---|---|---|
| two matching vectors | vector | |
| two matching vectors | vector | |
| scalar and vector | vector | |
| two matching vectors | scalar | |
| vector | scalar | |
| two positions | scalar | |
| two vectors, with | vector |
Knowing the output type prevents many mistakes.
Common Mistakes
- Forgetting that vector coordinates are ordered.
- Adding vectors with different shapes.
- Adding all vector coordinates into one number when the result should be a vector.
- Treating the dot product as ordinary multiplication.
- Forgetting that subtraction has direction.
- Comparing raw dot products when length should be removed.
- Confusing a scalar component with a projected vector.
- Assuming every embedding coordinate has a simple human label.
- Forgetting that a projection leaves a residual: the part not explained by the projection direction.
Bridge to Matrices
Matrices will organize many vector operations at once.
A matrix-vector product is a structured way to combine vector coordinates. That is why vectors come before matrices in this path.