Skip to main content
Mathematics LibreTexts

5.1: Examples of Vector Spaces

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

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

    \( \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{\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}\)

    One can find many interesting vector spaces, such as the following:

    Example \(\PageIndex{1}\):

    \[ \mathbb{R}^\mathbb{N} = \{f \mid f \colon \mathbb{N} \rightarrow \Re \} \]

    Here the vector space is the set of functions that take in a natural number \(n\) and return a real number. The addition is just addition of functions: \((f_{1} + f_{2})(n) = f_{1}(n) + f_{2}(n)\). Scalar multiplication is just as simple: \(c \cdot f(n) = cf(n)\).

    We can think of these functions as infinitely large ordered lists of numbers: \(f(1)=1^{3}=1\) is the first component, \(f(2)=2^{3}=8\) is the second, and so on. Then for example the function \(f(n)=n^{3}\) would look like this:

    \[f=\begin{pmatrix}1\\ 8\\ 27\\ \vdots\\ n^{3}\\ \vdots\end{pmatrix}.\]

    Thinking this way, \(\Re^\mathbb{N}\) is the space of all infinite sequences. Because we can not write a list infinitely long (without infinite time and ink), one can not define an element of this space explicitly; definitions that are implicit, as above, or algebraic as in \(f(n)=n^{3}\) (for all \(n \in \mathbb{N}\)) suffice.

    Let's check some axioms.

    • (+i) (Additive Closure) \((f_{1} + f_{2})(n)=f_{1}(n) +f_{2}(n)\) is indeed a function \(\mathbb{N} \rightarrow \Re\), since the sum of two real numbers is a real number.
    • (+iv) (Zero) We need to propose a zero vector. The constant zero function \(g(n) = 0\) works because then \(f(n) + g(n) = f(n) + 0 = f(n)\).

    The other axioms should also be checked. This can be done using properties of the real numbers.

    Example \(\PageIndex{2}\): The space of functions of one real variable

    \[ \mathbb{R}^\mathbb{R} = \{f \mid f \colon \Re \to \Re \} \]

    The addition is point-wise $$(f+g)(x)=f(x)+g(x)\, ,$$ as is scalar multiplication

    \[c\cdot f(x)=cf(x)\, .$$

    To check that \(\Re^{\Re}\) is a vector space use the properties of addition of functions and scalar multiplication of functions as in the previous example.

    We can not write out an explicit definition for one of these functions either, there are not only infinitely many components, but even infinitely many components between any two components! You are familiar with algebraic definitions like \(f(x)=e^{x^{2}-x+5}\). However, most vectors in this vector space can not be defined algebraically. For example, the nowhere continuous function

    \[f(x) = \left\{\begin{matrix}1,~~ x\in \mathbb{Q}\\ 0,~~ x\notin \mathbb{Q}\end{matrix}\right.\]

    Example \(\PageIndex{3}\)  

    \(\Re^{ \{*, \star, \# \}} = \{ f : \{*, \star, \# \} \to \Re \}\). Again, the properties of addition and scalar multiplication of functions show that this is a vector space.

    You can probably figure out how to show that \(\Re^{S}\) is vector space for any set \(S\). This might lead you to guess that all vector spaces are of the form \(\Re^{S}\) for some set \(S\). The following is a counterexample.

    Example \(\PageIndex{4}\): differentiable functions

    Another very important example of a vector space is the space of all differentiable functions:

    \[\left\{ f \colon \Re\rightarrow \Re \, \Big|\, \frac{d}{dx}f \text{ exists} \right\}.\]

    From calculus, we know that the sum of any two differentiable functions is differentiable, since the derivative distributes over addition. A scalar multiple of a function is also differentiable, since the derivative commutes with scalar multiplication (\(\frac{d}{d x}(cf)=c\frac{d}{dx}f\)). The zero function is just the function such that \(0(x)=0\) for every \(x\). The rest of the vector space properties are inherited from addition and scalar multiplication in \(\Re\).

    Similarly, the set of functions with at least \(k\) derivatives is always a vector space, as is the space of functions with infinitely many derivatives. None of these examples can be written as \(\Re{S}\) for some set \(S\). Despite our emphasis on such examples, it is also not true that all vector spaces consist of functions. Examples are somewhat esoteric, so we omit them.

    Another important class of examples is vector spaces that live inside \(\Re^{n}\) but are not themselves \(\Re^{n}\).

    Example \(\PageIndex{6}\): Solution set to a homogeneous linear equation

    Let

    \[ M = \begin{pmatrix}
    1 & 1 &1 \\
    2&2&2 \\
    3&3&3
    \end{pmatrix}.\]

    The solution set to the homogeneous equation \(Mx=0\) is

    \[\left\{ c_1\begin{pmatrix}-1\\1\\0\end{pmatrix} + c_2 \begin{pmatrix}-1\\0\\1\end{pmatrix} \middle\vert c_1,c_2\in \Re \right\}.\]

    This set is not equal to \(\Re^{3}\) since it does not contain, for example, \(\begin{pmatrix}1\\0\\0\end{pmatrix}\).
    The sum of any two solutions is a solution, for example

    \[
    \left[ 2\begin{pmatrix}-1\\1\\0\end{pmatrix} + 3 \begin{pmatrix}-1\\0\\1\end{pmatrix} \right]
    + \left [ 7\begin{pmatrix}-1\\1\\0\end{pmatrix} + 5 \begin{pmatrix}-1\\0\\1\end{pmatrix} \right]
    =
    9\begin{pmatrix}-1\\1\\0\end{pmatrix} + 8 \begin{pmatrix}-1\\0\\1\end{pmatrix}
    \]

    and any scalar multiple of a solution is a solution

    \[
    4\left[ 5\begin{pmatrix}-1\\1\\0\end{pmatrix} - 3 \begin{pmatrix}-1\\0\\1\end{pmatrix} \right]
    = 20\begin{pmatrix}-1\\1\\0\end{pmatrix} - 12 \begin{pmatrix}-1\\0\\1\end{pmatrix} .
    \]

    This example is called a \(\textit{subspace}\) because it gives a vector space inside another vector space. See chapter 9 for details. Indeed, because it is determined by the linear map given by the matrix \(M\), it is called \(\ker M\), or in words, the \(\textit{kernel}\) of \(M\), for this see chapter 16.

    Similarly, the solution set to any homogeneous linear equation is a vector space: Additive and multiplicative closure follow from the following statement, made using linearity of matrix multiplication:

    \[{\rm If}~Mx_1=0 ~\mbox{and}~Mx_2=0~ \mbox{then} ~M(c_1x_1 + c_2x_2)=c_1Mx_1+c_2Mx_2=0+0=0.\]

    A powerful result, called the subspace theorem (see chapter 9) guarantees, based on the closure properties alone, that homogeneous solution sets are vector spaces.

    More generally, if \(V\) is any vector space, then any hyperplane through the origin of \(V\) is a vector space.

    Example \(\PageIndex{7}\):  

    Consider the functions \(f(x)=e^{x}\) and \(g(x)=e^{2x}\) in \(\Re^{\Re}\). By taking combinations of these two vectors we can form the plane \(\{ c_{1} f+ c_{2} g | c_{1},c_{2} \in \Re\}\) inside of \(\Re^{\Re}\). This is a vector space; some examples of vectors in it are \(4e^{x}-31e^{2x},~\pi e^{2x}-4e^{x}\) and \(\frac{1}{2}e^{2x}\).

    A hyperplane which does not contain the origin cannot be a vector space because it fails condition (+iv).

    It is also possible to build new vector spaces from old ones using the product of sets. Remember that if \(V\) and \(W\) are sets, then
    their product is the new set

    \[V\times W = \{(v,w)|v\in V, w\in W\}\,\]

    or in words, all ordered pairs of elements from \(V\) and \(W\). In fact \(V\times W\) is a vector space if \(V\) and \(W\) are. We have actually been using this fact already:

    Example \(\PageIndex{8}\):  

    The real numbers \(\mathbb{R}\) form a vector space (over \(\mathbb{R}\)). The new vector space

    \[\mathbb{R}\times \mathbb{R}=\{(x,y)|x\in\mathbb{R}, y\in \mathbb{R}\}\]

    has addition and scalar multiplication defined by

    \[(x,y)+(x',y')=(x+x',y+y')\, \mbox{ and } c.(x,y)=(cx,cy)\, \]

    Of course, this is just the vector space \(\mathbb{R}^{2}=\mathbb{R}^{\{1,2\}}\).

    Non-Examples

    The solution set to a linear non-homogeneous equation is not a vector space because it does not contain the zero vector and therefore fails (iv).

    Example \(\PageIndex{9}\):  

    The solution set to

    \[ \begin{pmatrix}
    1 & 1 \\
    0 & 0
    \end{pmatrix} \begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} \]

    is \(\left\{ \begin{pmatrix}1\\0\end{pmatrix} + c \begin{pmatrix}-1\\1\end{pmatrix} \Big|\, c \in \Re \right\}\). The vector \(\begin{pmatrix}0\\0\end{pmatrix}\) is not in this set.

    Do notice that once just one of the vector space rules is broken, the example is not a vector space. Most sets of \(n\)-vectors are not vector spaces.

    Example \(\PageIndex{11}\):

    \(P:=\left \{ \begin{pmatrix}a\\b\end{pmatrix} \Big| \,a,b \geq 0 \right\}\) is not a vector space because the set fails (\(\cdot\)i) since \(\begin{pmatrix}1\\1\end{pmatrix}\in P\) but \(-2\begin{pmatrix}1\\1\end{pmatrix} =\begin{pmatrix}-2\\-2\end{pmatrix} \notin P\).

    Sets of functions other than those of the form \(\Re^{S}\) should be carefully checked for compliance with the definition of a vector space.

    Example \(\PageIndex{12}\):

    The set of all functions which are never zero

    \[\left\{ f \colon \Re\rightarrow \Re \mid f(x)\neq 0 {\rm ~for~any}~x\in\Re \right\}\, ,\]

    does not form a vector space because it does not satisfy (+i). The functions \(f(x)=x^{2}+1\) and \(g(x)= -5\) are in the set, but their sum \((f+g)(x)=x^{2}-4=(x+2)(x-2)\) is not since \((f+g)(2)=0\).

    Contributors and Attributions


    This page titled 5.1: Examples of Vector Spaces is shared under a not declared license and was authored, remixed, and/or curated by David Cherney, Tom Denton, & Andrew Waldron.

    • Was this article helpful?