Chapter 2 — Key Takeaways
The big ideas
-
A vector is one object with two faces. Geometrically it is a directed length — a magnitude and a direction, free to slide because position is not part of its identity. Algebraically it is an ordered list of components, an element of $\mathbb{R}^n$, written as a bold lowercase column $\mathbf{v}$ with components $v_1, \dots, v_n$. A coordinate system is the bridge between the two views, and fluency means crossing it without friction.
-
There are only two operations, and they generate everything. Vector addition composes displacements tip-to-tail (the parallelogram rule) and is computed componentwise: $(\mathbf{u}+\mathbf{v})_i = u_i + v_i$. Scalar multiplication stretches, shrinks, or flips a vector along its own line through the origin and is computed by scaling every component: $(c\mathbf{v})_i = c\,v_i$. Combining them gives the linear combination $c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k$ — the single construction the whole subject is built on.
-
Geometry comes first, then the formula confirms it. We read commutativity of addition straight off the parallelogram before touching components; we saw scaling as motion along a line before writing $c\,v_i$. This order is the book's core method, not a stylistic flourish.
-
Magnitude is the Pythagorean theorem in disguise. $\lVert \mathbf{v}\rVert = \sqrt{v_1^2 + \cdots + v_n^2}$, written with double bars. Scaling obeys $\lVert c\mathbf{v}\rVert = |c|\,\lVert\mathbf{v}\rVert$ (note the absolute value). The distance between two points is the magnitude of their difference, $\lVert \mathbf{q}-\mathbf{p}\rVert$. The full theory of length — the norm — waits for Chapter 18.
-
The list view keeps working when the picture runs out. In $\mathbb{R}^4$, $\mathbb{R}^{300}$, or higher there is no arrow to draw, but add/scale/magnitude are unchanged — which is exactly why a house is a vector of features, a word is a vector of embedding numbers, and a portfolio is a linear combination of asset vectors.
Skills you should now have
- Convert between an arrow (given by its endpoints) and a column of components, in either direction.
- Add and subtract vectors and multiply them by scalars, by hand and in numpy, and predict the geometric effect.
- Form a linear combination with given weights, and find the weights that hit a target (a two-equation system solved by hand).
- Compute a vector's magnitude and the distance between two points, in 2D, 3D, and beyond.
- Blend two vectors with a lerp $(1-t)\mathbf{a}+t\mathbf{b}$ and find midpoints and centroids.
- Implement
add,scale, andmagnitudefrom scratch intoolkit/vectors.pyand verify them against numpy with a tolerance (never exact float equality). - Translate a 1-indexed math formula ($v_i$) into 0-indexed numpy code (
v[i-1]) without off-by-one errors.
Terms to know
vector · scalar · component / coordinate · $\mathbb{R}^n$ · vector addition · tip-to-tail · parallelogram rule · scalar multiplication · zero vector $\mathbf{0}$ · linear combination · standard basis vectors $\mathbf{e}_1, \mathbf{e}_2$ · magnitude $\lVert\mathbf{v}\rVert$ · unit vector · position vector · displacement vector · column vector · lerp (linear interpolation) · centroid
How this connects to the recurring themes
- Geometry and algebra are two views of one object (Theme 2): the entire chapter is this theme in miniature — the arrow means, the list computes, and neither is dispensable.
- Computation validates theory (Theme 3): every hand result was confirmed by a 3–6 line numpy snippet, and you built the operations from scratch to trust the library rather than worship it.
- Linear algebra is the most applied branch of mathematics (Theme 4): the same add/scale/magnitude steered a game character, blended colors, balanced a portfolio, and previewed word embeddings — one set of operations, many fields.
Where this leads (forward references)
- Chapter 3 (Systems of Linear Equations): "which weights make $c_1\mathbf{a}_1 + \cdots = \mathbf{b}$?" is a linear system; you solved a baby version in §2.4. Its geometry is intersecting lines and planes.
- Chapter 6 (Subspaces, Span, Linear Independence): the set of all linear combinations of some vectors is their span (you saw a line emerge as the multiples of one vector, and the whole plane from two independent vectors); redundancy among vectors is linear independence.
- Chapter 7 (Matrices as Functions): matrix–vector multiplication $A\mathbf{x}$ turns out to be a linear combination of the columns of $A$ — the moment matrices reveal themselves as transformations. The visualizer you used here on a pure scaling becomes the workhorse for rotations, shears, and projections.
- Chapter 18 (Dot Products, Norms, and Angles): the informal magnitude becomes the rigorous norm; adds the angle between vectors (cosine similarity), completing the geometry that Case Study 2.2 left unfinished.
toolkit/vectors.pygainsdot,norm, andanglein Chapter 18; themagnitudeyou wrote today is their seed.
The one idea to keep: an arrow and a list of numbers are the same thing seen from two sides, and the only two operations on them — add and scale — are the entire foundation of linear algebra. Everything else is a linear combination.