Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Span and Linear Independence


Linear Algebra·Span & independenceTwo vectors. Are they pointing in genuinely different directions, or is b just a multiple of a?
φabspan = ℝ²
a=(2, 1)
b=(-1, 2)
Sweep b around originφ = 0°next det = 0 at 90°
90°270°360°
φ = 0°
det(φ) = |a|·|b|·sinφnow 5

Orthogonal vectors

independent · angle 90°

a and b point in genuinely different directions. Every point in the plane is a unique combination c·a + d·b — that's what independent means.
Learn more about independent pairs · the determinant test

Insight

The span of a and b is the set of all their linear combinations. When the parallelogram has positive area, that set is the entire plane.

AVectors

a
b

04Livedrag a, b

|a|2.24|b|2.24angle(a, b)90°det [a b]5area of ▱5rank [a b]2
INDEPENDENT · span = ℝ²








Key Terms

Linear combination — any vector of the form ca+dbc\,\mathbf{a} + d\,\mathbf{b} for scalars c,dc, d.

Span — the set of all linear combinations of a collection of vectors. For two vectors in the plane it is either the whole plane, a line through the origin, or just the origin.

Linearly independent — neither vector is a scalar multiple of the other; equivalently, the only way to write ca+db=0c\,\mathbf{a} + d\,\mathbf{b} = \mathbf{0} is c=d=0c = d = 0.

Linearly dependent — one vector is a multiple of the other (or one of them is zero), so the pair carries only one direction.

Determinant — det[a  b]=a1b2a2b1\det[\mathbf{a}\;\mathbf{b}] = a_1 b_2 - a_2 b_1; its absolute value is the area of the parallelogram spanned by a\mathbf{a} and b\mathbf{b}, and it is zero exactly when the pair is dependent.

Rank — the number of independent directions in the pair: 22 if the span is the plane, 11 if it is a line, 00 if both vectors are zero.

Basis of R2\mathbb{R}^2 — any two independent vectors; every vector in the plane is then a unique combination of them.

Getting Started

The canvas shows two draggable vectors, a\mathbf{a} in orange and b\mathbf{b} in cyan, the parallelogram they span, and a lattice of dots at the combinations ca+dbc\,\mathbf{a} + d\,\mathbf{b} for small integer cc and dd. A label in the corner reports whether the span is the plane, a line, or just the origin.

Try this sequence to build intuition:

• Start on the Orthogonal preset. The parallelogram is filled, the lattice covers the plane, and the label reads span =R2= \mathbb{R}^2.
• Drag the tip of b\mathbf{b} toward the line through a\mathbf{a}. The parallelogram thins, its area in the live card shrinks, and the moment b\mathbf{b} lands on that line the fill vanishes, a dashed red span line appears, and the label switches to span == line.
• Press play in the animation panel. b\mathbf{b} orbits the origin at fixed length while the determinant traces a sine wave below; watch it cross zero exactly when b\mathbf{b} is parallel or anti-parallel to a\mathbf{a}.

The point: independence is not about the vectors being perpendicular or long. It is about whether they point in genuinely different directions.

Dragging the Vectors

Both tips are handles.

• Drag a\mathbf{a} — the orange vector. The parallelogram and the lattice follow it, and the angle arc between the two vectors updates.
• Drag b\mathbf{b} — the cyan vector. Same effect from the other side.
• Type coordinates — the vectors editor on the right accepts exact values, which is the way to hit an exact dependency such as b=2a\mathbf{b} = 2\mathbf{a}.

Dragging either vector clears the current preset and resets the sweep animation. Nothing else changes: the grid stays fixed, and only the pair and everything built from it move.

The Sweep Animation

The animation panel rotates b\mathbf{b} a full turn around the origin while a\mathbf{a} stays anchored, keeping the length of b\mathbf{b} fixed.

• The progress bar marks every angle at which the determinant is zero, and the header reports the next one coming
• The sparkline below draws det=absinφ\det = \|\mathbf{a}\| \, \|\mathbf{b}\| \sin\varphi as φ\varphi runs from 00 to 360°360°, with positive lobes in indigo and negative lobes in red
• The trail on the canvas leaves faded copies of past parallelograms and a dotted circle showing the orbit of b\mathbf{b}
• Step forward and back in 30°30° increments, scrub with the slider, or reset to clear the trail

The sweep makes one fact hard to miss: in a full turn the pair is dependent at exactly two angles, when b\mathbf{b} is parallel to a\mathbf{a} and when it is anti-parallel. Everywhere else the parallelogram has area and the span is the plane.

Preset Scenarios

The sidebar offers nine presets in three groups.

• Independent — orthogonal (90°90°), oblique (60°60°), near-aligned (15°15°), and the standard basis e1,e2\mathbf{e}_1, \mathbf{e}_2
• Dependent — b=2a\mathbf{b} = 2\mathbf{a}, b=1.5a\mathbf{b} = -1.5\mathbf{a}, and a pair on the same line with det=0\det = 0
• Edge cases — a=0\mathbf{a} = \mathbf{0} and b=0\mathbf{b} = \mathbf{0}

The four sections that follow take one representative from each situation and freeze it, so the picture and the numbers can be read together. The explanation card in the tool links back to the matching section for whichever preset is active.

Independent Pairs

The orthogonal preset is the clean case: a=(2,1)\mathbf{a} = (2, 1) and b=(1,2)\mathbf{b} = (-1, 2) meet at 90°90°, the parallelogram is a square of area 55, and the lattice fills the plane.

The determinant is 221(1)=52 \cdot 2 - 1 \cdot (-1) = 5, positive, so b\mathbf{b} sits counterclockwise from a\mathbf{a} and the rank is 22.
φabspan = ℝ²
Orthogonal pair, frozen

a = (2, 1) and b = (−1, 2) at 90°. The parallelogram is a filled square of area 5, the lattice covers the plane, and the label reads span = ℝ². Rank 2.

Every point in the plane is a unique combination ca+dbc\,\mathbf{a} + d\,\mathbf{b} of this pair, which is what makes it a basis. The oblique and standard-basis presets are the same situation with a different angle and different lengths; the only thing that matters for independence is that the angle is not 0° or 180°180°.

Perpendicularity is a bonus, not a requirement. An orthogonal basis makes coordinates easy to compute, because each coefficient is a projection, but a 60°60° pair spans the plane exactly as well.

Near-Dependence

The near-aligned preset puts b\mathbf{b} only 15°15° from a\mathbf{a}, both of length 22. The parallelogram is a thin sliver, but it has area: det=4sin15°1.04\det = 4 \sin 15° \approx 1.04, not zero.

The pair is independent, the span is still the whole plane, and the rank is still 22.
φabspan = ℝ²
Near-aligned pair, frozen

Only 15° apart. The parallelogram is a sliver of area 1.04 - small, but not zero. Still independent, still the whole plane, and one rounding error from collapse.

Mathematically nothing has changed from the orthogonal case. Practically, everything has. Reaching a point far from the line through a\mathbf{a} now requires huge coefficients of opposite sign, and a small error in either vector could close the angle to zero and collapse the rank.

This is why numerical linear algebra treats near-dependence as a warning. The condition of a basis, not just its independence, decides whether coordinates computed in it can be trusted, and the area of the parallelogram relative to the lengths of its sides is the plane's simplest measure of that.

Dependent Pairs

In the b=2a\mathbf{b} = 2\mathbf{a} preset, a=(1.5,1)\mathbf{a} = (1.5, 1) and b=(3,2)\mathbf{b} = (3, 2). The two arrows lie on one line, the parallelogram has collapsed to a segment, and a dashed red span line runs through the origin in their shared direction.

The determinant is 1.5213=01.5 \cdot 2 - 1 \cdot 3 = 0, the area is 00, and the rank is 11.
φabspan = line
b = 2a, frozen

Both arrows on one line, the parallelogram flattened to a segment, and the dashed red span line through the origin. Determinant 0, area 0, rank 1: every combination stays on that line.

Every combination ca+dbc\,\mathbf{a} + d\,\mathbf{b} equals (c+2d)a(c + 2d)\,\mathbf{a}, a multiple of a\mathbf{a}, so the span is the line and nothing off it can be reached. The lattice dots all fall on that line.

The anti-parallel preset, b=1.5a\mathbf{b} = -1.5\mathbf{a}, and the same-line preset make the same point with a negative scalar and with a fractional one. Dependence is about direction, not about sign or length: any non-zero scalar multiple, in either direction, collapses the span to a line.

Edge Cases

In the a=0\mathbf{a} = \mathbf{0} preset the orange vector has vanished into the origin and only b=(1.5,1)\mathbf{b} = (1.5, 1) remains. The span is the line through b\mathbf{b}, the determinant is 00, and the rank is 11.

Formally the pair is dependent, even though b\mathbf{b} by itself is a perfectly good vector.
abspan = line
a = 0, frozen

The orange vector has vanished into the origin. The span is the line through b alone, and the pair is formally dependent - the zero vector can never supply a direction.

The zero vector can never contribute a direction, and any set containing it is dependent by the definition: 10+0b=01 \cdot \mathbf{0} + 0 \cdot \mathbf{b} = \mathbf{0} is a combination with a non-zero coefficient that produces zero. The span is whatever the other vector spans.

Drag b\mathbf{b} to the origin as well and the rank drops to 00: the span is the single point {0}\{\mathbf{0}\}, and the corner label says so. That is the only case in which two vectors span nothing at all.

The Live Card

The card on the right reports the numbers behind the picture.

• a\|\mathbf{a}\| and b\|\mathbf{b}\| — the two lengths
• angle — the angle between the vectors, between 0° and 180°180°
• det[a  b]\det[\mathbf{a}\;\mathbf{b}] — the signed area, a1b2a2b1a_1 b_2 - a_2 b_1
• area — its absolute value, the area of the parallelogram
• rank — 22, 11 or 00

A status strip underneath reads INDEPENDENT, DEPENDENT or DEGENERATE with the matching span statement. The determinant is the single number that decides it: non-zero means rank 22 and the whole plane; zero means the parallelogram has collapsed.

Display Layer Toggles

Six chips switch the overlays on and off.

• grid — the fixed background grid
• parallelogram — the region {ca+db:0c,d1}\{c\,\mathbf{a} + d\,\mathbf{b} : 0 \leq c, d \leq 1\}, filled indigo when the determinant is positive, purple when negative, grey when zero
• lattice — the combinations ca+dbc\,\mathbf{a} + d\,\mathbf{b} for c,dc, d from 2-2 to 22; a sample of the span
• trail — the sweep animation's history
• span line — the dashed red line through the origin, drawn only when the pair is dependent
• labels — the vector names and the corner span label

Turning off everything except the lattice is a good way to see the span as a set of points: a plane-filling grid when independent, a single row of dots when dependent.

What Span Is

The span of a\mathbf{a} and b\mathbf{b} is the set of every vector that can be built from them by scaling and adding:

span{a,b}={ca+db:c,dR}\operatorname{span}\{\mathbf{a}, \mathbf{b}\} = \{\, c\,\mathbf{a} + d\,\mathbf{b} : c, d \in \mathbb{R} \,\}


In the plane there are only three possibilities. If the two vectors point in different directions, the combinations reach every point and the span is all of R2\mathbb{R}^2. If one is a multiple of the other, every combination stays on the line they share, and the span is that line. If both are zero, the span is the origin alone.

The lattice layer is a finite sample of the span, the combinations with cc and dd between 2-2 and 22. When the vectors are independent the dots fill out a slanted grid that would cover the plane if extended; when they are dependent the dots line up.

For span in general dimension and its role in defining subspaces, see the span theory page.

What Linear Independence Is

Two vectors are linearly independent when neither is a scalar multiple of the other. The formal definition says the same thing through the zero vector: a\mathbf{a} and b\mathbf{b} are independent when

ca+db=0forcesc=d=0c\,\mathbf{a} + d\,\mathbf{b} = \mathbf{0} \quad \text{forces} \quad c = d = 0


If some other choice of c,dc, d gives zero, say c0c \neq 0, then a=(d/c)b\mathbf{a} = -(d/c)\,\mathbf{b} and the vectors are multiples of each other. That is dependence.

Geometrically, independence means the pair carries two directions, so the parallelogram has area and the span is the plane. Dependence means one direction, a flat parallelogram, and a span that is only a line. Any set containing the zero vector is dependent, since 10+0b=01 \cdot \mathbf{0} + 0 \cdot \mathbf{b} = \mathbf{0} is a non-trivial combination.

Two independent vectors in R2\mathbb{R}^2 are automatically a basis: every vector in the plane is a unique combination of them. For independence of larger sets and the connection to rank, see the linear independence theory page.

The Determinant Test

For two vectors in the plane there is a one-number test:

det[a  b]=a1b2a2b1\det[\mathbf{a}\;\mathbf{b}] = a_1 b_2 - a_2 b_1


Its absolute value is the area of the parallelogram with sides a\mathbf{a} and b\mathbf{b}, and that area is also absinφ\|\mathbf{a}\| \, \|\mathbf{b}\| \sin\varphi with φ\varphi the angle between them. So

• det0\det \neq 0 — positive area, φ\varphi strictly between 0° and 180°180°, independent, rank 22
• det=0\det = 0 — zero area, φ=0°\varphi = 0° or 180°180° (or a zero vector), dependent, rank at most 11

The sign carries orientation: positive when b\mathbf{b} sits counterclockwise from a\mathbf{a}, negative when clockwise. The sweep animation's sparkline is this formula plotted against φ\varphi, and its zero crossings are the two dependent angles in every full turn.

The test is exact in arithmetic but delicate in floating point. The near-aligned preset has a determinant that is small but not zero; a rounding error of the same size would flip the verdict, which is why numerical software uses tolerances rather than testing for exact zero.