Finite-dimensional Vector Space

Elementry
Last updated: Tags: Linear Algebra

Prerequisites

Most of the mathematics behind computer graphics, machine learning, and physics simulations happens inside a vector space. Before you can work with matrices, transformations, or gradients, you need to understand the stage they perform on. That stage is a vector space.

Vectors: beyond arrows

You have probably seen vectors drawn as arrows. That picture is helpful for intuition, but the real idea is more general. A vector is any object that you can add to another vector and scale by a number — as long as those two operations obey a specific list of rules. The collection of all such vectors is called a vector space.

Under this definition, arrows in the plane are vectors. So are ordered lists of numbers. In more advanced settings, even functions and polynomials can be vectors. What ties them all together is the same short list of rules.

The formal definition

A vector space over the real numbers R\mathbb{R} is a set VV equipped with two operations:

  • Vector addition: for any u,vV\mathbf{u}, \mathbf{v} \in V, their sum u+vV\mathbf{u} + \mathbf{v} \in V.
  • Scalar multiplication: for any cRc \in \mathbb{R} and vV\mathbf{v} \in V, the product cvVc\mathbf{v} \in V.

These operations must satisfy eight axioms for all u,v,wV\mathbf{u}, \mathbf{v}, \mathbf{w} \in V and a,bRa, b \in \mathbb{R}:

#NameRule
1Associativity of addition(u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})
2Commutativity of additionu+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}
3Additive identityThere exists 0V\mathbf{0} \in V with v+0=v\mathbf{v} + \mathbf{0} = \mathbf{v}
4Additive inverseThere exists vV-\mathbf{v} \in V with v+(v)=0\mathbf{v} + (-\mathbf{v}) = \mathbf{0}
5Multiplicative identity1v=v1 \cdot \mathbf{v} = \mathbf{v}
6Associativity of scalar mult.a(bv)=(ab)va(b\mathbf{v}) = (ab)\mathbf{v}
7Distributivity over vector additiona(u+v)=au+ava(\mathbf{u} + \mathbf{v}) = a\mathbf{u} + a\mathbf{v}
8Distributivity over scalar addition(a+b)v=av+bv(a + b)\mathbf{v} = a\mathbf{v} + b\mathbf{v}

Every rule here is something you already take for granted with ordinary numbers. The point of listing them explicitly is that they are the only things you need — once you confirm these eight hold for any set and its operations, all the machinery of linear algebra comes along for free.

The canonical example: Rn\mathbb{R}^n

The most important vector space for a beginner is Rn\mathbb{R}^n — the set of all ordered nn-tuples of real numbers:

v=(v1, v2, , vn),viR\mathbf{v} = (v_1,\ v_2,\ \ldots,\ v_n), \quad v_i \in \mathbb{R}

Addition and scalar multiplication are defined component-wise:

u+v(u1+v1, u2+v2, , un+vn)\mathbf{u} + \mathbf{v} \coloneqq (u_1 + v_1,\ u_2 + v_2,\ \ldots,\ u_n + v_n) cv(cv1, cv2, , cvn)c\mathbf{v} \coloneqq (cv_1,\ cv_2,\ \ldots,\ cv_n)

The zero vector is 0=(0,0,,0)\mathbf{0} = (0, 0, \ldots, 0), and the additive inverse of v\mathbf{v} is v=(v1,,vn)-\mathbf{v} = (-v_1, \ldots, -v_n). Checking all eight axioms for these definitions is a good exercise that makes the abstract rules feel concrete.

When n=2n = 2 you recover the familiar 2-D plane; when n=3n = 3, ordinary 3-D space. Nothing in the definition stops you from going higher.

Span, basis, and dimension

Span

Given a set of vectors {v1,,vk}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} in a vector space VV, their span is the set of all linear combinations you can form from them:

span{v1,,vk}{c1v1++ckvkc1,,ckR}\operatorname{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} \coloneqq \{\, c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k \mid c_1, \ldots, c_k \in \mathbb{R} \,\}

If the span equals all of VV, then {v1,,vk}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} spans VV — every vector in the space can be built from these vectors.

Linear independence

A set of vectors is linearly independent if none of them can be written as a linear combination of the others. Equivalently, the only solution to:

c1v1+c2v2++ckvk=0c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_k\mathbf{v}_k = \mathbf{0}

is c1=c2==ck=0c_1 = c_2 = \cdots = c_k = 0. If any cic_i can be non-zero, the set is linearly dependent — it contains redundancy.

Basis and dimension

A basis of VV is a set of vectors that is both linearly independent and spans VV. Think of it as the smallest set from which every vector in VV can be assembled exactly once.

A remarkable fact: every basis of a given vector space has exactly the same number of vectors. That number is called the dimension of VV, written dim(V)\dim(V).

For Rn\mathbb{R}^n, the standard basis is:

e1=(1,0,,0),e2=(0,1,,0),,en=(0,0,,1)\mathbf{e}_1 = (1, 0, \ldots, 0),\quad \mathbf{e}_2 = (0, 1, \ldots, 0),\quad \ldots,\quad \mathbf{e}_n = (0, 0, \ldots, 1)

This basis contains nn vectors, so dim(Rn)=n\dim(\mathbb{R}^n) = n. Any vector (v1,,vn)(v_1, \ldots, v_n) decomposes as:

v=v1e1+v2e2++vnen\mathbf{v} = v_1\mathbf{e}_1 + v_2\mathbf{e}_2 + \cdots + v_n\mathbf{e}_n

The coordinates v1,,vnv_1, \ldots, v_n are exactly the coefficients of v\mathbf{v} in the standard basis.

Finite-dimensional

A vector space is finite-dimensional if it has a finite basis — equivalently, if dim(V)<\dim(V) < \infty. All of Rn\mathbb{R}^n for concrete values of nn are finite-dimensional. Spaces of functions are typically infinite-dimensional, but those come later.

Subspaces

A subspace of VV is a non-empty subset WVW \subseteq V that is itself a vector space under the same operations. You don’t need to recheck all eight axioms — you only need three:

  1. 0W\mathbf{0} \in W
  2. u+vW\mathbf{u} + \mathbf{v} \in W for all u,vW\mathbf{u}, \mathbf{v} \in W (closed under addition)
  3. cvWc\mathbf{v} \in W for all cRc \in \mathbb{R}, vW\mathbf{v} \in W (closed under scalar multiplication)

The remaining axioms are inherited automatically from VV.

Some examples in R3\mathbb{R}^3: the origin {0}\{\mathbf{0}\} (dimension 0), any line through the origin (dimension 1), any plane through the origin (dimension 2), and R3\mathbb{R}^3 itself (dimension 3) are all subspaces. Notice the requirement “through the origin” — a plane that misses the origin does not contain 0\mathbf{0} and fails condition 1.

Summary

  • A vector space over R\mathbb{R} is a set with addition and scalar multiplication satisfying eight axioms.
  • Rn\mathbb{R}^n — ordered nn-tuples with component-wise operations — is the prototypical example; dim(Rn)=n\dim(\mathbb{R}^n) = n.
  • The span of a set is all linear combinations you can form from it.
  • A set is linearly independent if no vector in it is a linear combination of the others.
  • A basis is a linearly independent spanning set; all bases of VV have the same size, called the dimension.
  • A subspace is a subset closed under addition, scalar multiplication, and containing 0\mathbf{0}.
  • Finite-dimensional means the space has a finite basis.