Vector equations: rearranging with arrows
Why this matters
Adding, taking away and scaling work on vectors the same way they work on numbers, so most vector formulas turn around one component at a time. Two things are new. You can't divide by a vector, so a scale is found by comparing components. And an angle hides inside the dot product, freed by arccos. These moves recover the gradient a training step used, the mix of two embeddings, and the angle behind a similarity cutoff.
- Solve a + x = b for the unknown vector, one component at a time, and check by adding back
- Find the scale k in k·v = w by comparing components, and say when no k exists because w isn't a multiple of v
- Turn the update rule, the unit vector and the mix of two vectors around for any letter, without dividing by a vector
- Free the angle, a length or the projection from a·b = ‖a‖‖b‖cos θ, with arccos clipped to [−1, 1] in code
- Recover a gradient from two weight snapshots, a mix of two embeddings, a similarity cutoff's angle and momentum's steady state
The math: undo each move, one component at a time
Purpose. Make a vector, a scale or an angle the subject of a vector formula. This is transposing, with arrows.
A quick recap of the notation. A bold letter like v is a vector, a list of numbers called its components, so v = (v₁, v₂). The length of v is ‖v‖ (lesson 49), and a·b is the dot product (lesson 50).
Adding and taking away. A vector equation is one equation per component. a + x = b says a₁ + x₁ = b₁ and a₂ + x₂ = b₂. Undo each one: x = b − a. Nothing new is needed.
Scaling. k·v = w, where k is a plain number, also says two things: k·v₁ = w₁ and k·v₂ = w₂. Each gives its own answer, k = w₁/v₁ and k = w₂/v₂. A k exists only if every component gives the same one. Take v = (2, 6). For w = (5, 15), both give 2.5, so k = 2.5. For w = (5, 14), one gives 2.5 and the other about 2.33. No single k works: w isn't a multiple of v, so it points along a different line. We say w isn't parallel to v.