Linear combinations and span: which points can you reach?
Scale some vectors and add them up. The points you can reach that way are their span, and when two vectors point along the same line you lose a whole direction.
1. The idea
A linear combination of vectors scales each one and adds the results: c₁𝐮 + c₂𝐯. With two arrows in the plane you can ask which points you could reach by choosing c₁ and c₂. The set of reachable points is called the span of 𝐮 and 𝐯.
Usually the answer is everywhere: two arrows that point in different directions span the whole plane, and for any target there is exactly one pair (c₁, c₂). But if 𝐯 is just a scaled copy of 𝐮, the two are linearly dependent: 𝐯 adds no new direction, every combination stays on one line, and most targets are out of reach.
This question sits behind the rank of a matrix and behind many “how much can this layer express” arguments. A layer computes W𝐱, which is a linear combination of W's columns with the entries of 𝐱 as the weights, so its outputs live in the span of those columns. LoRA builds on this: it bets that the change a fine-tune needs only uses a few independent directions.
2. Try it: reach the target
Use the sliders to land c₁𝐮 + c₂𝐯 on the red target, or press Solve. Then drag 𝐯 until it lies along 𝐮 and see what happens to the reachable points.
3. The math
4. The code (python)
import numpy as np
u = np.array([2.0, 0.5])
v = np.array([0.5, 1.5])
target = np.array([3.0, 3.0])
A = np.column_stack([u, v]) # u and v as the columns of a matrix
c = np.linalg.solve(A, target) # the c1, c2 with c1*u + c2*v = target
print(c.round(3)) # [1.091 1.636]
print((c[0] * u + c[1] * v).round(6)) # [3. 3.]
w = 2 * u # dependent: a scaled copy of u
print(np.linalg.matrix_rank(np.column_stack([u, w]))) # 1
print(np.linalg.matrix_rank(A)) # 25. You’ll see this in
6. Check yourself
Finished this chapter?
What changed in ML architectures this week
New models worth knowing, benchmark moves, and one architecture explained in plain words. Free, once a week, unsubscribe anytime.