Basis, Span and Orthogonality

Two vectors either reach every point in the plane or they reach a single line. Drag them and watch the moment it collapses.

Basis, Span and Orthogonality

This module needs JavaScript: the numbers are computed in the page rather than recorded.

Worth knowing

The span of a set of vectors is everything you can reach by scaling and adding them.
Two vectors in the plane span the whole plane unless they lie on the same line, in which case they span only that line.
The shaded parallelogram is the determinant. It hits zero exactly when the span collapses.
Orthogonal means the dot product is zero. It is not required for a basis, but it makes every calculation easier.

Overview

Span and dimension

The span of vectors is the set of all linear combinations of them. In the plane, two non-parallel vectors span every point; if they lie on the same line, their combinations reach only that line. The visualiser makes this loss of a direction visible as the parallelogram collapses.

span(v₁, …, vₖ) = {c₁v₁ + ··· + cₖvₖ}
In this guide
  1. When vectors form a basis
  2. Orthogonality simplifies coordinates
  3. Coordinates are coefficients in a chosen basis
  4. Try this above
  5. Sources and next steps

Basis, Span and Orthogonality

Span describes what vectors can build; a basis gives each point one unambiguous set of coordinates.

When vectors form a basis

A basis both spans the space and is linearly independent: none of its vectors can be made from the others. These conditions mean every point has exactly one coordinate representation in that basis. A two-dimensional space needs two basis vectors; a three-dimensional space needs three. The number is the dimension, independent of which basis you choose.

For example, (2, 1) and (1, 3) form a basis of the plane. To express (5, 5), solve 2a + b = 5 and a + 3b = 5, giving a = 2 and b = 1.

Orthogonality simplifies coordinates

Nonzero orthogonal vectors are independent, but a basis need not be orthogonal. In an orthonormal basis (orthogonal unit vectors), each coordinate is just a dot product with its basis vector. This is why QR decomposition and PCA use orthogonal directions; see vectors and the dot product, QR decomposition, and PCA's use of SVD.

Orthogonality does not fix every numerical problem: nearly dependent vectors can still make coordinate calculations sensitive to rounding. For a square matrix of basis columns, a zero determinant means dependence; a small determinant alone is not a reliable condition test in higher dimensions.

Coordinates are coefficients in a chosen basis

If the basis vectors are b₁=(2,1) and b₂=(1,3), the coordinates of v=(5,5) are the coefficients c₁,c₂ satisfying c₁b₁+c₂b₂=v. Solving 2c₁+c₂=5 and c₁+3c₂=5 gives c₁=2 and c₂=1. The point is still (5,5); the pair (2,1) records how much of each basis direction is used. Coordinates depend on the basis, while the geometric point does not.

If the vectors are dependent, coordinates may fail in two ways: a vector outside their span has no representation, and a vector inside the span may have more than one. An orthonormal basis avoids solving a general system because cᵢ=v·bᵢ. Orthogonal alone is not enough if the basis vectors have different lengths; divide by their squared lengths. Nearly dependent vectors can make coordinates extremely sensitive to small measurement or rounding changes even when an exact basis exists. Rank and QR decomposition describe these issues computationally.

Try this above

Drag one basis vector toward the other and watch the reachable region flatten. Then restore a non-parallel pair and compare the span with the whole plane.

A basis is useful because it gives every vector in the space one coordinate list, allowing vector operations to be reduced to coefficient arithmetic. Changing the basis changes coordinates but not the vector itself. For an orthonormal basis, the coordinate calculation uses dot products; for a general basis, solve a linear system. In computation, converting coordinates with a nearly singular basis can magnify numerical errors, so orthogonality is valuable for stability as well as convenience.

Sources and next steps

Check yourself

0 of 3

Answer without scrolling back up.

  1. Two vectors in the plane have determinant zero. What do they span?

  2. What does an orthonormal basis buy you?

  3. Why is a determinant of 0.001 a problem even though it is not zero?

Cheat sheet

Basis, Span and Orthogonality

Add vectors to a set and watch the span grow. See why orthogonal bases make projections simple and what happens when vectors depend.

MATHS · vizlearn.in/maths/basis_span_and_orthogonality.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.

Teaching a course with this? Individual teachers can use it freely; for a whole department or programme, see institutional licences.