Skip to main content
Mathematics LibreTexts

4.8: Subspaces and Bases

  • Page ID
    197435
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives
    • Define and identify subspaces within Rn\.
    • Analyze and verify if a set of vectors forms a basis for a given subspace.
    • Determine the dimension of a subspace and extend or shrink bases as needed.

    The goal of this section is to develop an understanding of a subspace of \(\mathbb{R}^n\).

    A subspace is simply a set of vectors with the property that linear combinations of these vectors remain in the set. Geometrically in \(\mathbb{R}^{3}\), it turns out that a subspace can be represented by either the origin as a single point, lines and planes which contain the origin, or the entire space \(\mathbb{R}^{3}\).

    Definition \(\PageIndex{1}\): Subspace

    Let \(V\) be a nonempty collection of vectors in \(\mathbb{R}^{n}.\) Then \(V\) is called a subspace if whenever \(a\) and \(b\) are scalars and \(\vec{u}\) and \(\vec{v}\) are vectors in \(V,\) the linear combination \(a \vec{u}+ b \vec{v}\) is also in \(V\).

    Sometimes, instead of using the definition of subspace, it's easier to use the following test, especially the first part. Since a subspace must be closed under all possible linear combinations, it must contain the trivial linear combination, \(\vec 0\). Hence, if a set doesn't contain \(\vec 0\), it cannot possibly be a subspace.

    Theorem \(\PageIndex{1}\): Subspace Test

    A subset \(V\) of \(\mathbb{R}^n\) is a subspace of \(\mathbb{R}^n\) if

    1. the zero vector of \(\mathbb{R}^n\), \(\vec{0}_n\), is in \(V\);
    2. \(V\) is closed under addition, i.e., for all \(\vec{u},\vec{w}\in V\), \(\vec{u}+\vec{w}\in V\);
    3. \(V\) is closed under scalar multiplication, i.e., for all \(\vec{u}\in V\) and \(k\in\mathbb{R}\), \(k\vec{u}\in V\).

    Consider the following example of a line in \(\mathbb{R}^3\).

    Example \(\PageIndex{1}\): Subspace of \(\mathbb{R}^3\)

    In \(\mathbb{R}^3\), the line \(L\) through the origin that is parallel to the vector \({\vec{d}}= \left[ \begin{array}{r} -5 \\ 1 \\ -4 \end{array}\right]\) has (vector) equation \(\left[ \begin{array}{r} x \\ y \\ z \end{array}\right] =t\left[ \begin{array}{r} -5 \\ 1 \\ -4 \end{array}\right], t\in\mathbb{R}\), so \[L=\left\{ t{\vec{d}} ~|~ t\in\mathbb{R}\right\}.\nonumber \] Then \(L\) is a subspace of \(\mathbb{R}^3\).

    Solution

    Using the subspace test given above we can verify that \(L\) is a subspace of \(\mathbb{R}^3\).

    • First: \(\vec{0}_3\in L\) since \(0\vec{d}=\vec{0}_3\).
    • Suppose \(\vec{u},\vec{v}\in L\). Then by definition, \(\vec{u}=s\vec{d}\) and \(\vec{v}=t\vec{d}\), for some \(s,t\in\mathbb{R}\). Thus \[\vec{u}+\vec{v} = s\vec{d}+t\vec{d} = (s+t)\vec{d}.\nonumber \] Since \(s+t\in\mathbb{R}\), \(\vec{u}+\vec{v}\in L\); i.e., \(L\) is closed under addition.
    • Suppose \(\vec{u}\in L\) and \(k\in\mathbb{R}\) (\(k\) is a scalar). Then \(\vec{u}=t\vec{d}\), for some \(t\in\mathbb{R}\), so \[k\vec{u}=k(t\vec{d})=(kt)\vec{d}.\nonumber \] Since \(kt\in\mathbb{R}\), \(k\vec{u}\in L\); i.e., \(L\) is closed under scalar multiplication.

    Since \(L\) satisfies all conditions of the subspace test, it follows that \(L\) is a subspace.

    Theorem \(\PageIndex{2}\): Subspaces are Spans

    Let \(V\) be a nonempty collection of vectors in \(\mathbb{R}^{n}.\) Then \(V\) is a subspace of \(\mathbb{R}^{n}\) if and only if there exist vectors \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\) in \(V\) such that \[V= \mathrm{span}\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\nonumber \] Furthermore, let \(W\) be another subspace of \(\mathbb{R}^n\) and suppose \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\} \in W\). Then it follows that \(V\) is a subset of \(W\).

    Note that since \(W\) is arbitrary, the statement that \(V \subseteq W\) means that any other subspace of \(\mathbb{R}^n\) that contains these vectors will also contain \(V\).

    Proof

    We first show that if \(V\) is a subspace, then it can be written as \(V= \mathrm{span}\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\). Pick a vector \(\vec{u}_{1}\) in \(V\). If \(V= \mathrm{span}\left\{ \vec{u}_{1}\right\} ,\) then you have found your list of vectors and are done. If \(V\neq \mathrm{span}\left\{ \vec{u}_{1}\right\} ,\) then there exists \(\vec{u}_{2}\) a vector of \(V\) which is not in \(\mathrm{span}\left\{ \vec{u}_{1}\right\} .\) Consider \(\mathrm{span}\left\{ \vec{u}_{1},\vec{u}_{2}\right\}.\) If \(V=\mathrm{span}\left\{ \vec{u}_{1},\vec{u}_{2}\right\}\), we are done. Otherwise, pick \(\vec{u}_{3}\) not in \(\mathrm{span}\left\{ \vec{u}_{1},\vec{u}_{2}\right\} .\) Continue this way. Note that since \(V\) is a subspace, these spans are each contained in \(V\). The process must stop with \(\vec{u}_{k}\) for some \(k\leq n\) by Corollary \(\PageIndex{1}\), and thus \(V=\mathrm{span}\left\{ \vec{u}_{1},\cdots , \vec{u}_{k}\right\}\).

    Now suppose \(V=\mathrm{span}\left\{ \vec{u}_{1},\cdots , \vec{u}_{k}\right\}\), we must show this is a subspace. So let \(\sum_{i=1}^{k}c_{i}\vec{u}_{i}\) and \(\sum_{i=1}^{k}d_{i}\vec{u}_{i}\) be two vectors in \(V\), and let \(a\) and \(b\) be two scalars. Then \[a \sum_{i=1}^{k}c_{i}\vec{u}_{i}+ b \sum_{i=1}^{k}d_{i}\vec{u}_{i}= \sum_{i=1}^{k}\left( a c_{i}+b d_{i}\right) \vec{u}_{i}\nonumber \] which is one of the vectors in \(\mathrm{span}\left\{ \vec{u}_{1},\cdots , \vec{u}_{k}\right\}\) and is therefore contained in \(V\). This shows that \(\mathrm{span}\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\) has the properties of a subspace.

    To prove that \(V \subseteq W\), we prove that if \(\vec{u}_i\in V\), then \(\vec{u}_i \in W\).

    Suppose \(\vec{u}\in V\). Then \(\vec{u}=a_1\vec{u}_1 + a_2\vec{u}_2 + \cdots + a_k\vec{u}_k\) for some \(a_i\in\mathbb{R}\), \(1\leq i\leq k\). Since \(W\) contain each \(\vec{u}_i\) and \(W\) is a vector space, it follows that \(a_1\vec{u}_1 + a_2\vec{u}_2 + \cdots + a_k\vec{u}_k \in W\).

    Since the vectors \(\vec{u}_i\) we constructed in the proof above are not in the span of the previous vectors (by definition), they must be linearly independent and thus we obtain the following corollary.

    Corollary \(\PageIndex{1}\): Subspaces are Spans of Independent Vectors

    If \(V\) is a subspace of \(\mathbb{R}^{n},\) then there exist linearly independent vectors \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\) in \(V\) such that \(V=\mathrm{span}\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\).

    In summary, subspaces of \(\mathbb{R}^{n}\) consist of spans of finite, linearly independent collections of vectors of \(\mathbb{R}^{n}\). Such a collection of vectors is called a basis.

    Definition \(\PageIndex{2}\): Basis of a Subspace

    Let \(V\) be a subspace of \(\mathbb{R}^{n}\). Then \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\) is a basis for \(V\) if the following two conditions hold.

    1. \(\mathrm{span}\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\} =V\)
    2. \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{k}\right\}\) is linearly independent

    Note the plural of basis is bases.

    The following is a simple but very useful example of a basis, called the standard basis.

    Definition \(\PageIndex{3}\): Standard Basis of \(\mathbb{R}^n\)

    Let \(\vec{e}_i\) be the vector in \(\mathbb{R}^n\) which has a \(1\) in the \(i^{th}\) entry and zeros elsewhere, that is the \(i^{th}\) column of the identity matrix. Then the collection \(\left\{\vec{e}_1, \vec{e}_2, \cdots, \vec{e}_n \right\}\) is a basis for \(\mathbb{R}^n\) and is called the standard basis of \(\mathbb{R}^n\).

    The main theorem about bases is not only they exist, but that any two bases of a subspace must be of the same size. To show this, we will need the the following fundamental result, called the Exchange Theorem.

    Theorem \(\PageIndex{3}\): Exchange Theorem

    Suppose \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{r}\right\}\) is a linearly independent set of vectors in \(\mathbb{R}^n\), and each \(\vec{u}_{k}\) is contained in \(\mathrm{span}\left\{ \vec{v}_{1},\cdots ,\vec{v}_{s}\right\}\) Then \(s\geq r.\)
    In words, spanning sets have at least as many vectors as linearly independent sets.

    Proof

    Since each \(\vec{u}_j\) is in \(\mathrm{span}\left\{ \vec{v}_{1},\cdots ,\vec{v}_{s}\right\}\), there exist scalars \(a_{ij}\) such that \[\vec{u}_{j}=\sum_{i=1}^{s}a_{ij}\vec{v}_{i}\nonumber \] Suppose for a contradiction that \(s<r\). Then the matrix \(A = \left[ a_{ij} \right]\) has fewer rows, \(s\) than columns, \(r\). Then the system \(AX=0\) has a non trivial solution \(\vec{d}\), that is there is a \(\vec{d}\neq \vec{0}\) such that \(A\vec{d}=\vec{0}\). In other words, \[\sum_{j=1}^{r}a_{ij}d_{j}=0,\;i=1,2,\cdots ,s\nonumber \] Therefore, \[\begin{aligned} \sum_{j=1}^{r}d_{j}\vec{u}_{j} &=\sum_{j=1}^{r}d_{j}\sum_{i=1}^{s}a_{ij} \vec{v}_{i} \\ &=\sum_{i=1}^{s}\left( \sum_{j=1}^{r}a_{ij}d_{j}\right) \vec{v} _{i}=\sum_{i=1}^{s}0\vec{v}_{i}=0\end{aligned}\] which contradicts the assumption that \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{r}\right\}\) is linearly independent, because not all the \(d_{j}\) are zero. Thus this contradiction indicates that \(s\geq r\).

    We are now ready to show that any two bases are of the same size.

    Theorem \(\PageIndex{4}\): Bases of \(\mathbb{R}^{n}\) are of the Same Size

    Let \(V\) be a subspace of \(\mathbb{R}^{n}\) with two bases \(B_1\) and \(B_2\). Suppose \(B_1\) contains \(s\) vectors and \(B_2\) contains \(r\) vectors. Then \(s=r.\)

    Proof

    This follows from Theorem \(\PageIndex{3}\). Observe that \(B_1 = \left\{ \vec{u}_{1},\cdots ,\vec{u}_{s}\right\}\) is a spanning set for \(V\) while \(B_2 = \left\{ \vec{v}_{1},\cdots ,\vec{v}_{r}\right\}\) is linearly independent, so \(s \geq r.\) Similarly \(B_2 = \left\{ \vec{v}_{1},\cdots ,\vec{v} _{r}\right\}\) is a spanning set for \(V\) while \(B_1 = \left\{ \vec{u}_{1},\cdots , \vec{u}_{s}\right\}\) is linearly independent, so \(r\geq s\).

    The following definition can now be stated.

    Definition \(\PageIndex{4}\): Dimension of a Subspace

    Let \(V\) be a subspace of \(\mathbb{R}^{n}\). Then the dimension of \(V\), written \(\mathrm{dim}(V)\) is defined to be the number of vectors in a basis.

    The next result follows.

    Corollary \(\PageIndex{2}\): Dimension of \(\mathbb{R}^n\)

    The dimension of \(\mathbb{R}^{n}\) is \(n.\)

    Proof

    You only need to exhibit a basis for \(\mathbb{R}^{n}\) which has \(n\) vectors. Such a basis is the standard basis \(\left\{ \vec{e}_{1},\cdots , \vec{e}_{n}\right\}\).

    Consider the following example.

    Example \(\PageIndex{2}\): Basis of Subspace

    Let \[V=\left\{ \left[\begin{array}{c} a\\ b\\ c\\ d\end{array}\right]\in\mathbb{R}^4 ~:~ a-b=d-c \right\}.\nonumber \] Show that \(V\) is a subspace of \(\mathbb{R}^4\), find a basis of \(V\), and find \(\dim(V)\).

    Solution

    The condition \(a-b=d-c\) is equivalent to the condition \(a=b-c+d\), so we may write

    \[V =\left\{ \left[\begin{array}{c} b-c+d\\ b\\ c\\ d\end{array}\right] ~:~b,c,d \in\mathbb{R} \right\} = \left\{ b\left[\begin{array}{c} 1\\ 1\\ 0\\ 0\end{array}\right] +c\left[\begin{array}{c} -1\\ 0\\ 1\\ 0\end{array}\right] +d\left[\begin{array}{c} 1\\ 0\\ 0\\ 1\end{array}\right] ~:~ b,c,d\in\mathbb{R} \right\}\nonumber \]

    This shows that \(V\) is a subspace of \(\mathbb{R}^4\), since \(V=\mathrm{span}\{ \vec{u}_1, \vec{u}_2, \vec{u}_3 \}\) where

    \[\vec{u}_1 = \left[\begin{array}{r} 1 \\ 1 \\ 0 \\ 0 \end{array}\right], \vec{u}_2 = \left[\begin{array}{r} -1 \\ 0 \\ 1 \\ 0 \end{array}\right], \vec{u}_3 = \left[\begin{array}{r} 1 \\ 0 \\ 0 \\ 1 \end{array}\right]\nonumber \]

    Furthermore,

    \[\left\{ \left[\begin{array}{c} 1\\ 1\\ 0\\ 0\end{array}\right], \left[\begin{array}{c} -1\\ 0\\ 1\\ 0\end{array}\right], \left[\begin{array}{c} 1\\ 0\\ 0\\ 1\end{array}\right] \right\}\nonumber \] is linearly independent, as can be seen by taking the reduced row-echelon form of the matrix whose columns are \(\vec{u}_1, \vec{u}_2\) and \(\vec{u}_3\).

    \[\left[\begin{array}{rrr} 1 & -1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right] \rightarrow \left[\begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{array}\right]\nonumber \]

    Since every column of the reduced row-echelon form matrix has a leading one, the columns are linearly independent.

    Therefore \(\{ \vec{u}_1, \vec{u}_2, \vec{u}_3 \}\) is linearly independent and spans \(V\), so is a basis of \(V\). Hence \(V\) has dimension three.

    We continue by stating further properties of a set of vectors in \(\mathbb{R}^{n}\).

    Corollary \(\PageIndex{3}\): Linearly Independent and Spanning Sets in \(\mathbb{R}^{n}\)

    The following properties hold in \(\mathbb{R}^{n}\):

    • Suppose \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) is linearly independent. Then \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) is a basis for \(\mathbb{R}^{n}\).
    • Suppose \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{m}\right\}\) spans \(\mathbb{R}^{n}.\) Then \(m\geq n.\)
    • If \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) spans \(\mathbb{R}^{n},\) then \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) is linearly independent.
    Proof

    Assume first that \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) is linearly independent, and we need to show that this set spans \(\mathbb{R}^{n}\). To do so, let \(\vec{v}\) be a vector of \(\mathbb{R}^{n}\), and we need to write \(\vec{v}\) as a linear combination of \(\vec{u}_i\)’s. Consider the matrix \(A\) having the vectors \(\vec{u}_i\) as columns: \[A = \left[ \begin{array}{rrr} \vec{u}_{1} & \cdots & \vec{u}_{n} \end{array} \right]\nonumber \]

    By linear independence of the \(\vec{u}_i\)’s, the reduced row-echelon form of \(A\) is the identity matrix. Therefore the system \(A\vec{x}= \vec{v}\) has a (unique) solution, so \(\vec{v}\) is a linear combination of the \(\vec{u}_i\)’s.

    To establish the second claim, suppose that \(m<n.\) Then letting \(\vec{u}_{i_{1}},\cdots ,\vec{u}_{i_{k}}\) be the pivot columns of the matrix \[\left[ \begin{array}{ccc} \vec{u}_{1} & \cdots & \vec{u}_{m} \end{array} \right]\nonumber \] it follows \(k\leq m<n\) and these \(k\) pivot columns would be a basis for \(\mathbb{R}^{n}\) having fewer than \(n\) vectors, contrary to Corollary \(\PageIndex{3}\).

    Finally consider the third claim. If \(\left\{ \vec{u}_{1},\cdots ,\vec{u}_{n}\right\}\) is not linearly independent, then replace this list with \(\left\{ \vec{u}_{i_{1}},\cdots ,\vec{u}_{i_{k}}\right\}\) where these are the pivot columns of the matrix \[\left[ \begin{array}{ccc} \vec{u}_{1} & \cdots & \vec{u}_{n} \end{array} \right]\nonumber \] Then \(\left\{ \vec{u}_{i_{1}},\cdots ,\vec{u}_{i_{k}}\right\}\) spans \(\mathbb{R}^{n}\) and is linearly independent, so it is a basis having less than \(n\) vectors again contrary to Corollary \(\PageIndex{3}\).

    The next theorem follows from the above claim.

    Theorem \(\PageIndex{5}\): Existence of Basis

    Let \(V\) be a subspace of \(\mathbb{R}^n\). Then there exists a basis of \(V\) with \(\dim(V)\leq n\).

    Consider Corollary \(\PageIndex{4}\) together with Theorem \(\PageIndex{8}\). Let \(\dim(V) = r\). Suppose there exists an independent set of vectors in \(V\). If this set contains \(r\) vectors, then it is a basis for \(V\). If it contains less than \(r\) vectors, then vectors can be added to the set to create a basis of \(V\). Similarly, any spanning set of \(V\) which contains more than \(r\) vectors can have vectors removed to create a basis of \(V\).

    We illustrate this concept in the next example.

    Example \(\PageIndex{3}\): Extending an Independent Set

    Consider the set \(U\) given by \[U=\left\{ \left.\left[\begin{array}{c} a\\ b\\ c\\ d\end{array}\right] \in\mathbb{R}^4 ~\right|~ a-b=d-c \right\}\nonumber \] Then \(U\) is a subspace of \(\mathbb{R}^4\) and \(\dim(U)=3\).

    Then \[S=\left\{ \left[\begin{array}{c} 1\\ 1\\ 1\\ 1\end{array}\right], \left[\begin{array}{c} 2\\ 3\\ 3\\ 2\end{array}\right] \right\},\nonumber \] is an independent subset of \(U\). Show that \(S\) can be extended to a basis of \(U\).

    Solution

    To extend \(S\) to a basis of \(U\), find a vector in \(U\) that is not in \(\mathrm{span}(S)\). \[\left[\begin{array}{rrr} 1 & 2 & ? \\ 1 & 3 & ? \\ 1 & 3 & ? \\ 1 & 2 & ? \end{array}\right]\nonumber \]

    \[\left[\begin{array}{rrr} 1 & 2 & 1 \\ 1 & 3 & 0 \\ 1 & 3 & -1 \\ 1 & 2 & 0 \end{array}\right] \rightarrow \left[\begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{array}\right]\nonumber \]

    Therefore, \(S\) can be extended to the following basis of \(U\): \[\left\{ \left[\begin{array}{r} 1\\ 1\\ 1\\ 1\end{array}\right], \left[\begin{array}{r} 2\\ 3\\ 3\\ 2\end{array}\right], \left[\begin{array}{r} 1\\ 0\\ -1\\ 0\end{array}\right] \right\},\nonumber \]

    Next we consider the case of removing vectors from a spanning set to result in a basis.

    Theorem \(\PageIndex{6}\): Finding a Basis from a Span

    Let \(W\) be a subspace. Also suppose that \(W=span\left\{ \vec{w} _{1},\cdots ,\vec{w}_{m}\right\}\). Then there exists a subset of \(\left\{ \vec{w}_{1},\cdots ,\vec{w}_{m}\right\}\) which is a basis for \(W\).

    Proof

    Let \(S\) denote the set of positive integers such that for \(k\in S,\) there exists a subset of \(\left\{ \vec{w}_{1},\cdots ,\vec{w}_{m}\right\}\) consisting of exactly \(k\) vectors which is a spanning set for \(W\). Thus \(m\in S\). Pick the smallest positive integer in \(S\). Call it \(k\). Then there exists \(\left\{ \vec{u}_{1},\cdots , \vec{u}_{k}\right\} \subseteq \left\{ \vec{w}_{1},\cdots ,\vec{w} _{m}\right\}\) such that \(\text{span}\left\{ \vec{u}_{1},\cdots ,\vec{u} _{k}\right\} =W.\) If \[\sum_{i=1}^{k}c_{i}\vec{w}_{i}=\vec{0}\nonumber \] and not all of the \(c_{i}=0,\) then you could pick \(c_{j}\neq 0\), divide by it and solve for \(\vec{u}_{j}\) in terms of the others, \[\vec{w}_{j}=\sum_{i\neq j}\left( -\frac{c_{i}}{c_{j}}\right) \vec{w}_{i}\nonumber \] Then you could delete \(\vec{w}_{j}\) from the list and have the same span. Any linear combination involving \(\vec{w}_{j}\) would equal one in which \(\vec{w}_{j}\) is replaced with the above sum, showing that it could have been obtained as a linear combination of \(\vec{w}_{i}\) for \(i\neq j\). Thus \(k-1\in S\) contrary to the choice of \(k\). Hence each \(c_{i}=0\) and so \(\left\{ \vec{u}_{1},\cdots ,\vec{u} _{k}\right\}\) is a basis for \(W\) consisting of vectors of \(\left\{ \vec{w} _{1},\cdots ,\vec{w}_{m}\right\}\).

    The following example illustrates how to carry out this shrinking process which will obtain a subset of a span of vectors which is linearly independent.

    Example \(\PageIndex{4}\): Subset of a Span

    Let \(W\) be the subspace \[span\left\{ \left[ \begin{array}{r} 1 \\ 2 \\ -1 \\ 1 \end{array} \right] ,\left[ \begin{array}{r} 1 \\ 3 \\ -1 \\ 1 \end{array} \right] ,\left[ \begin{array}{r} 8 \\ 19 \\ -8 \\ 8 \end{array} \right] ,\left[ \begin{array}{r} -6 \\ -15 \\ 6 \\ -6 \end{array} \right] ,\left[ \begin{array}{r} 1 \\ 3 \\ 0 \\ 1 \end{array} \right] ,\left[ \begin{array}{r} 1 \\ 5 \\ 0 \\ 1 \end{array} \right] \right\}\nonumber \] Find a basis for \(W\) which consists of a subset of the given vectors.

    Solution

    You can use the reduced row-echelon form to accomplish this reduction. Form the matrix which has the given vectors as columns. \[\left[ \begin{array}{rrrrrr} 1 & 1 & 8 & -6 & 1 & 1 \\ 2 & 3 & 19 & -15 & 3 & 5 \\ -1 & -1 & -8 & 6 & 0 & 0 \\ 1 & 1 & 8 & -6 & 1 & 1 \end{array} \right]\nonumber \] Then take the reduced row-echelon form

    \[\left[ \begin{array}{rrrrrr} 1 & 0 & 5 & -3 & 0 & -2 \\ 0 & 1 & 3 & -3 & 0 & 2 \\ 0 & 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right]\nonumber \] It follows that a basis for \(W\) is

    \[\left\{ \left[ \begin{array}{r} 1 \\ 2 \\ -1 \\ 1 \end{array} \right] ,\left[ \begin{array}{r} 1 \\ 3 \\ -1 \\ 1 \end{array} \right] ,\left[ \begin{array}{c} 1 \\ 3 \\ 0 \\ 1 \end{array} \right] \right\}\nonumber \] Since the first, second, and fifth columns are obviously a basis for the column space of the , the same is true for the matrix having the given vectors as columns.

    Consider the following theorems regarding a subspace contained in another subspace.

    Theorem \(\PageIndex{7}\): Subset of a Subspace

    Let \(V\) and \(W\) be subspaces of \(\mathbb{R}^n\), and suppose that \(W\subseteq V\). Then \(\dim(W) \leq \dim(V)\) with equality when \(W=V\).

    Theorem \(\PageIndex{8}\): Extending a Basis

    Let \(W\) be any non-zero subspace \(\mathbb{R}^{n}\) and let \(W\subseteq V\) where \(V\) is also a subspace of \(\mathbb{R}^{n}\). Then every basis of \(W\) can be extended to a basis for \(V\).

    The proof is left as an exercise but proceeds as follows. Begin with a basis for \(W,\left\{ \vec{w}_{1},\cdots ,\vec{w}_{s}\right\}\) and add in vectors from \(V\) until you obtain a basis for \(V\). Not that the process will stop because the dimension of \(V\) is no more than \(n\).

    Consider the following example.

    Example \(\PageIndex{5}\): Extending a Basis

    Let \(V=\mathbb{R}^{4}\) and let \[W=\mathrm{span}\left\{ \left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 1 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 1 \\ 0 \\ 1 \end{array} \right] \right\}\nonumber \] Extend this basis of \(W\) to a basis of \(\mathbb{R}^{n}\).

    Solution

    An easy way to do this is to take the reduced row-echelon form of the matrix

    \[\left[ \begin{array}{cccccc} 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 \end{array} \right] \label{basiseq1}\]

    Note how the given vectors were placed as the first two columns and then the matrix was extended in such a way that it is clear that the span of the columns of this matrix yield all of \(\mathbb{R}^{4}\). Now determine the pivot columns. The reduced row-echelon form is

    \[\left[ \begin{array}{rrrrrr} 1 & 0 & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & -1 & 1 \\ 0 & 0 & 1 & 0 & -1 & 0 \\ 0 & 0 & 0 & 1 & 1 & -1 \end{array} \right] \label{basiseq2}\]

    Therefore the pivot columns are \[\left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 1 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 1 \\ 0 \\ 1 \end{array} \right] ,\left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 1 \\ 0 \\ 0 \end{array} \right]\nonumber \]

    and now this is an extension of the given basis for \(W\) to a basis for \(\mathbb{R}^{4}\).

    Why does this work? The columns of \(\eqref{basiseq1}\) obviously span \(\mathbb{R }^{4}\). In fact the span of the first four is the same as the span of all six.

    Consider another example.

    Example \(\PageIndex{6}\): Extending a Basis

    Let \(W\) be the span of \(\left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 0 \end{array} \right]\) in \(\mathbb{R}^{4}\). Let \(V\) consist of the span of the vectors \[\left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 0 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 1 \\ 1 \\ 1 \end{array} \right] ,\left[ \begin{array}{r} 7 \\ -6 \\ 1 \\ -6 \end{array} \right] ,\left[ \begin{array}{r} -5 \\ 7 \\ 2 \\ 7 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right]\nonumber \] Find a basis for \(V\) which extends the basis for \(W\).

    Solution

    Note that the above vectors are not linearly independent, but their span, denoted as \(V\) is a subspace which does include the subspace \(W\).

    Using the process outlined in the previous example, form the following matrix

    \[\left[ \begin{array}{rrrrr} 1 & 0 & 7 & -5 & 0 \\ 0 & 1 & -6 & 7 & 0 \\ 1 & 1 & 1 & 2 & 0 \\ 0 & 1 & -6 & 7 & 1 \end{array} \right]\nonumber \]

    Next find its reduced row-echelon form \[\left[ \begin{array}{rrrrr} 1 & 0 & 7 & -5 & 0 \\ 0 & 1 & -6 & 7 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{array} \right]\nonumber \]

    It follows that a basis for \(V\) consists of the first two vectors and the last. \[\left\{ \left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 0 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 1 \\ 1 \\ 1 \end{array} \right] ,\left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right] \right\}\nonumber \] Thus \(V\) is of dimension 3 and it has a basis which extends the basis for \(W\).


    This page titled 4.8: Subspaces and Bases is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Doli Bambhania, Fatemeh Yarahmadi, and Bill Wilson.