Skip to content

Linear Independence, Span, Basis, and Dimension

2.1 Linear Independence

A set of vectors {v1,v2,,vk}V\{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\} \subseteq V is linearly Independent if the equation

α1v1+α2v2++αkvk=0\alpha_1 \mathbf{v}_1 + \alpha_2 \mathbf{v}_2 + \cdots + \alpha_k \mathbf{v}_k = \mathbf{0}

Implies α1=α2==αk=0\alpha_1 = \alpha_2 = \cdots = \alpha_k = 0. Otherwise the set is linearly dependent.

Proposition 2.1 (Equivalent formulations). The following are equivalent for vectors v1,,vkV\mathbf{v}_1, \ldots, \mathbf{v}_k \in V:

  1. {v1,,vk}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} is linearly independent.
  2. No vj\mathbf{v}_j can be written as a linear combination of the remaining vectors.
  3. If i=1kαivi=i=1kβivi\sum_{i=1}^k \alpha_i \mathbf{v}_i = \sum_{i=1}^k \beta_i \mathbf{v}_iThen αi=βi\alpha_i = \beta_i for all ii.

Proof. (1 \Rightarrow 2): If vj=ijαivi\mathbf{v}_j = \sum_{i \neq j} \alpha_i \mathbf{v}_iThen ijαivivj=0\sum_{i \neq j} \alpha_i \mathbf{v}_i - \mathbf{v}_j = \mathbf{0} gives a non-trivial linear Dependence, contradicting (1).

(2 \Rightarrow 3): If (αiβi)vi=0\sum (\alpha_i - \beta_i)\mathbf{v}_i = \mathbf{0}Then by linear Independence (which follows from (2)), αi=βi\alpha_i = \beta_i for all ii.

(3 \Rightarrow 1): If αivi=0=0vi\sum \alpha_i \mathbf{v}_i = \mathbf{0} = \sum 0 \cdot \mathbf{v}_i Then by (3), αi=0\alpha_i = 0 for all ii. \blacksquare

2.2 Span

The span of a set SVS \subseteq VDenoted span(S)\mathrm{span}(S)Is the set of all finite linear Combinations of elements of SS:

span(S)={i=1kαivi:kN,αiF,viS}\mathrm{span}(S) = \left\{ \sum_{i=1}^k \alpha_i \mathbf{v}_i : k \in \mathbb{N},\, \alpha_i \in F,\, \mathbf{v}_i \in S \right\}

Proposition 2.2. span(S)\mathrm{span}(S) is always a subspace of VV. In fact, span(S)\mathrm{span}(S) is The smallest subspace containing SS: if WW is any subspace with SWS \subseteq WThen span(S)W\mathrm{span}(S) \subseteq W.

Proof. span(S)\mathrm{span}(S) is non-empty since 0=0v\mathbf{0} = 0 \cdot \mathbf{v} for any vS\mathbf{v} \in S. Closure under addition and scalar multiplication follows directly from the Definition of linear combinations. For minimality, any subspace WW containing SS must contain all Finite linear combinations of elements of SS by Proposition 1.2, so span(S)W\mathrm{span}(S) \subseteq W. \blacksquare

2.3 Basis and Dimension

A set BVB \subseteq V is a basis for VV if:

  1. BB is linearly independent, and
  2. span(B)=V\mathrm{span}(B) = V.

Theorem 2.1. Every vector space has a basis. All bases of a finite-dimensional vector space have The same number of elements.

The dimension of VVDenoted dim(V)\dim(V)Is the cardinality of any basis for VV.

2.4 Steinitz Exchange Lemma

Lemma 2.3 (Steinitz Exchange Lemma). Let {u1,,uk}\{\mathbf{u}_1, \ldots, \mathbf{u}_k\} be a linearly Independent set in VVAnd let {w1,,wm}\{\mathbf{w}_1, \ldots, \mathbf{w}_m\} be a spanning set for VV. Then kmk \leq mAnd after relabelling the wj\mathbf{w}_jThe set

{u1,,uk,wk+1,,wm}\{\mathbf{u}_1, \ldots, \mathbf{u}_k, \mathbf{w}_{k+1}, \ldots, \mathbf{w}_m\}

Also spans VV.

Proof. We proceed by induction on kk. For k=0k = 0 there is nothing to prove.

Assume the result holds for k1k - 1. Since {u1,,uk}\{\mathbf{u}_1, \ldots, \mathbf{u}_k\} is linearly Independent, uk0\mathbf{u}_k \neq \mathbf{0} and ukspan{w1,,wm}\mathbf{u}_k \in \mathrm{span}\{\mathbf{w}_1, \ldots, \mathbf{w}_m\} Since the wj\mathbf{w}_j span VV. Therefore uk=j=1mαjwj\mathbf{u}_k = \sum_{j=1}^m \alpha_j \mathbf{w}_j for some αjF\alpha_j \in FAnd not all αj\alpha_j are zero.

After relabelling, assume α10\alpha_1 \neq 0. Then w1=α11(ukj=2mαjwj)\mathbf{w}_1 = \alpha_1^{-1}(\mathbf{u}_k - \sum_{j=2}^m \alpha_j \mathbf{w}_j) So w1span{uk,w2,,wm}\mathbf{w}_1 \in \mathrm{span}\{\mathbf{u}_k, \mathbf{w}_2, \ldots, \mathbf{w}_m\}. It follows that

span{w1,,wm}=span{uk,w2,,wm}=V\mathrm{span}\{\mathbf{w}_1, \ldots, \mathbf{w}_m\} = \mathrm{span}\{\mathbf{u}_k, \mathbf{w}_2, \ldots, \mathbf{w}_m\} = V

Now {u1,,uk1}\{\mathbf{u}_1, \ldots, \mathbf{u}_{k-1}\} is linearly independent and {uk,w2,,wm}\{\mathbf{u}_k, \mathbf{w}_2, \ldots, \mathbf{w}_m\} spans VV. By the inductive hypothesis, k1m1k - 1 \leq m - 1 (so kmk \leq m) and after relabelling, {u1,,uk1,wk,,wm}\{\mathbf{u}_1, \ldots, \mathbf{u}_{k-1}, \mathbf{w}_k, \ldots, \mathbf{w}_m\} spans VV. Since uk\mathbf{u}_k is already in this span, the full set {u1,,uk,wk+1,,wm}\{\mathbf{u}_1, \ldots, \mathbf{u}_k, \mathbf{w}_{k+1}, \ldots, \mathbf{w}_m\} also spans VV. \blacksquare

Theorem 2.4 (Dimension is Well-Defined). If VV is finite-dimensional, then any two bases of VV have the same number of elements.

Proof. Let B1\mathcal{B}_1 and B2\mathcal{B}_2 be two bases with B1=k\lvert\mathcal{B}_1\rvert = k and B2=m\lvert\mathcal{B}_2\rvert = m. Applying the Steinitz exchange lemma with B1\mathcal{B}_1 as the Independent set and B2\mathcal{B}_2 as the spanning set gives kmk \leq m. Swapping roles gives mkm \leq k. Hence k=mk = m. \blacksquare

2.5 Dimension Formula

Theorem 2.5 (Dimension Formula). If UU and WW are subspaces of a finite-dimensional vector Space VVThen

dim(U+W)=dim(U)+dim(W)dim(UW)\dim(U + W) = \dim(U) + \dim(W) - \dim(U \cap W)

2.6 Rank-Nullity Theorem

Theorem 2.6 (Rank-Nullity Theorem). Let AMm×n(F)A \in \mathcal{M}_{m \times n}(F). Then

rank(A)+nullity(A)=n\mathrm{rank}(A) + \mathrm{nullity}(A) = n

Where rank(A)=dim(col(A))\mathrm{rank}(A) = \dim(\mathrm{col}(A)) and nullity(A)=dim(null(A))\mathrm{nullity}(A) = \dim(\mathrm{null}(A)).

Proof. Let {v1,,vk}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} be a basis for null(A)\mathrm{null}(A)Where k=nullity(A)k = \mathrm{nullity}(A). Extend this to a basis {v1,,vk,vk+1,,vn}\{\mathbf{v}_1, \ldots, \mathbf{v}_k, \mathbf{v}_{k+1}, \ldots, \mathbf{v}_n\} for FnF^n.

We claim that {Avk+1,,Avn}\{A\mathbf{v}_{k+1}, \ldots, A\mathbf{v}_n\} is a basis for col(A)\mathrm{col}(A).

Spanning: For any ycol(A)\mathbf{y} \in \mathrm{col}(A)There exists xFn\mathbf{x} \in F^n With y=Ax\mathbf{y} = A\mathbf{x}. Writing x=i=1nαivi\mathbf{x} = \sum_{i=1}^n \alpha_i \mathbf{v}_i

y=A(i=1nαivi)=i=1nαiAvi=i=k+1nαiAvi\mathbf{y} = A\left(\sum_{i=1}^n \alpha_i \mathbf{v}_i\right) = \sum_{i=1}^n \alpha_i A\mathbf{v}_i = \sum_{i=k+1}^n \alpha_i A\mathbf{v}_i

Since Avi=0A\mathbf{v}_i = \mathbf{0} for iki \leq k.

Linear independence: If i=k+1nαiAvi=0\sum_{i=k+1}^n \alpha_i A\mathbf{v}_i = \mathbf{0}Then A(i=k+1nαivi)=0A\left(\sum_{i=k+1}^n \alpha_i \mathbf{v}_i\right) = \mathbf{0}So i=k+1nαivinull(A)\sum_{i=k+1}^n \alpha_i \mathbf{v}_i \in \mathrm{null}(A). Since {v1,,vk}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} Is a basis for the null space, i=k+1nαivi=i=1kβivi\sum_{i=k+1}^n \alpha_i \mathbf{v}_i = \sum_{i=1}^k \beta_i \mathbf{v}_i For some βi\beta_iGiving i=1n(βi)vi+i=k+1nαivi=0\sum_{i=1}^n (-\beta_i)\mathbf{v}_i + \sum_{i=k+1}^n \alpha_i \mathbf{v}_i = \mathbf{0}. By linear independence of the full basis, αi=0\alpha_i = 0 for all ik+1i \geq k + 1.

Therefore rank(A)=nk=nnullity(A)\mathrm{rank}(A) = n - k = n - \mathrm{nullity}(A). \blacksquare

2.7 Worked Examples

Problem. Find a basis for and the dimension of the subspace W=span{(1,2,1,0),(3,1,0,2),(1,3,2,2)}W = \mathrm{span}\{(1, 2, -1, 0), (3, 1, 0, 2), (-1, 3, -2, -2)\} of R4\mathbb{R}^4.

Solution

Form the matrix whose rows are the given vectors and row-reduce:

(121031021322)R23R1(121005321322)\begin{pmatrix} 1 & 2 & -1 & 0 \\ 3 & 1 & 0 & 2 \\ -1 & 3 & -2 & -2 \end{pmatrix} \xrightarrow{R_2 - 3R_1} \begin{pmatrix} 1 & 2 & -1 & 0 \\ 0 & -5 & 3 & 2 \\ -1 & 3 & -2 & -2 \end{pmatrix}

R3+R1(121005320532)R3+R2(121005320000)\xrightarrow{R_3 + R_1} \begin{pmatrix} 1 & 2 & -1 & 0 \\ 0 & -5 & 3 & 2 \\ 0 & 5 & -3 & -2 \end{pmatrix} \xrightarrow{R_3 + R_2} \begin{pmatrix} 1 & 2 & -1 & 0 \\ 0 & -5 & 3 & 2 \\ 0 & 0 & 0 & 0 \end{pmatrix}

The row echelon form has two non-zero rows, so dim(W)=2\dim(W) = 2. A basis is given by the non-zero Rows: {(1,2,1,0),(0,5,3,2)}\{(1, 2, -1, 0), (0, -5, 3, 2)\}. \blacksquare

Problem. Find a basis for the null space of

A=(121124010013)A = \begin{pmatrix} 1 & 2 & 1 & -1 \\ 2 & 4 & 0 & 1 \\ 0 & 0 & 1 & 3 \end{pmatrix}

Solution

Row-reduce AA:

(121124010013)R22R1(121100230013)R3+R2/2(121100230009/2)\begin{pmatrix} 1 & 2 & 1 & -1 \\ 2 & 4 & 0 & 1 \\ 0 & 0 & 1 & 3 \end{pmatrix} \xrightarrow{R_2 - 2R_1} \begin{pmatrix} 1 & 2 & 1 & -1 \\ 0 & 0 & -2 & 3 \\ 0 & 0 & 1 & 3 \end{pmatrix} \xrightarrow{R_3 + R_2/2} \begin{pmatrix} 1 & 2 & 1 & -1 \\ 0 & 0 & -2 & 3 \\ 0 & 0 & 0 & 9/2 \end{pmatrix}

This has pivots in columns 1, 3, and 4. The free variable is x2x_2. Setting x2=tx_2 = t and Back-substituting: x4=0x_4 = 0, x3=0x_3 = 0, x1=2tx_1 = -2t. The null space is {t(2,1,0,0):tR}\{t(-2, 1, 0, 0) : t \in \mathbb{R}\}With basis {(2,1,0,0)}\{(-2, 1, 0, 0)\} and dimension 1. \blacksquare

Problem. Determine whether the vectors v1=(1,2,3)\mathbf{v}_1 = (1, 2, 3), v2=(4,5,6)\mathbf{v}_2 = (4, 5, 6), v3=(7,8,9)\mathbf{v}_3 = (7, 8, 9) form a basis For R3\mathbb{R}^3.

Solution

Form the matrix A=[v1v2v3]A = [\mathbf{v}_1 \mid \mathbf{v}_2 \mid \mathbf{v}_3] and compute Its determinant:

det(A)=1(4548)2(3642)+3(3235)=3+129=0\det(A) = 1(45 - 48) - 2(36 - 42) + 3(32 - 35) = -3 + 12 - 9 = 0

Since det(A)=0\det(A) = 0The columns are linearly dependent, so {v1,v2,v3}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\} Is not a basis. In fact, v32v2+v1=0\mathbf{v}_3 - 2\mathbf{v}_2 + \mathbf{v}_1 = \mathbf{0}.

\blacksquare

:::tip To check if nn vectors in Rn\mathbb{R}^n form a basis, compute the determinant of the matrix whose Columns are those vectors. If det0\det \neq 0They form a basis; if det=0\det = 0They do not.

Problem. Let V=P3(R)V = \mathcal{P}_3(\mathbb{R}) (polynomials of degree at most 3). Find the dimension Of the subspace W={pP3:p(1)=p(1)=0}W = \{p \in \mathcal{P}_3 : p(1) = p(-1) = 0\}.

Solution

Write p(x)=ax3+bx2+cx+dp(x) = ax^3 + bx^2 + cx + d. The conditions are:

p(1)=a+b+c+d=0p(1) = a + b + c + d = 0 and p(1)=a+bc+d=0p(-1) = -a + b - c + d = 0.

Adding: 2b+2d=02b + 2d = 0So d=bd = -b. Subtracting: 2a+2c=02a + 2c = 0So c=ac = -a.

Therefore p(x)=ax3+bx2axb=a(x3x)+b(x21)p(x) = ax^3 + bx^2 - ax - b = a(x^3 - x) + b(x^2 - 1).

A basis for WW is {x3x,x21}\{x^3 - x, x^2 - 1\}And dim(W)=2\dim(W) = 2.

If you get this wrong, revise: Section 2.7 (Worked Examples).

2.8 Common Pitfalls

  • Linear independence of infinitely many vectors. The definition only directly applies to finite subsets. A set SS is linearly independent if every finite subset of SS is linearly independent.
  • Dimension and spanning. A set of nn vectors in Rn\mathbb{R}^n that spans Rn\mathbb{R}^n must be linearly independent (and hence a basis). Similarly, nn linearly independent vectors in Rn\mathbb{R}^n must span Rn\mathbb{R}^n.
  • The empty set spans {0}\{\mathbf{0}\}. The span of the empty set is the trivial subspace, and the empty set is a basis for {0}\{\mathbf{0}\}. The dimension of the zero space is 0.

:::