← Back to modules

Vector Spaces

Subspaces, basis, dimension, rank, and the rank-nullity theorem.

Vector spaces are the abstract framework that unifies all of linear algebra. The same theory that applies to arrows in Rn\mathbb{R}^n applies equally to polynomials, matrices, functions, and signals. The key insight is that the 'size' of a space is fully captured by a single number: its dimension.

The four core concepts — span, linear independence, basis, dimension — provide the language for describing what a set of vectors can and cannot represent. The column space and null space give these abstract ideas concrete computational content.

Understanding vector spaces is the conceptual leap that separates people who use linear algebra from people who understand it. Every major theorem — eigenvalues, the SVD, least squares — is ultimately a statement about the structure of certain vector spaces.

Subspaces

A subspace of Rn\mathbb{R}^n is a subset VV satisfying three conditions: (1) 0V\mathbf{0} \in V, (2) if u,vV\mathbf{u},\mathbf{v}\in V then u+vV\mathbf{u}+\mathbf{v}\in V (closed under addition), and (3) if vV\mathbf{v}\in V and cRc\in\mathbb{R} then cvVc\mathbf{v}\in V (closed under scalar multiplication). The three conditions collapse into one: VV is a subspace iff every linear combination cu+dvc\mathbf{u}+d\mathbf{v} of vectors in VV stays in VV.

Examples of subspaces: {0}\{\mathbf{0}\}, any line through the origin, any plane through the origin, Rn\mathbb{R}^n itself, the null space of any matrix AA, and the column space of any matrix AA.

Non-examples: a line not through the origin (fails condition 1), a circle (not closed under addition), {(x,y):x0}\{(x,y): x\geq 0\} (fails condition 3 — multiply any vector by 1-1 and you leave the set). The origin condition is always the fastest check.

The intersection VWV\cap W of two subspaces is always a subspace. The union VWV\cup W is usually not — to get a subspace from two subspaces, take their sum V+W={v+w:vV,wW}V+W = \{\mathbf{v}+\mathbf{w}: \mathbf{v}\in V, \mathbf{w}\in W\}.

Helpful?

Span

The span of vectors {v1,,vk}\{\mathbf{v}_1,\ldots,\mathbf{v}_k\} is every possible linear combination: span{v1,,vk}={c1v1++ckvk:ciR}\text{span}\{\mathbf{v}_1,\ldots,\mathbf{v}_k\} = \{c_1\mathbf{v}_1+\cdots+c_k\mathbf{v}_k : c_i\in\mathbb{R}\}. It is always a subspace — it contains 0\mathbf{0} (set all ci=0c_i=0) and is closed under addition and scaling.

Geometrically in R3\mathbb{R}^3: one nonzero vector spans a line through the origin; two independent vectors span a plane; three independent vectors span all of R3\mathbb{R}^3.

To check if bspan{v1,,vk}\mathbf{b}\in\text{span}\{\mathbf{v}_1,\ldots,\mathbf{v}_k\}, set up [v1    vk    b][\mathbf{v}_1\;\cdots\;\mathbf{v}_k\;|\;\mathbf{b}] and row-reduce. If consistent, b\mathbf{b} is in the span.

The column space Col(A)\text{Col}(A) is the span of the columns of AA. The question 'is bCol(A)\mathbf{b}\in\text{Col}(A)?' is identical to 'is Ax=bA\mathbf{x}=\mathbf{b} consistent?'

Helpful?

Linear independence

Vectors {v1,,vk}\{\mathbf{v}_1,\ldots,\mathbf{v}_k\} are linearly independent if c1v1++ckvk=0c_1\mathbf{v}_1+\cdots+c_k\mathbf{v}_k=\mathbf{0} forces all ci=0c_i=0. If a non-trivial combination equals 0\mathbf{0}, the vectors are linearly dependent.

Dependence means redundancy: at least one vector is expressible as a combination of the others and adds no new direction. Removing it does not shrink the span.

Test: form A=[v1    vk]A=[\mathbf{v}_1\;\cdots\;\mathbf{v}_k] and row-reduce. The vectors are independent iff every column is a pivot column iff Null(A)={0}\text{Null}(A)=\{\mathbf{0}\}.

In Rn\mathbb{R}^n, any set with more than nn vectors is automatically dependent. You cannot have more than nn independent directions in nn-dimensional space.

Any set containing 0\mathbf{0} is automatically dependent: 10=01\cdot\mathbf{0}=\mathbf{0} provides a non-trivial combination equalling zero.

Helpful?

Basis and dimension

A basis for a subspace VV is a set of vectors that is both linearly independent and spans VV. It is simultaneously a minimal spanning set and a maximal independent set.

Every vector in VV has a unique representation as a linear combination of basis vectors. This uniqueness makes a basis a coordinate system: given basis {b1,,bn}\{\mathbf{b}_1,\ldots,\mathbf{b}_n\}, each vector has unique coordinates (c1,,cn)(c_1,\ldots,c_n).

The dimension of VV is the number of vectors in any basis. All bases for VV contain the same number of vectors — this is a theorem. Dimension is an intrinsic invariant of the space.

To find a basis for Col(A)\text{Col}(A): row-reduce AA and take the original columns (not the RREF columns) at pivot positions. To find a basis for Null(A)\text{Null}(A): row-reduce, express pivot variables in terms of free variables, and write the general solution as a linear combination of vectors.

Helpful?

Column space and null space

The column space Col(A)={Ax:xRn}\text{Col}(A) = \{A\mathbf{x}: \mathbf{x}\in\mathbb{R}^n\} is the span of the columns of AA — all possible outputs. Its dimension is rank(A)\text{rank}(A).

The null space Null(A)={x:Ax=0}\text{Null}(A) = \{\mathbf{x}: A\mathbf{x}=\mathbf{0}\} is the set of all inputs that map to zero. It is always a subspace of Rn\mathbb{R}^n, and its dimension is the nullity.

The rank-nullity theorem: rank(A)+nullity(A)=n\text{rank}(A)+\text{nullity}(A)=n. Every column either contributes a new independent direction (pivot, adds 11 to rank) or introduces a free variable (adds 11 to nullity).

The row space Row(A)=Col(AT)\text{Row}(A)=\text{Col}(A^T) has dimension rank(A)\text{rank}(A) as well. The fundamental theorem of linear algebra: Row(A)=Null(A)\text{Row}(A)^\perp = \text{Null}(A) and Col(A)=Null(AT)\text{Col}(A)^\perp = \text{Null}(A^T). The four fundamental subspaces partition Rn\mathbb{R}^n and Rm\mathbb{R}^m into complementary pairs.

Helpful?