Linear Independence
Linear Algebra
A set of vectors \{mathbf{v}_1, mathbf{v}_2, dots, mathbf{v}_k\} is linearly independent if the only way to form the zero vector as lambda_1 mathbf{v}_1 + lambda_2 mathbf{v}_2 + dots + lambda_k mathbf{v}_k = mathbf{0} is with all lambda_i = 0. If any non-trivial combination gives zero, the vectors a
Vectors are independent iff the only combination giving is the trivial one.
Ignoring linear dependence in features means unstable coefficients, infinite confidence intervals, and predictions that flip sign with tiny noise.
A set of vectors is linearly independent if the only way to form the zero vector as is with all . If any non-trivial combination gives zero, the vectors are linearly dependent and (at least) one is a redundant combination of the others.
Independence is the mathematical statement of *non-redundancy*. Intuitively, independent vectors point in *genuinely different* directions, each contributing a dimension that the others cannot fake. Dependent vectors, by contrast, have overlap: one of them can be expressed using the rest, so removing it loses no information.
There is a clean algorithmic test: form the matrix whose columns are the vectors . The vectors are linearly independent iff the homogeneous system has only the trivial solution — equivalently, iff has full column rank, or (in the square case) iff . You can always run Gaussian elimination and count pivots: *number of pivots = number of independent columns*.
Some quick facts that often show up in problems. Any set containing the zero vector is automatically dependent. Any set with more vectors than the dimension of the surrounding space is automatically dependent: you cannot have five independent vectors in . A single non-zero vector is always independent.
Worked example — dependent pair: Check if and are independent. Solve . From the first coordinate, , so . Taking gives a non-trivial combination summing to zero — dependent. Indeed, .
In ML, linear independence of features matters enormously. If two columns of your design matrix are linearly dependent (e.g., temperature_celsius and temperature_fahrenheit), then is singular and the ordinary least-squares solution is not unique — the model weights are ill-defined. This is the issue behind *multicollinearity* in regression, and it is also why regularization (ridge, lasso) is so often necessary in practice.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.