Exercises – Short Day#
Exercise 1: The SymPy Exercise#
In this exercise we will use SymPy to analyse a linear map. The complex vector spaces \(V_1 = \{ p(Z) \in \mathbb{C}[Z] \, \mid \, \deg p(Z) \le 6\}\) and \(V_2=\mathbb{C}^5\) are defined. Furthermore the linear map \(L: V_1 \to V_2\) given by \(p(Z) \mapsto (p(0),p(2i),p(1),p(-3),p(1+2i))\) is defined.
Question a#
We choose the ordered basis \(\beta=(1,Z,Z^2,Z^3,Z^4,Z^5,Z^6)\) in \(V_1\) and the ordered standard basis \(\gamma\) in \(V_2.\) Determine the mapping matrix \({}_\gamma[L]_\beta\) and enter the matrix into SymPy. All computations with complex numbers can be done using SymPy.
Hint
A complex number such as \((1+2i)^6\) can quickly be computed in SymPy by typing (1+2*I)**6
. If we want the power to be computed explicitly, we type expand((1+2*I)**6)
.
Answer
Question b#
Find a basis for \(\mathrm{ker}(L)\).
Hint
You may use SymPy to find the kernel of the matrix \({}_\gamma[L]_\beta\). This can be done by solving the linear equation system \({}_\gamma[L]_\beta \cdot {\mathbf x}={\mathbf 0}\). Alternatively the command A.nullspace()
gives an ordered basis for the kernel of a matrix A
.
Hint
Using SymPy we find that the two vectors
constitute a possible basis for the kernel of the mapping matrix \({}_\gamma[L]_\beta\). Now use Theorem 10.4.2 from the textbook to find a fitting basis for \(\mathrm{ker}(L).\)
Answer
A possible basis for \(\mathrm{ker}(L)\) is
Spørgsmål c#
Find a polynomial \(p(Z) \in V_1\) of lowest possible degree such that \(L(p(Z))=(1,3,1,3,1)\).
Hint
First find using SymPy the general solution in the form \({}_\gamma[L]_\beta \cdot {\mathbf x}={\mathbf b}\) for a fitting choice of \(\mathbf b\). If needed, see Theorem 10.4.2 for more details.
Hint
The general solution mentioned in the previous hint is
Answer
The wanted polynomial is
Exercise 2: Vector Equations and Image Spaces#
We define the following function:
Question a#
Show that \(M\) is a linear map between real vector spaces and provide a basis for \(\mathrm{ker}(M).\)
Hint
Regarding linearity: Use Definition 10.0.1 and, if needed, first read Theorem 7.2.1 (in particular part 5).
Regarding providing a basis for \(\mathrm{ker}(M)\): What must a matrix \({\mathbf A} \in \mathbb{R}^{2 \times 3}\) fulfill in order to belong to \(\mathrm{ker}(M)\,\)?
Hint
Answer
A possible basis for \(\mathrm{ker}(M)\) is
Question b#
Use the rank-nullity theorem (Corollary 10.4.3 from the textbook) to show that \(\dim(\mathrm{image}(M))=4\). Conclude that \(\mathrm{image}(M)=\mathbb{R}^{2 \times 2}\).
Answer
If \(V\) is a vector space with a finite dimension \(n\), and \(W\) is a subspace of \(V\) with the same dimension \(n\), then it applies that \(W=V\). Hence it applies that \(\mathrm{image}(M)=\mathbb{R}^{2 \times 2}\).
Question c#
Justify that the equation \(M({\mathbf A})=\left[\begin{array}{rr}3 & 3\\ 3 & 3\end{array}\right]\) has a solution based on the result from Question b.
Now find the solution set.
Hint
Theorem 10.4.1 explains when an equation of the given type has a solution. The structure of the solution set is also described in Theorem 10.4.1.
Answer
The solution set is
The expression
is called the general solution to the equation.
Exercise 3: Linear Maps and Differentiation#
As in Example 9.3.4 in the textbook the notation \(C_\infty(\mathbb{R})\) symbolises the real vector space consisting of all functions from \(\mathbb{R}\) to \(\mathbb{R}\) that can be differentiated any number of times. In this exercise we consider the linear map \(M: C_\infty(\mathbb{R}) \to C_\infty(\mathbb{R})\) that is given by the expression \(M(f)=f'+f\), where \(f \in C_\infty(\mathbb{R})\) and where \(f'\) denotes the derivative of function \(f\).
Question a#
We are informed that \(\dim \mathrm{ker}(M)=1\). Find a basis for \(\mathrm{ker}(M)\).
Hint
Since it is given that the kernel of \(M\) is a \(1\)-dimensional subspace of \(C_\infty(\mathbb{R})\), any non-zero element within \(\mathrm{ker}(M)\) spans the entire kernel.
Hint
Try to determine a non-zero element \(f(t)\) in \(\mathrm{ker}(M)\) of the form \(f(t)=\mathrm e^{at}\) for some \(a \in \mathbb{R}\).
Answer
Since \((\mathrm e^{at})'=a\mathrm e^{at}\), it applies that \(M(\mathrm e^{-t})=0\). From the first hint we see that \(\{\mathrm e^{-t}\}\) is a basis for \(\mathrm{ker}(M)\).
Question b#
Determine the solution sets to the following equations
\(M(f)=\mathrm e^{t}\).
\(M(f)=t\).
\(M(f)=\mathrm e^{-t}\).
Hint
Theorem 10.4.1 explains the structure of the solution set: every solution is of the form \({\mathbf v}_p+{\mathbf v}\), where \({\mathbf v}_p\) is a particular solution and where \({\mathbf v} \in \mathrm{ker}(M)\).
Hint
For finding a particular solution to the first equation, find \(a \in \mathbb{R}\) such that \(f(t)=a\mathrm e^{t}\) fulfills the equation.
For finding a particular solution to the second equation, try a function of the form \(f(t)=t+a\), where \(a \in \mathbb{R}\).
For finding a particular solution to the third equation, try a function of the form \(f(t)=at\mathrm e^{-t}\), where \(a \in \mathbb{R}\).
Answer
The solution set is \(\{(1/2)\mathrm e^{t}+c_1\cdot \mathrm e^{-t} \, \mid \, c_1 \in \mathbb{R}\}.\) One also says that \((1/2)\mathrm e^{t}+c_1\cdot \mathrm e^{-t}, \ c_1 \in \mathbb{R}\) is the general solution to the equation \(f'+f=\mathrm e^t\).
The solution set is \(\{t-1+c_1\cdot \mathrm e^{-t} \, \mid \, c_1 \in \mathbb{R}\}.\) One also says that \(t-1+c_1\cdot \mathrm e^{-t}, \ c_1 \in \mathbb{R}\) is the general solution to the equation \(f'+f=t\).
The solution set is \(\{t\mathrm e^{-t}+c_1\cdot \mathrm e^{-t} \, \mid \, c_1 \in \mathbb{R}\}.\) One also says that \(t\mathrm e^{-t}+c_1\cdot \mathrm e^{-t}, \ c_1 \in \mathbb{R}\) is the general solution to the equation \(f'+f=\mathrm e^{-t}\).
Exercise 4: 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]\) consisting 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)\). Here \(p'(Z)\) denotes the derivative of \(p(Z)\).
Question a#
Compute \(L(Z^2+Z)\) and \(L(5Z^2-10Z+4)\).
Answer
Since \((Z^2+Z)'=2Z+1\), it applies that \(L(Z^2+Z)=2\cdot 1 +1=3\). In a similar manner it applies 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 a map being linear can be found in Definition 10.0.1 in the textbook.
Question c#
Determine a basis for \(\mathrm{ker}(L)\).
Hint
If \(L(a+bZ+cZ^2)=0\), which condition must the coefficients \(a,b\) and \(c\) fulfill?
Answer
A possible basis is \(\{1,Z^2-2Z\}.\)
Question d#
Use the rank-nullity theorem (Corollary 10.4.3 in the textbook) to conclude that the given linear map \(L\) is surjective.
Hint
Saying that a linear map \(M:V_1 \to V_2\) is surjective is precisely the same as saying that the image space of the map equals the entire \(V_2\).
Answer
The rank-nullity theorem (Corollary 10.4.3 in the textbook) implies that \(\dim(\mathrm{image}(L))=\dim V_1 -\dim(\mathrm{ker}(L))=3-2=1\). Since \(\dim \mathbb{R}=1\) we can conclude that \(\mathrm{image}(L)=\mathbb{R}\) and hence that \(L\) is surjective.
Exercise 5: Injective Linear Maps#
A function \(f: A \to B\) is called injective if and only if for all \(a_1,a_2 \in A\) it holds true that \(f(a_1)=f(a_2)\) implies \(a_1=a_2\). For example see the text right 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
The wanted proposition 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\) (see for example Equation (10-1) in the textbook). If \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\), then a \({\mathbf v} \in V_1\) that is different from \(\mathbf 0\) exists such that \(L({\mathbf v})={\mathbf 0}\).
Answer sketch
If \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}\), then a \({\mathbf v} \in V_1\) that is different from \(\mathbf 0\) exists 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 and that \(\mathrm{ker}(L)=\{{\mathbf 0}\}.\) Show that in that case \(L\) is injective.
Hint
The wanted proposition 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 realise that in that case \(L({\mathbf v}_2-{\mathbf v}_1)={\mathbf 0}\).
Answer sketch
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 hence that \({\mathbf v}_2-{\mathbf v}_1 \in \ker(L)\). So, the kernel contains a vector that is not the zero vector, which implies that \(\mathrm{ker}(L) \neq \{{\mathbf 0}\}.\)
Question c#
Conclude from the previous two questions that a linear map \(L: V_1 \to V_2\) is injective if and only if \(\mathrm{ker}(L) = \{{\mathbf 0}\}.\)