Exercises – Long Day#
Exercise 1: Linearity and the Rank-Nullity Theorem#
Two maps \(f: \mathbb{R}^2 \to \mathbb{R}^2\) and \(g: \mathbb{R}^2 \to \mathbb{R}^2\) are given by:
Question a#
Show that only one of the two maps is a linear map between the real vector spaces \(\mathbb R^2\) and \(\mathbb R^2\). Find out which by investigating whether they fulfill the two linearity requirements in Definition 11.0.1 in the textbook.
Answer
It is the map \(f\) that is linear. That \(g\) is not linear is easily shown with a counterexample. For example, we see that \(g\left(\left[\begin{array}{r}1\\1\end{array}\right]\right)+g\left(\left[\begin{array}{r}1\\1\end{array}\right]\right)\) is not the same as \(g\left(\left[\begin{array}{r}1\\1\end{array}\right]+\left[\begin{array}{r}1\\1\end{array}\right]\right)\).
Question b#
Provide a basis as well as an ordered basis for the kernel of \(f\). Then determine the dimension of the kernel.
Hint
Definition 11.1.2 explains what the kernel of a linear map is.
Answer
We find the kernel to be
An ordered basis for the kernel is the list \(\left(\left[\begin{array}{r} 1\\1\end{array}\right]\right)\) and a basis is the set \(\left\{\left[\begin{array}{r} 1\\1\end{array}\right]\right\}.\) As the basis only contains one vector then \(\dim(\mathrm{ker}(f))=1.\)
Question c#
State the image space of the found linear map. Also, provide a basis as well as an ordered basis for the image space, and determine the dimension of the image space.
Hint
The image space is the range (the set of all outputs) of the map. The task is thus to figure out which vectors \(\left[\begin{array}{r} b_1\\b_2\end{array}\right] \in \mathbb{R}^2\,\) that can fulfill the equation \(\left[\begin{array}{r} x_1-x_2\\-x_1+x_2\end{array}\right]=\left[\begin{array}{r} b_1\\b_2\end{array}\right].\)
In other words, we must investigate for which right-hand sides the equation \(\left[\begin{array}{r} x_1-x_2\\-x_1+x_2\end{array}\right]=\left[\begin{array}{r} b_1\\b_2\end{array}\right]\) has a solution.
Answer
An ordered basis for the image space is \(\left(\left[\begin{array}{r} -1\\1\end{array}\right]\right)\) and a basis is \(\left\{\left[\begin{array}{r} -1\\1\end{array}\right]\right\}.\) The dimension of the image space is hence \(1\) in this case.
Exercise 2: Linear Maps defined by Diagonal Matrices#
Let \(\lambda_1,\lambda_2 \in \mathbb{R}\) and define
In this exercise we investigate the linear map \(L_{\mathbf A}: \mathbb{R}^2 \to \mathbb{R}^2\) defined by \(L_{\mathbf A}\left({\mathbf v}\right)={\mathbf A}\cdot {\mathbf v}.\)
Question a#
Sketch the set \(\mathcal{K}=\{(v_1,v_2) \, \mid \, 0 \le v_1 \le 1, \, 0 \le v_2 \le 1\}\) in \(\mathbb{R}^2\).
Answer
The set \(\mathcal{K}\) is a square in \(\mathbb{R}^2\) with corners \((0,0)\), \((0,1)\), \((1,0)\), \((1,1)\).
Question b#
Sketch the set \(L_{\mathbf A}(\mathcal{K})\), meaning the set \(\{L_{\mathbf A}({\mathbf v}) \, \mid \, {\mathbf v} \in \mathcal{K} \}\), in the following cases:
\(\lambda_1=1\) and \(\lambda_2=1\)
\(\lambda_1=2\) and \(\lambda_2=3\)
\(\lambda_1=-1\) and \(\lambda_2=2\)
\(\lambda_1=-4\) and \(\lambda_2=-3\)
Hint
Each \({\mathbf v}=(v_1,v_2) \in \mathcal{K}\) fulfills that
Now use the fact that \(L_{\mathbf A}\) is a linear map.
Answer
It holds that
In all cases \(L_{\mathbf A}(\mathcal{K})\) is thus a rectangle with corners \((0,0),(\lambda_1,0),(0,\lambda_2),(\lambda_1,\lambda_2)\).
Question c#
With \(\mathcal{K}\) and \({\mathbf A} \in \mathbb{R}^{2 \times 2}\) as before, check that the area of \(L_{\mathbf A}(\mathcal{K})\) equals \(|\det({\mathbf A})|.\)
Question d#
Now let
Check that \(L_{\mathbf A}(\mathcal{K})\) has an area of \(1\) and that \(\det({\mathbf A})=1\).
Note: It turns out that it for an arbitrary matrix \({\mathbf A} \in \mathbb{R}^{2 \times 2}\) holds true that the area of \(L_{\mathbf A}(\mathcal{K})\) equals \(|\det({\mathbf A})|.\)
Exercise 3: Linear Maps and Differentiation#
As in Example 10.4.5 in the textbook the notation \(C_\infty(\mathbb R)\) symbolises a real vector space consisting of all functions from \(\mathbb{R}\) to \(\mathbb{R}\) that can be differentiated any arbitrary number of times. In this exercise we consider the subspace \(V_1\) of \(C_\infty(\mathbb{R})\) that is spanned by the functions \(\mathrm e^t, \mathrm e^{-t}, \cos(t),\) and \(\sin(t)\). You may use the fact that these four functions are linearly independent over \(\mathbb{R}\) and hence that they constitute an ordered basis for \(V_1\).
We now define a function \(L: V_1 \to V_1\) by the expression \(L(f)=f'+f\), where \(f \in V_1\) and where \(f'\) denotes the derivative of the function \(f\).
Question a#
Show that the function \(L\) is a linear map between real vector spaces.
Question b#
Determine the mapping matrix \({}_\beta [L] _\beta\) when \(\beta=(\mathrm e^t,\mathrm e^{-t},\cos(t),\sin(t)).\)
Hint
You can use the formula for a mapping matrix in Lemma 11.3.3.
Hint
Lemma 11.3.3 concerns two vector spaces \(V_1\) and \(V_2\) as well as two ordered bases, one for each vector space. Note that here \(V_1=V_2\), and also note that the ordered basis \(\beta\) is used for both \(V_1\) and \(V_2\).
Answer
Question c#
Another ordered basis is now chosen for \(V_1\): \(\gamma=(\mathrm{sinh(t)},\mathrm{cosh(t)},\sin(t),\cos(t))\). The functions \(\mathrm{sinh(t)}\) and \(\mathrm{cosh(t)}\) were defined in Exercise 10 from Long Day in Week 2. Determine the mapping matrix \({}_\gamma [L] _\gamma\) directly from the formula in Lemma 11.3.3 in the textbook.
Answer
Question d#
Determine the change-of-basis matrix \({}_\gamma [\mathrm{id}_{V_1}] _\beta\).
Answer
Question e#
Use the second part of Theorem 11.3.4 in the textbook to realise that \({}_\gamma [\mathrm{id}_{V_1}] _\beta \cdot {}_\beta [L] _\beta = {}_\gamma [L] _\gamma \cdot {}_\gamma [\mathrm{id}_{V_1}] _\beta.\) Check that the equation holds using your results from the previous questions.
Answer
The equation holds because according to Theorem 11.3.4 it applies that \({}_\gamma [\mathrm{id}_{V_1}] _\beta \cdot {}_\beta [L] _\beta = {}_\gamma [\mathrm{id}_{V_1} \circ L] _\beta = {}_\gamma [L] _\beta\) and \({}_\gamma [L] _\gamma \cdot {}_\gamma [\mathrm{id}_{V_1}] _\beta={}_\gamma [L \circ \mathrm{id}_{V_1}] _\beta={}_\gamma [L] _\beta\). It was here used that \(\mathrm{id}_{V_1} \circ L=L \circ \mathrm{id}_{V_1} =L\), which applies since \(\mathrm{id}_{V_1}\) is the identity function.
Exercise 4: Change of Basis and Mapping Matrices#
We are given the vectors
as well as
We now define the ordered bases
as well as
A linear map \(L:\mathbb{R}^2\to \mathbb{R}^3\,\) fulfills that
The goal with this Exercise is to determine the mapping matrix \({}_\eta[L]_\epsilon\), meaning the mapping matrix of \(L\), with respect to the ordered standard bases.
Question a#
State the mapping matrix \({}_\gamma[L]_\beta\) of \(L\).
Hint
The formula in Lemma 11.3.3 can be of use here. Also remember to use the given information about \(L\) so that you can avoid doing too many calculations.
Answer
Question b#
State the mapping matrix \({}_\eta[L]_\beta\) of \(L\), where \(\beta\) is as before and \(\eta\) is the ordered standard basis for \(\mathbb{R}^3\,.\)
Hint
Instead of starting from the definition of a mapping matrix, you can use the second part of Theorem 11.3.4 in the textbook to realise that \({}_\eta[\mathrm{id}_{\mathbb{R}^3}]_\gamma \cdot {}_\gamma [L] _\beta = {}_\eta [L] _\beta.\)
Hint
The calculation of the change-of-basis matrix\({}_\eta[\mathrm{id}_{\mathbb{R}^3}]_\gamma\) is not that complicated since \(\eta\) is the ordered standard basis for \(\mathbb{R}^3\).
Answer
Question c#
Now state the mapping matrix \({}_\eta[L]_\epsilon\) of \(L\), where \(\eta\) and \(\epsilon\) are the ordered standard bases for \(\mathbb{R}^2\) and \(\mathbb{R}^3\).
Hint
A consequence of the second part of Theorem 11.3.4 is that \({}_\eta[L]_\epsilon={}_\eta[L]_\beta \cdot {}_\beta[\mathrm{id}_{\mathbb{R}^2}]_\epsilon\). The change-of-basis matrix \({}_\beta[\mathrm{id}_{\mathbb{R}^2}]_\epsilon\) can be determined by using Lemma 11.3.6 in the textbook, which implies that \({}_\beta[\mathrm{id}_{\mathbb{R}^2}]_\epsilon=({}_\epsilon[\mathrm{id}_{\mathbb{R}^2}]_\beta)^{-1}\). The matrix \({}_\epsilon[\mathrm{id}_{\mathbb{R}^2}]_\beta\) can then be written out.
Answer
Exercise 5: Kernel of a Linear Map#
Let \(V_1\) and \(V_2\) be two vector spaces over a field \(\mathbb{F}\). Show that the kernel of a linear map \(L: V_1 \to V_2\) is a subspace of \(V_1.\)
Hint
The kernel of a linear map is defined in Definition 11.2.1 in the textbook. Lemma 10.4.2 in the textbook can be of use to determine whether it is a subspace of \(V_1\).
Exercise 6: Linear Map from a Polynomial Space#
Let \(V_1=\{a+bZ+cZ^2 \, \mid \, a,b,c \in \mathbb{R}\}\) be a subspace of the real vector space \(\mathbb{R}[Z]\) that consists of all polynomials of degree no higher than two. We define a function \(L: V_1 \to \mathbb{R}\) by the expression \(p(Z) \mapsto p'(1)\). The expression \(p'(1)\) is the number you get from inserting \(1\) into \(p'(Z)\), where \(p'(Z)\) denotes the derivative of \(p(Z)\).
Question a#
Calculate \(L(Z^2+Z)\) and \(L(5Z^2-10Z+4)\).
Answer
Since \((Z^2+Z)'=2Z+1\), it holds that \(L(Z^2+Z)=2\cdot 1 +1=3\). Similarly it holds that \((5Z^2-10Z+4)'=10Z-10\) and hence that \(L(5Z^2-10Z+4)=10\cdot 1-10=0.\)
Question b#
Show that \(L\) is a linear map between real vector spaces.
Hint
The conditions for being a linear map can be found in Definition 11.0.1 in the textbook.
Question c#
Provide a basis for \(\mathrm{ker}(L)\).
Hint
If \(L(aZ^2+bZ+c)=0\), which condition must the coefficients \(a,b,\) and \(c\) then fulfill?
Answer
A possible basis is \(\{1,Z^2-2Z\}\)
Question d#
Show that \(\mathrm{image}(L)=\mathbb{R}\). Conclude that the map \(L\) is surjective.
Hint
First try finding a polynomial \(p(Z)\) in \(V_1\) that fulfills \(L(p(Z))=1\). The reflect on what \(L(ap(Z))\) then can be, where \(a \in \mathbb{R}\) is chosen freely.
Hint
Saying that a linear map \(M:V_1 \to V_2\) is surjective is precisely the same as saying that a the image space of the map is identical to the entire \(V_2\). Have a look at the text before Example 2.2.4 in the textbook where it is explained what it means for a function to be surjective. If we thus have shown that \(\mathrm{image}(L)=\mathbb{R}\), then it follows directly that \(L\) is surjective.
Answer
\(L(aZ)=a\) for an arbitrary \(a \in \mathbb{R}\). Hence \(\mathrm{image}(L)=\mathbb{R}\). In other words, the image set of \(L\) equals its co-domain. This means that \(L\) is surjective.
Exercise 7: Injective Linear Maps#
A function \(f: A \to B\) is called injective if and only if it for all \(a_1,a_2 \in A\) holds that \(f(a_1)=f(a_2)\) implies \(a_1=a_2\). See the text before Example 2.2.4 in the textbook. In this exercise we will investigate what it means for a linear map \(L: V_1 \to V_2\) between two vector spaces \(V_1\) and \(V_2\) over \(\mathbb{F}\) to be injective.
Question a#
Assume that a linear map \(L: V_1 \to V_2\) is injective. Show that then \(\mathrm{ker}(L)=\{{\mathbf 0}\}.\)
Hint
Using contraposition will reveal that the proposition in question is logically equivalent to the proposition: if \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\), then \(L\) is not injective.
Hint
We know that \(L({\mathbf 0})={\mathbf 0}\) for all linear maps \(L\) (for instance, see Equation (11.1) in the textbook). If \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\), then there exist non-zero \({\mathbf v} \in V_1\) such that \(L({\mathbf v})={\mathbf 0}\).
Partial Answer
If \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\), then there exist non-zero \({\mathbf v} \in V_1\) such that \(L({\mathbf v})={\mathbf 0}\). Hence \(L\) maps both \({\mathbf v}\) and \({\mathbf 0}\) to the zero vector in \(V_2\). This means that \(L\) is not injective.
Question b#
Assume that a linear map \(L: V_1 \to V_2\) is given for which \(\mathrm{ker}(L)=\{{\mathbf 0}\}.\) Show that \(L\) then is injective.
Hint
The proposition in question is logically equivalent to the proposition: if \(L\) is not injective, then \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\).
Hint
Assume that two different vectors \({\mathbf v}_1,{\mathbf v}_2 \in V_1\) exist such that \(L({\mathbf v}_1)=L({\mathbf v}_2)\). Use the linearity of \(L\) to realize that then \(L({\mathbf v}_2-{\mathbf v}_1)={\mathbf 0}\).
Answer
If \(L\) is not injective then two different vectors \({\mathbf v}_1,{\mathbf v}_2 \in V_1\) exist such that \(L({\mathbf v}_1)=L({\mathbf v}_2)\). This implies that \(L({\mathbf v}_2-{\mathbf v}_1)={\mathbf 0}\) and thus that \({\mathbf v}_2-{\mathbf v}_1 \in \ker(L)\). Hence the kernel contains a non-zero vector, implying that \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}.\)
Question c#
Conclude based on the two previous Questions that a linear map \(L: V_1 \to V_2\) is injective if and only if \(\mathrm{ker}(L) = \{{\mathbf 0}\}.\)
Hint
Use the previous Questions along with Equation (1.22) from Chapter 1 in the textbook.
Question 8: Investigation of a Linear Map from \(\Bbb R^4\) to \(\Bbb R^3\)#
Let \(L:\mathbb{R} ^4 \to \mathbb{R}^3\) be given by the expression
Question a#
Find a matrix \({\mathbf A} \in \mathbb{R}^{3 \times 4}\) for which it applies that
Use Lemma 11.1.1 from the textbook to conclude that \(L\) is a linear map.
Answer
Since \(L=L_{\mathbf A}\) where \(\mathbf A\) is the above matrix, Lemma 11.1.1 from the textbook implies that \(L\) is a linear map.
Question b#
Let \(\beta\) be the ordered standard basis for \(\mathbb{R}^4\) and \(\gamma\) the one for \(\mathbb{R}^3\). Check that \({\mathbf A} = {}_\gamma[L]_\beta\).
Hint
Lemma 11.3.3 describes how the mapping matrix \({}_\gamma[L]_\beta\) looks.
Hint
It is useful to keep in mind that \([\mathbf w]_\gamma=\mathbf w\) for all \(\mathbf w \in \mathbb{R}^3\), since \(\gamma\) in here is the ordered standard basis for \(\mathbb{R}^3\).
Question c#
Provide an ordered basis for the kernel of \(L\) as well as the dimension of the kernel.
Hint
Since \(L=L_{\mathbf A}\), it applies that the kernel of \(L\) is the same as the kernel of \(\mathbf A\) (also known as its nullspace). An ordered basis for the kernel of \(\mathbf A\) can be found by following the same procedure as in Example 11.1.4 in the textbook.
Hint
First check that the matrix
has the reduced row-echelon form:
Answer
The list of vectors
constitutes an ordered basis for \(\mathrm{ker} \mathbf A\) and hence also for \(\mathrm{ker} L\). The number of elements in the found ordered basis is \(2\), hence \(\mathrm{dim}(\mathrm{ker}(L))=2.\)
Question d#
Provide a basis for the image space of \(L\) as well as the dimension of the image space.
Hint
Use the fact that \(L=L_{\mathbf A}\) along with Lemma 11.1.2 to realise that the image space of \(L\) is the same as the column space of \(\mathbf A\). The Question can thus be answered by finding an ordered basis for the column space of \(\mathbf A\).
Answer
Since only the first two columns in the reduced row-echelon form of \({\mathbf A}\) contain pivot elements, then Theorem 9.2.1 in the textbook implies that a possible ordered basis for the column space of \({\mathbf A}\) is
Since \(L=L_{\mathbf A}\), then the column space of \({\mathbf A}\) is identical to the image space of \(L\), so the wanted ordered basis has been found. The number of elements in the found ordered basis is \(2\), hence \(\dim(\mathrm{image}(L))=2.\)
Exercise 9: Powers of Matrices#
Let \({\mathbf A} \in \mathbb{F}^{n \times n}\) be a matrix and \({\mathbf Q} \in \mathbb{F}^{n \times n}\) an invertible matrix. Let \(k\) be a natural number. The \(k\)th power of \({\mathbf A}\), with the notation \({\mathbf A}^k\), is defined as the matrix that is achieved by multiplying \({\mathbf A}\) \(k\) times by itself. More formally \({\mathbf A}^k\) is defined recursively as follows:
Question a#
Assume that \({\mathbf D}\) is a diagonal matrix. Show using induction on \(k\) that the matrix \({\mathbf D}^k\) also is a diagonal matrix for all natural numbers \(k\).
Question b#
Show via induction on \(k\) that \(({\mathbf Q}^{-1} \cdot {\mathbf A} \cdot {\mathbf Q})^k={\mathbf Q}^{-1} \cdot {\mathbf A}^k \cdot {\mathbf Q}.\)
Question c#
Let
Check that \({\mathbf Q}^{-1} \cdot {\mathbf A} \cdot {\mathbf Q}\) is a diagonal matrix and use this to find a closed-form expression for \({\mathbf A}^k\).
Answer
“Exercise 10”: Thematic Python Module#
The Jupyter Notebook for module 3 will be released today at 15:30 on the course’s DTU Learn module.