b2KIT

Span & Subspace Visualizer

Visualize the span of vectors in 2D and 3D. Explore linear independence, basis, dimension, and column/null spaces.

Tested tool guide Tested browser tools Checked August 16, 2026

What Span & Subspace Visualizer does, with a checked example

The span of a set of vectors is everything you can reach by scaling and adding them, and this tool draws exactly that shape. Enter vectors in 2D or 3D and it renders the flat through the origin that holds every linear combination - a line, a plane, or the whole space - along with the dimension, a linear-independence verdict, and whether the vectors form a basis. The common surprise: adding vectors does not automatically grow the span. A third vector lying in the plane of the first two changes nothing; only a genuinely new direction adds a dimension.

Worked example

A concrete input and expected output from the current implementation.

Input

v1 = (1, 2) and v2 = (2, 4) in 2D

Expected output

Linearly dependent: v2 = 2v1. The span is the single line through the origin y = 2x, with dimension 1. The two vectors do not form a basis of the plane.

Every combination a(1,2) + b(2,4) equals (a + 2b)(1,2), so the span is all scalar multiples of (1,2) - the line y = 2x. Both vectors point along one direction, so they cover no more than a single vector would: the span has dimension 1, and since a basis of the plane needs two independent vectors, this set is not one.

How the result is produced

1

How the span is found

Each entered vector becomes a column of a matrix, and the span is the set of all linear combinations of those columns. The tool counts how many columns are independent - the matrix rank - and draws the corresponding flat: a line through the origin for one, a plane for two, all of space for three in 3D. Adding a dependent vector changes none of this.

2

Independence, basis, and the null space

Vectors are independent when no nonzero combination of them equals zero, and dependent when one is a combination of the others. A set is a basis when its vectors are independent and span the whole space. For matrices it adds two subspaces: the column space, the span of the columns, and the null space, the vectors sent to zero. Rank-nullity links them: rank plus nullity equals the column count.

Good uses

  • Confirming that a set of vectors is independent before treating it as a basis - for example, verifying that three 3D vectors reach every point of space before expressing other vectors in terms of them.
  • Understanding why a system Ax = b has no solution: b lies outside the column space, the span of the columns. Seeing the reachable outputs makes an unreachable b concrete rather than a failed computation.
  • Building intuition for dimension by adding and removing vectors and watching the span respond: a dependent vector changes nothing, and only a vector in a new direction grows the span.

Limits and checks

  • Every span contains the origin. If you expect a line or plane that does not pass through the origin, you are picturing an affine set, not a subspace, and no set of vectors will produce it.
  • In 3D, three vectors frequently span only a plane or a line. They span all of space exactly when they are independent, which is equivalent to a nonzero determinant; any four vectors in 3D are automatically dependent.
  • The independence verdict depends on numerical tolerance. The vectors (1, 2) and (1.0000001, 2.0000002) are exactly dependent - the second is 1.0000001 times the first - yet rounding may show them as independent. Read the result with your input precision in mind.

Common questions

I entered three vectors in 3D and the tool says they span only a plane. Is that a bug?

No. Three vectors span all of space exactly when they are linearly independent - none is a combination of the other two, equivalently the 3x3 determinant is nonzero. When the determinant is zero they lie in one plane through the origin, and the span is that plane or something smaller. Replace one vector with one pointing out of the plane and the span becomes all of space.

Can a span be just a single point, or is a line the smallest it gets?

Yes, a single point is possible: the origin. If every vector you enter is the zero vector, the span shrinks to that one point, a subspace of dimension 0. More typically the span is a line (one independent vector), a plane (two), or all of space (three). The dimension always equals the number of independent vectors, never the number you typed.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools