The idea: independent vectors each add a dimension
Take some vectors and allow yourself two moves: stretch each one by any number, and add the results. Everything you can reach this way is their span. One non-zero vector reaches a line through the origin. Add a second vector that points off that line and you reach the whole plane. A vector that is already in the span adds nothing new: it is dependent on the others. The page adds vectors one at a time, tests each one, and shades the span green.
Linear combinations and span
A linear combination of v₁, …, vₖ is c₁v₁ + c₂v₂ + … + cₖvₖ for any numbers c₁, …, cₖ. The span is the set of all of them. It always contains the origin (take every c = 0), and it is always flat: a point, a line through the origin, a plane through the origin, and so on. The span of no vectors at all is just {0}.
With v₁ = (2, 1), the combinations c·v₁ fill the line through (2, 1): c = 2 gives (4, 2), c = −1 gives (−2, −1). Add v₂ = (1, 3) and every point (x, y) can be reached, because the system c₁(2, 1) + c₂(1, 3) = (x, y) always has a solution (Demo: two independent vectors span the plane).
Linear independence
Vectors are linearly independent when the only combination that gives 0 is the trivial one, all c's = 0. An equivalent test, one vector at a time: no vector is a combination of the ones before it. If some vector is, the set is dependent, and that vector can be dropped without shrinking the span.
| new vector | span before | test | verdict |
|---|---|---|---|
| v₁ = (2, 1) | {0} | v₁ ≠ 0 | independent, span → a line |
| v₂ = (−4, −2) | line through v₁ | det[v₁ v₂] = 0, v₂ = −2·v₁ | dependent, span stays a line |
| v₂ = (1, 3) | line through v₁ | det[v₁ v₂] = 5 ≠ 0 | independent, span → the plane |
| v₃ = (4, −3) | the plane | v₃ = 3·v₁ − 2·v₂ | dependent, always in ℝ² |
| v = (0, 0) | anything | 1·0 = 0 | dependent, never adds anything |
The zero vector is a special case: 1·0 = 0 is a non-trivial combination giving 0, so any set that contains 0 is dependent (Demo: the zero vector is never independent). Two vectors are dependent exactly when they are parallel, one a multiple of the other (Demo: a parallel vector adds nothing).
The 2 × 2 test: det[v w] ≠ 0
For two vectors in the plane, the quick test is the determinant of the matrix with columns v and w: det = v₁w₂ − v₂w₁. It is the signed area of the parallelogram they span. Area 0 means the parallelogram is flat, the vectors lie on one line, and they are dependent. Any other value means independent. For (2, 1) and (1, 3): 2·3 − 1·1 = 5.
A third vector in the plane is always dependent
Once two independent vectors span ℝ², every other vector is already in the span, so it must be a combination of them. Cramer's rule finds the weights: for v₃ = (4, −3), c₁ = det[v₃ v₂] / det[v₁ v₂] = 15 / 5 = 3 and c₂ = det[v₁ v₃] / det[v₁ v₂] = −10 / 5 = −2. The page draws 3·v₁ = (6, 3) and then −2·v₂ tip to tail, landing on (4, −3) (Demo: a third vector in R² is always dependent). In general, ℝⁿ holds at most n independent vectors.
Basis, coordinates and dimension
A basis of a space is a set of vectors that is independent and spans it. {v₁, v₂} = {(2, 1), (1, 3)} is a basis of ℝ², and so is the standard basis {(1, 0), (0, 1)}. In a basis every vector has exactly one set of weights, its coordinates: (4, −3) has coordinates (3, −2) in the basis {v₁, v₂}. Spanning gives at least one way to write it; independence makes the way unique. Every basis of a space has the same number of vectors, the dimension: ℝ² has dimension 2, a line through the origin has dimension 1, {0} has dimension 0.
The page keeps the basis greedily: a new vector joins it only if it is independent of the basis so far. Removing a basis vector takes one direction away and the span loses a dimension; removing a dependent vector changes nothing (Demo: remove a basis vector, the span shrinks).
From here to column space and rank
Put the vectors side by side as the columns of a matrix A. Their span is the column space of A, the set of all Ax, and its dimension is the rank of A. The greedy basis on this page is what row reduction finds as the pivot columns. A dependence like v₃ = 3v₁ − 2v₂ is a non-zero x = (3, −2, −1) with Ax = 0, a vector in the null space. See Column Space and Null Space for the 3 × 3 version, Gaussian Elimination for finding pivots, and Linear Transformations for change of basis.
See also 2D Vectors and the Dot Product for adding and scaling arrows, and Gram–Schmidt and QR for turning any basis into an orthonormal one.
What the page leaves out
Only ℝ² with integer vectors is animated; ℝ³ appears in a figure only. Abstract vector spaces (polynomials, functions), subspaces that are not spans, the proof that every basis has the same size, the Steinitz exchange lemma, row reduction of more than two vectors and infinite-dimensional spaces are not shown.
See where this page fits on the Linear Algebra & Complex Numbers mind map.