Professor Turing

Study guides

Span and basis: what is the difference?

Last updated: 2026-11-26

The span of some vectors is the collection of all their linear combinations: it is a set of places you can reach. A basis of a space is a list of vectors that spans it and is also linearly independent: it is a way of reaching those places with no redundant vector. "Spans" describes what the vectors cover. "Basis" adds a condition on how they cover it.

Start learning No account needed

1. Side by side

QuestionSpanBasis
What is it?The set of all linear combinations of the vectorsA set of vectors inside the space
Can the vectors include a redundant one?YesNo: it is linearly independent
How many are there?Each set of vectors has one spanA nonzero subspace of R^n has infinitely many bases
Link to dimensionThe number of spanning vectors can exceed itThe number of vectors equals it

Linearly independent means that the only way to combine the vectors into the zero vector is with all coefficients 0.

2. A worked example: three vectors in one plane

Take v1 = (1, 0, 1), v2 = (0, 1, 1) and v3 = (1, 1, 2). Predict the dimension of their span before you read on. The numbers come from scripts/span-vs-basis-worked-example.py in the Professor Turing repository.

v1 = (1, 0, 1), v2 = (0, 1, 1), v3 = (1, 1, 2)
v1 + v2 = (1, 1, 2)
dimension of span(v1, v2, v3) = 2
dimension of span(v1, v2) = 2
w = (2, 3, 5), with coefficients for (v1, v2, v3):
  (2, 3, 0) gives (2, 3, 5)
  (1, 2, 1) gives (2, 3, 5)
  (0, 1, 2) gives (2, 3, 5)
v1 + v2 - v3 = (0, 0, 0)
basis (v1, v2): 2*v1 + 3*v2 = (2, 3, 5)
basis (v1, v3): -1*v1 + 3*v3 = (2, 3, 5)
u = (1, 1, 1): dimension of span(v1, v2, v3, u) = 3, so u is outside the plane

v3 is redundant. It equals v1 + v2, so a combination that uses v3 can be rewritten using v1 and v2. The span of all three is the same as the span of the first two: the plane of vectors (x, y, z) with z = x + y.

The three vectors span the plane but are not a basis of it. The vector w = (2, 3, 5) can be built from them in more than one way, and the output shows three. The nontrivial combination v1 + v2 − v3 = 0 is what lets you slide from one recipe to another.

v1 and v2 are a basis of the plane. They span it, and neither is a multiple of the other, so they are independent. The plane has dimension 2. Now w has one recipe, 2 v1 + 3 v2. That holds in general: vectors form a basis exactly when each vector of the space is a combination of them in one and only one way.

Another basis, other coordinates. v1 and v3 are also a basis of the same plane. In that basis w = −1 v1 + 3 v3. The vector w did not move; the numbers describing it changed. Keep the basis vectors in a fixed order, so that each number is matched with its vector. A basis does not require its vectors to be perpendicular: v1 and v2 have dot product 1, not 0. See what is a dot product. A linear transformation is fixed by where it sends the vectors of a basis.

Neither set spans R^3. The vector u = (1, 1, 1) has z different from x + y, so no combination reaches it.

3. How to test a set

  1. Name the space. "Is this a basis?" has no answer until you say a basis of what.
  2. Check that each vector lies in that space.
  3. Check spanning: can a general vector of the space be written as a combination?
  4. Check independence: does the combination that equals zero force all coefficients to be 0? With the vectors as columns of a matrix, that means a pivot in each column.

If you already know that the space has dimension m and you hold exactly m vectors in it, the basis theorem lets you check one of steps 3 and 4: either one implies the other. For m vectors in R^m placed as the columns of a square matrix, they are a basis of R^m exactly when the determinant is not zero. When an n by n matrix has n linearly independent eigenvectors, those form a basis of R^n.

4. A common mix-up: "it spans, so it is a basis"

Three vectors that span a plane can feel like a bigger and better description than two. The span is the same. The third vector adds recipes, not places. The reverse mix-up also happens: v1 alone is independent, but it spans a line and so is not a basis of the plane. A basis needs both conditions.

When row reduction is how you find a basis for a column space, take the pivot columns from the original matrix. The columns of the reduced form can span a different space. The dimension of the column space is the rank of the matrix. For a basis of the solutions of Ax = 0, see what is a null space.

5. Test yourself

Case 1. Do (1, 0), (0, 1) and (1, 1) span R^2? Are they a basis of it?

Answer to case 1

They span R^2. They are not a basis, because (1, 1) is the sum of the other two, so the set is dependent.

Case 2. Are (1, 0, 0) and (0, 1, 0) a basis of R^3? Of anything?

Answer to case 2

Not of R^3: they do not reach (0, 0, 1). They are a basis of their span, the plane with z = 0.

Case 3. Find a basis for the span of (1, 2) and (2, 4), and give its dimension.

Answer to case 3

(2, 4) is 2 times (1, 2), so the span is a line. The single vector (1, 2) is a basis, and the dimension is 1.

If the word "space" is the sticking point, see what is a vector space. To practice from memory, see how to test yourself. If new definitions are where you stall in general, see why linear algebra is so hard.

What the sources found, and their limits

Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra, section 2.2. It defines the span as the collection of all linear combinations. Source: Vector equations and spans, read on 2026-11-25.

The same book, section 2.5. It defines linear independence, ties it to a pivot in each column, and describes dependent sets as redundant. Source: Linear independence, read on 2026-11-25.

The same book, section 2.7. It defines basis and dimension, says a nonzero subspace has infinitely many bases of equal size, states the basis theorem, and warns that pivot columns come from the original matrix. Source: Basis and dimension, read on 2026-11-25.

Jim Hefferon, Linear Algebra, fourth edition, chapter two. Definition I.2.13 gives the span. Definition III.1.1 defines a basis as a sequence of vectors that is linearly independent and spans the space, and Theorem III.1.12 gives the one-and-only-one-way test. Theorem III.2.4 says that all bases of a finite-dimensional space have the same size, and Corollary III.2.14 says that n vectors in an n-dimensional space are independent exactly when they span it. Source: Linear Algebra (PDF), read on 2026-11-25.

Limits: two textbooks, selected passages, and this page treats subspaces of R^n. The example vectors, the recipes and the self-test cases are ours.

How Professor Turing helps

Professor Turing is a tutor for adults learning any subject, in college or on their own. It asks you questions instead of giving the final answer, does not grade a bare guess, and remembers what you got wrong. No account is needed to start. It's an AI tutor, free to try.

Bring a set of vectors and say whether you think it is a basis, and of what. Its first reply asks what you already know, such as what the set spans, before it teaches anything. You must be 18 or older, and guest conversations are deleted 7 days after the last activity.

FAQ

Is a spanning set a basis? No. A spanning set can contain redundant vectors. It is a basis of the space when it spans the space and is also linearly independent.

Can a space have more than one basis? Yes. A nonzero subspace of R^n has infinitely many bases, and they all contain the same number of vectors, which is its dimension.

Start with what you're working on

Tell the tutor which linear algebra problem you are working on and let it ask you the questions.

Start learning No account needed

See also: what is a vector space · all study guides