Skip to main content

Vector Spaces

A vector space is one of the most powerful ideas in all of mathematics: it takes the humble arrows you drew in physics class and abstracts them into a structure so general that polynomials, functions, matrices, and even solutions to differential equations all turn out to be "vectors." Once you see this, a single toolkit — span, independence, basis, dimension — suddenly applies everywhere at once. That is the whole point of linear algebra: identify the common skeleton, prove theorems once, and reuse them forever.

The magic is that a vector space asks for surprisingly little. You need a set of objects, a way to add two of them, and a way to scale one by a number. If those two operations behave sensibly — obeying a short list of axioms — you have a vector space, and every theorem of linear algebra is instantly available to you.

Learning Objectives

  • State the axioms defining a vector space and check whether a given set satisfies them.
  • Recognize and verify when a subset is a subspace.
  • Compute and interpret the span of a set of vectors.
  • Determine whether vectors are linearly independent or dependent.
  • Identify a basis and compute the dimension of a vector space.
  • Understand why these abstract ideas apply to polynomials, functions, and matrices — not just arrows.

Quick Answer

A vector space over a field (usually the real numbers R\mathbb{R}) is a set VV with two operations — vector addition and scalar multiplication — satisfying eight axioms (closure, associativity, commutativity, an additive identity and inverses, and compatibility laws for scaling). A subspace is a subset that is itself a vector space under the same operations; you only need to check that it is nonempty and closed under addition and scaling. The span of a set of vectors is all their linear combinations. Vectors are linearly independent if no one of them is a combination of the others. A basis is a linearly independent set that spans the whole space, and the number of vectors in any basis is the dimension. Remarkably, "vectors" can be arrows, polynomials, functions, or matrices — anything obeying the axioms.

Where It Came From

For most of history, a "vector" meant a directed arrow — a tool for physics and geometry. In the early 1800s, work on complex numbers (Argand, Wessel, Gauss) showed that points in a plane could be added and scaled, and William Rowan Hamilton's quaternions (1843) and Hermann Grassmann's remarkable Ausdehnungslehre ("Theory of Extension," 1844) pushed toward a genuinely algebraic, dimension-independent view of directed quantities. Grassmann's work was so abstract and so poorly written that it was largely ignored for decades — but it planted the crucial seed: that the rules of combination mattered more than any picture of arrows.

The decisive step came from the Italian mathematician Giuseppe Peano in 1888, in his book Calcolo geometrico secondo l'Ausdehnungslehre di H. Grassmann. Peano did something nobody had done cleanly before: he wrote down the axioms of a "linear system" as an abstract structure, defined entirely by how addition and scalar multiplication behave — with no reference to arrows or coordinates at all. He even explicitly noted that the collection of all real-valued functions forms such a system, and he understood the notion of dimension as possibly being infinite.

Why did this abstraction need to happen? Because mathematicians kept rediscovering the same patterns in unrelated places: forces in mechanics, solutions of linear differential equations, systems of linear equations, and Fourier's expansions of functions all obeyed identical "add and scale" rules. Proving the same facts over and over was wasteful. Peano's axioms let you prove a theorem once about any structure satisfying the rules. The idea matured through the early 20th century — Hermann Weyl used it in relativity (1918), and Stefan Banach and others built infinite-dimensional vector spaces into the foundation of functional analysis in the 1920s. Today the axiomatic definition is the standard entry point to the entire subject.

The Abstract Definition

Let VV be a set whose elements we call vectors, together with a field of scalars (take R\mathbb{R} throughout). We need two operations: addition u+v\mathbf{u} + \mathbf{v} producing a vector, and scalar multiplication cvc\mathbf{v} producing a vector. Then VV is a vector space if these eight axioms hold for all u,v,wV\mathbf{u}, \mathbf{v}, \mathbf{w} \in V and all scalars c,dc, d:

  1. Closure under addition: u+vV\mathbf{u} + \mathbf{v} \in V.
  2. Commutativity: u+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}.
  3. Associativity: (u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w}).
  4. Additive identity: there is a zero vector 0\mathbf{0} with v+0=v\mathbf{v} + \mathbf{0} = \mathbf{v}.
  5. Additive inverse: each v\mathbf{v} has a v-\mathbf{v} with v+(v)=0\mathbf{v} + (-\mathbf{v}) = \mathbf{0}.
  6. Closure under scaling: cvVc\mathbf{v} \in V.
  7. Distributive laws: c(u+v)=cu+cvc(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v} and (c+d)v=cv+dv(c + d)\mathbf{v} = c\mathbf{v} + d\mathbf{v}.
  8. Compatibility & identity: c(dv)=(cd)vc(d\mathbf{v}) = (cd)\mathbf{v} and 1v=v 1\mathbf{v} = \mathbf{v}.

Worked example — polynomials are vectors. Let P2P_2 be the set of all polynomials of degree at most 2, i.e. expressions a+bx+cx2a + bx + cx^2. Add them coefficient-wise and scale them the obvious way. Take p=2+3xx2\mathbf{p} = 2 + 3x - x^2 and q=1x+4x2\mathbf{q} = 1 - x + 4x^2. Then

p+q=(2+1)+(31)x+(1+4)x2=3+2x+3x2, \mathbf{p} + \mathbf{q} = (2+1) + (3-1)x + (-1+4)x^2 = 3 + 2x + 3x^2,

and 5p=10+15x5x2 5\mathbf{p} = 10 + 15x - 5x^2. The zero vector is the polynomial 0 0, and the negative of p\mathbf{p} is 23x+x2-2 - 3x + x^2. All eight axioms follow from the ordinary arithmetic of coefficients, so P2P_2 is a genuine vector space — even though none of its "vectors" is an arrow.

Subspaces

A subspace WW of a vector space VV is a subset that is itself a vector space under the same two operations. You don't need to re-check all eight axioms — most are inherited automatically. The Subspace Test says WW is a subspace exactly when:

  1. 0W\mathbf{0} \in W (so WW is nonempty and contains zero),
  2. WW is closed under addition (u,vWu+vW\mathbf{u}, \mathbf{v} \in W \Rightarrow \mathbf{u} + \mathbf{v} \in W),
  3. WW is closed under scalar multiplication (cvWc\mathbf{v} \in W).

Worked example. In R3\mathbb{R}^3, is the plane W={(x,y,z):x+2yz=0}W = \{(x, y, z) : x + 2y - z = 0\} a subspace? Check zero: 0+2(0)0=0 0 + 2(0) - 0 = 0, yes. Take two members u=(u1,u2,u3)\mathbf{u} = (u_1, u_2, u_3) and v=(v1,v2,v3)\mathbf{v} = (v_1, v_2, v_3) satisfying the equation. Their sum satisfies (u1+v1)+2(u2+v2)(u3+v3)=(u1+2u2u3)+(v1+2v2v3)=0+0=0(u_1+v_1) + 2(u_2+v_2) - (u_3+v_3) = (u_1 + 2u_2 - u_3) + (v_1 + 2v_2 - v_3) = 0 + 0 = 0. Scaling: (cu1)+2(cu2)(cu3)=c(u1+2u2u3)=c0=0 (cu_1) + 2(cu_2) - (cu_3) = c(u_1 + 2u_2 - u_3) = c \cdot 0 = 0. All three conditions hold, so WW is a subspace (a plane through the origin).

By contrast, the plane x+2yz=5x + 2y - z = 5 is not a subspace: it fails the very first test because (0,0,0)(0,0,0) does not satisfy 0=5 0 = 5. Any set that misses the origin cannot be a subspace.

Span

The span of vectors v1,,vk\mathbf{v}_1, \dots, \mathbf{v}_k is the set of all linear combinations c1v1++ckvkc_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k. The span is always a subspace — in fact it is the smallest subspace containing those vectors. When span(v1,,vk)=V\text{span}(\mathbf{v}_1, \dots, \mathbf{v}_k) = V, we say the vectors span VV: every vector in VV is reachable by combining them.

Worked example. Do v1=(1,1)\mathbf{v}_1 = (1, 1) and v2=(1,1)\mathbf{v}_2 = (1, -1) span R2\mathbb{R}^2? Given any target (a,b)(a, b), we need scalars with c1(1,1)+c2(1,1)=(a,b)c_1(1,1) + c_2(1,-1) = (a, b), i.e.

c1+c2=a,c1c2=b.c_1 + c_2 = a, \qquad c_1 - c_2 = b.

Adding gives 2c1=a+b 2c_1 = a + b, so c1=a+b2c_1 = \frac{a+b}{2}; subtracting gives c2=ab2c_2 = \frac{a-b}{2}. A solution exists for every (a,b)(a,b), so the two vectors span R2\mathbb{R}^2. For instance (4,2)(4, 2) is 3v1+1v2=(3,3)+(1,1)=(4,2) 3\mathbf{v}_1 + 1\mathbf{v}_2 = (3,3) + (1,-1) = (4,2). ✓

Linear Independence

Vectors are linearly independent if the only way to write c1v1++ckvk=0c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0} is with every ci=0c_i = 0. If some nontrivial combination gives zero, they are linearly dependent — meaning at least one vector is redundant, expressible using the others. Independence is the precise sense of "no wasted vectors."

Worked example. Are v1=(1,2,1)\mathbf{v}_1 = (1, 2, 1), v2=(2,1,0)\mathbf{v}_2 = (2, 1, 0), v3=(4,5,2)\mathbf{v}_3 = (4, 5, 2) independent? Set c1v1+c2v2+c3v3=0c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + c_3\mathbf{v}_3 = \mathbf{0}:

c1+2c2+4c3=0,2c1+c2+5c3=0,c1+0c2+2c3=0.c_1 + 2c_2 + 4c_3 = 0, \quad 2c_1 + c_2 + 5c_3 = 0, \quad c_1 + 0c_2 + 2c_3 = 0.

From the third equation, c1=2c3c_1 = -2c_3. Substitute into the first: 2c3+2c2+4c3=02c2+2c3=0c2=c3-2c_3 + 2c_2 + 4c_3 = 0 \Rightarrow 2c_2 + 2c_3 = 0 \Rightarrow c_2 = -c_3. Check the second: 2(2c3)+(c3)+5c3=4c3c3+5c3=0 2(-2c_3) + (-c_3) + 5c_3 = -4c_3 - c_3 + 5c_3 = 0 — satisfied for any c3c_3. Choosing c3=1c_3 = 1 gives (c1,c2,c3)=(2,1,1)(c_1, c_2, c_3) = (-2, -1, 1), a nontrivial solution. So the vectors are dependent; indeed v3=2v1+v2\mathbf{v}_3 = 2\mathbf{v}_1 + \mathbf{v}_2, since 2(1,2,1)+(2,1,0)=(4,5,2) 2(1,2,1) + (2,1,0) = (4,5,2). ✓

Basis and Dimension

A basis of a vector space is a set of vectors that is (a) linearly independent and (b) spans the space. A basis is the "just right" set — enough vectors to reach everything, but none wasted. The great structural theorem is that every basis of a given vector space has the same number of vectors, and that number is the dimension, dimV\dim V.

A basis gives every vector unique coordinates: if {b1,,bn}\{\mathbf{b}_1, \dots, \mathbf{b}_n\} is a basis, then each v\mathbf{v} can be written as c1b1++cnbnc_1\mathbf{b}_1 + \cdots + c_n\mathbf{b}_n in exactly one way. That uniqueness is what makes coordinates meaningful.

Worked example. The standard basis of R3\mathbb{R}^3 is e1=(1,0,0)\mathbf{e}_1 = (1,0,0), e2=(0,1,0)\mathbf{e}_2 = (0,1,0), e3=(0,0,1)\mathbf{e}_3 = (0,0,1); clearly (a,b,c)=ae1+be2+ce3(a,b,c) = a\mathbf{e}_1 + b\mathbf{e}_2 + c\mathbf{e}_3 uniquely, so dimR3=3\dim \mathbb{R}^3 = 3. But bases are not unique. Consider b1=(1,0,0)\mathbf{b}_1 = (1,0,0), b2=(1,1,0)\mathbf{b}_2 = (1,1,0), b3=(1,1,1)\mathbf{b}_3 = (1,1,1). To express (2,3,5)(2, 3, 5): we need c3=5c_3 = 5 (the only source of a third coordinate), then c2+c3=3c2=2c_2 + c_3 = 3 \Rightarrow c_2 = -2, then c1+c2+c3=2c1=2(2)5=1c_1 + c_2 + c_3 = 2 \Rightarrow c_1 = 2 - (-2) - 5 = -1. Check: 1(1,0,0)2(1,1,0)+5(1,1,1)=(12+5, 2+5, 5)=(2,3,5)-1(1,0,0) - 2(1,1,0) + 5(1,1,1) = (-1 - 2 + 5,\ -2 + 5,\ 5) = (2, 3, 5). ✓ Same space, different basis, still three vectors.

Note that P2P_2 has basis {1,x,x2}\{1, x, x^2\}, so dimP2=3\dim P_2 = 3, and the space of all polynomials has infinite dimension. Dimension counts degrees of freedom, regardless of what the "vectors" look like.

Real-World Applications

  • Computer graphics and games: every 3D scene lives in R3\mathbb{R}^3; rotations, scaling, and camera projections are linear maps expressed through bases and coordinate changes.
  • Data science and machine learning: a dataset with nn features is a collection of vectors in Rn\mathbb{R}^n; techniques like PCA find a lower-dimensional subspace (a smaller basis) that captures most of the variation.
  • Signal and image processing: Fourier and wavelet analysis treat signals as vectors in an infinite-dimensional function space and re-express them in a basis of sines/cosines — exactly Peano's insight that functions are vectors.
  • Engineering and physics: the solution set of a linear homogeneous differential equation is a vector space; finding a basis of solutions means solving the equation completely.
  • Error-correcting codes: digital codes (used in QR codes, deep-space communication) are subspaces of vector spaces over finite fields; the code's dimension controls how much data it carries.

Common Mistakes

Mistake 1: Thinking a subspace can miss the origin. Why it's wrong: Every subspace must contain 0\mathbf{0}, because scaling any member by 0 0 produces 0\mathbf{0} and closure requires it to be inside. Correction: A line or plane is a subspace only if it passes through the origin. The line y=x+1y = x + 1 is not a subspace; y=xy = x is.

Mistake 2: Confusing "spanning" with "independent." Why it's wrong: Spanning is about having enough vectors to reach everything; independence is about having no redundant vectors. They are different requirements. Correction: A basis needs both. In R2\mathbb{R}^2, the three vectors (1,0),(0,1),(1,1)(1,0), (0,1), (1,1) span but are dependent (too many); the single vector (1,0)(1,0) is independent but doesn't span (too few). Only a pair like (1,0),(0,1)(1,0),(0,1) does both.

Mistake 3: Believing dimension equals the number of vectors you happen to write down. Why it's wrong: You can list ten vectors in R3\mathbb{R}^3, but they can't be independent — dimension is the size of a basis, not of an arbitrary set. Correction: In an nn-dimensional space, any set of more than nn vectors is automatically dependent, and any set of fewer than nn vectors cannot span. Only exactly nn independent vectors form a basis.

Comparison and Connections

The four core concepts fit together tightly. Span and independence are opposite pressures; a basis is where they balance.

ConceptQuestion it answersToo few vectorsToo many vectors
Spanning setCan we reach every vector?Fails to spanFine, but redundant
Independent setAre any vectors redundant?Fine, but incompleteBecomes dependent
BasisBoth at once?Not a basisNot a basis
DimensionHow many in a basis?

A subspace relates to the whole space the way a smaller vector space sits inside a larger one, and its dimension is always \le that of the parent. Span produces subspaces; basis measures them. If you have studied systems of linear equations, notice that solving Ax=0A\mathbf{x} = \mathbf{0} is exactly finding a basis for a subspace (the null space), tying this abstract theory directly to concrete row reduction.

Practice Questions

Recall

State the three conditions of the Subspace Test. Answer: Contains the zero vector; closed under addition; closed under scalar multiplication.

Understanding

Explain in one sentence why {(1,0),(0,1),(2,3)}\{(1,0),(0,1),(2,3)\} cannot be a basis of R2\mathbb{R}^2. Answer: Because R2\mathbb{R}^2 has dimension 2, any set of three vectors in it must be linearly dependent, so it cannot be an (independent) basis — here (2,3)=2(1,0)+3(0,1)(2,3) = 2(1,0) + 3(0,1).

Application

Is W={(x,y,z):z=0}W = \{(x, y, z) : z = 0\} a subspace of R3\mathbb{R}^3? If so, give a basis and its dimension. Answer: Yes. It contains (0,0,0)(0,0,0) and is closed under both operations (the third coordinate stays 0 0). A basis is {(1,0,0),(0,1,0)}\{(1,0,0), (0,1,0)\}, so dimW=2\dim W = 2 (it is the xyxy-plane).

Analysis

Show that v1=(1,1,0)\mathbf{v}_1 = (1,1,0), v2=(0,1,1)\mathbf{v}_2 = (0,1,1), v3=(1,0,1)\mathbf{v}_3 = (1,0,1) form a basis of R3\mathbb{R}^3. Guidance: Set c1v1+c2v2+c3v3=0c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + c_3\mathbf{v}_3 = \mathbf{0}, giving c1+c3=0c_1 + c_3 = 0, c1+c2=0c_1 + c_2 = 0, c2+c3=0c_2 + c_3 = 0. Adding all three: 2(c1+c2+c3)=0 2(c_1+c_2+c_3)=0, so c1+c2+c3=0c_1+c_2+c_3=0; subtracting each equation from this forces c1=c2=c3=0c_1 = c_2 = c_3 = 0. So they are independent — and three independent vectors in the 3-dimensional space R3\mathbb{R}^3 automatically span it, hence form a basis.

FAQ

Is R2\mathbb{R}^2 a subspace of R3\mathbb{R}^3? Not literally, because their elements have different lengths (pairs vs. triples). But R3\mathbb{R}^3 contains a copy of R2\mathbb{R}^2, for example the plane {(x,y,0)}\{(x,y,0)\}, which is a genuine 2-dimensional subspace.

Can a vector space have dimension zero? Yes. The space {0}\{\mathbf{0}\} containing only the zero vector has dimension 0; its basis is the empty set. It is the smallest possible vector space.

Why do we insist scalars form a "field"? The axioms use division-like properties of scalars (every nonzero scalar has an inverse). Fields — like R\mathbb{R}, C\mathbb{C}, or the rationals — guarantee this. You can build vector spaces over finite fields too, which powers coding theory.

How can functions possibly be "vectors"? Because you can add two functions and scale a function, and those operations obey all eight axioms. Peano noticed this in 1888. Treating functions as vectors is the foundation of Fourier analysis and quantum mechanics.

What's the difference between a basis and a spanning set? Every basis is a spanning set, but not vice versa. A spanning set may contain redundant vectors; a basis is a spanning set with all redundancy removed, so it is also linearly independent.

Quick Revision

  • Vector space: set with addition and scalar multiplication obeying 8 axioms.
  • Subspace test: contains 0\mathbf{0}; closed under ++ and scaling.
  • Span: all linear combinations c1v1++ckvkc_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k — always a subspace.
  • Linearly independent: c1v1++ckvk=0c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0} only when all ci=0c_i = 0.
  • Basis: independent set that spans; gives unique coordinates.
  • Dimension: number of vectors in any basis (all bases have the same size).
  • In nn-dimensional space: more than nn vectors ⇒ dependent; fewer than nn ⇒ can't span; exactly nn independent ⇒ basis.
  • History: Peano axiomatized vector spaces in 1888, building on Grassmann.

Prerequisites

  • Systems of linear equations and matrices (null space, column space)
  • Linear transformations and change of basis

Next Topics

  • Eigenvalues and eigenvectors
  • Inner product spaces and orthogonality