Hyoungseo Son
Linear Algebra
Contents · Linear Algebra

Part 1 · Vectors & Spaces

  • Vectors, Spaces, and Basis

Part 4 · Orthogonality

Part 5 · Eigenvalues

Part 6 · Singular Value Decomposition

Part 1 · Vectors & Spaces

Vectors, Spaces, and Basis

6 min read

A vector is an arrow, but the real content of linear algebra is what you can build from a handful of them using only two operations: scaling and adding. The set of everything you can build is a span, an independent set that wastes nothing is a basis, and its size is the dimension. This part makes those four words precise.

Linear combinations and span

Given vectors v1,,vkRn\mathbf{v}_1,\dots,\mathbf{v}_k \in \mathbb{R}^n, a linear combination is any weighted sum

u=c1v1+c2v2++ckvk,ciR.\mathbf{u} = c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_k\mathbf{v}_k, \qquad c_i \in \mathbb{R}.

Their span is the set of all such combinations,

span{v1,,vk}={c1v1++ckvk  :  ciR}.\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\} = \Big\{\, c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k \;:\; c_i \in \mathbb{R} \,\Big\}.

A span is never a stray collection of points: it always passes through the origin (take all ci=0c_i = 0) and is closed under addition and scaling. Any set SRnS \subseteq \mathbb{R}^n with that closure property, meaning x,yS\mathbf{x},\mathbf{y}\in S and aRa\in\mathbb{R} imply x+yS\mathbf{x}+\mathbf{y}\in S and axSa\mathbf{x}\in S, is a subspace. Spans are exactly the subspaces of Rn\mathbb{R}^n.1

Independence

A set is linearly independent when the only way to write the zero vector is the trivial way:

c1v1++ckvk=0    c1==ck=0.c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0} \;\Longrightarrow\; c_1 = \cdots = c_k = 0.

Equivalently, no vector in the set is a linear combination of the others. If one of them were, say vj=ijaivi\mathbf{v}_j = \sum_{i\neq j} a_i\mathbf{v}_i, it would contribute nothing new to the span, and moving it to one side gives a nontrivial relation equal to 0\mathbf{0}. Dependence means redundancy.2

Basis and dimension

A basis of a subspace VV is an independent set that spans VV. Independence and spanning pull in opposite directions: spanning wants enough vectors to reach everything, independence forbids any wasted ones, and a basis is the exact balance. Its payoff is uniqueness. If {b1,,bm}\{\mathbf{b}_1,\dots,\mathbf{b}_m\} is a basis, every xV\mathbf{x}\in V has one and only one coordinate tuple (c1,,cm)(c_1,\dots,c_m) with x=icibi\mathbf{x} = \sum_i c_i\mathbf{b}_i.

Every basis of VV has the same number of elements; that number is the dimension dimV\dim V. So R2\mathbb{R}^2 has dimension 22, a line through the origin has dimension 11, and the trivial subspace {0}\{\mathbf{0}\} has dimension 00.

The 2D test: a determinant

In R2\mathbb{R}^2 the whole story reduces to a single number. Stack v=(v1,v2)\mathbf{v}=(v_1,v_2) and w=(w1,w2)\mathbf{w}=(w_1,w_2) as columns and take the determinant,

A=[v1w1v2w2],detA=v1w2v2w1.A = \begin{bmatrix} v_1 & w_1 \\ v_2 & w_2 \end{bmatrix}, \qquad \det A = v_1 w_2 - v_2 w_1.

Then detA0\det A \neq 0 if and only if v,w\mathbf{v},\mathbf{w} are independent, if and only if span{v,w}=R2\operatorname{span}\{\mathbf{v},\mathbf{w}\} = \mathbb{R}^2, so the pair is a basis. When detA=0\det A = 0 the vectors are parallel: one is a multiple of the other, and the span collapses from the whole plane down to a single line through the origin (or to {0}\{\mathbf{0}\} if both are zero). Drag the two arrows and watch the shaded span switch between the plane and a line as the determinant crosses zero:

Span of two vectors in the planeinteractive
v
(1.00, 0.00)
w
(1.00, 1.00)
det [v w]
1.00
relation
independent
span
ℝ²

Drag the arrowheads. The green point is c₁v + c₂w. When det ≠ 0 the combination can reach the whole plane; when det = 0 it is trapped on the line.

det = v_x·w_y − v_y·w_x. Nonzero: the vectors are independent and their span is all of ℝ² (shaded). Zero: they are dependent and the span is just the line through them. The green point is the combination c₁v + c₂w.

Worked example

Take v=(1,2)\mathbf{v} = (1,2) and w=(2,4)\mathbf{w} = (2,4). The determinant is

det[1224]=(1)(4)(2)(2)=0,\det\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} = (1)(4) - (2)(2) = 0,

so the pair is dependent, which we can see directly: w=2v\mathbf{w} = 2\mathbf{v}. Their span adds nothing beyond v\mathbf{v} alone,

span{v,w}={t(1,2):tR},\operatorname{span}\{\mathbf{v},\mathbf{w}\} = \{\, t\,(1,2) : t \in \mathbb{R} \,\},

a one-dimensional line, not the plane. Now take v=(1,0)\mathbf{v} = (1,0) and w=(1,1)\mathbf{w} = (1,1):

det[1101]=(1)(1)(0)(1)=10.\det\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} = (1)(1) - (0)(1) = 1 \neq 0.

This pair is independent, so span{v,w}=R2\operatorname{span}\{\mathbf{v},\mathbf{w}\} = \mathbb{R}^2 and {v,w}\{\mathbf{v},\mathbf{w}\} is a basis. Uniqueness is concrete here: solving c1(1,0)+c2(1,1)=(x,y)c_1(1,0) + c_2(1,1) = (x,y) gives (c1+c2,c2)=(x,y)(c_1 + c_2,\, c_2) = (x,y), hence

c2=y,c1=xy,c_2 = y, \qquad c_1 = x - y,

the one coordinate pair that reproduces any target (x,y)(x,y). For instance (3,1)(3,1) is 2v+1w2\mathbf{v} + 1\mathbf{w}, and nothing else works.

Footnotes

  1. Strang, Introduction to Linear Algebra (5th ed., 2016).

  2. Axler, Linear Algebra Done Right (3rd ed., 2015).