We introduce in a simple way the concept of linear transformations and matrices. there is a deep connection between a linear transformation and a matrix. In fact, using the basis of the vector spaces in which the linear map is defined, we can represent this map by a matrix. Even say a map is not linear, this case happens in real life, there are techniques to linearize these maps, so we can use linear algebra material for non-linear maps.

## Generalities on linear transformations

Definition: Let $E$ and $F$ be vector spaces on a field $\mathbb{K}$, $\mathbb{R}$ or $\mathbb{C}$. A linear transformation $f: E\to F$ is an application satisfying  is linear if for any $u,v\in E$ and $\lambda\in\mathbb{K}$ we have \begin{align*} f(u+\lambda v)=f(u)+\lambda f(v).\end{align*} In this case $f$ is also called a linear map.

The first property of linear transformations $f$ is $f(0)=0$. In fact, $f(0)=f(0+0)=f(0)+f(0)=2f(0)$, which implies that $f(0)=0$.

The range of a linear transformation $f:E\to F$ is by definition the subset of $F$ defined by $\{f(u):u\in E\}$. It is a linear subspace of $F$ and will be denoted by ${\rm Ran}(f)$ of ${\rm Im}(f)$.

The kernel of a linear map $f:E\to F$ is a subset of $E$ defined by $\{u\in E:f(u)=0\},$ i.e. the vectors of $E$ in which the map $f$ vanishes. It is a linear subspace of $E$ and will be denoted by $\ker(f)$. On the other hand, if $F=\mathbb{K}$, then the linear map $f$ is called a linear forme.

If the spaces $E$ and $F$ have a finite dimension and if the map $f:E\to F$ is linear, then we have the following important result, called the Rank Theorem, \begin{align*} \dim(E)=\dim(\ker(f))+\dim({\rm Im}(f)).\end{align*} By the way the number $\dim({\rm Im}(f))$ is called the rank of $f$ and will be denoted by ${\rm rank}(f)$.

## Worksheet with detailed solutions

In this section, we offer some exercises with detailed solutions to linear transformations. We assume that the reader is familiarized with vector spaces and their properties.

Exercise: Let $E=\mathcal{C}(\mathbb{R},\mathbb{R})$ be the vector space on $\mathbb{R}$ of all continuous functions from $\mathbb{R}$ to $\mathbb{R}$. If $f$ and $g$ are real functions then the usual product of $f$ by $g$ is defined by $(fg)(x)=f(x)g(x)$ for any $x\in\mathbb{R}$. We denote by $id:\mathbb{R}\to \mathbb{R}$ the identity function, $id(x)=x$ for all $x\in \mathbb{R}$. Let us now define the application $\Phi:E\to E$ by \begin{align*} \Phi(f)=id,f,\qquad \forall f\in E. \end{align*}

• Prove that $\Phi$ is a linear transformation and determine the kernel of $\Phi$.
• Does $\Phi$ surjective?
• Determine the image of $\Phi$.

Solution: 1) Let $f,g\in E$ and $\lambda\in \mathbb{R}$. For any $x\in \mathbb{R},$ we have \begin{align*} \Phi(f+\lambda g)(x)&=id(x)(f+\lambda g)(x)\cr &= x(f(x)+\lambda g(x))\cr &= xf(x)+\lambda (xg(x))\cr &=\Phi(f)(x)+\lambda \Phi(g)(x). \end{align*} Hence \begin{align*} \Phi(f+\lambda g)=\Phi(f)+\lambda \Phi(g). \end{align*} This means that $\Phi$ is linear.

Let $f\in E$. Then \begin{align*} f\in\ker(\Phi)&\;\Longleftrightarrow\;\Phi(f)=0\cr &\;\Longleftrightarrow\;xf(x)=0,\quad \forall x\in \mathbb{R}\cr &\;\Longrightarrow f(x)=0,\quad \forall x\in \mathbb{R}\setminus\{0\}. \end{align*} By taking the limit of $f$ at zero and by using the continuity of $f$ at zero we obtain $f(0)=0$. This prove that $f=0$, so that \begin{align*} \ker(\Phi)=\{0\}. \end{align*} which means that $\Phi$ is injective.

2) Let $g\in E$ such that $g(x)=1$ for all $x\in\mathbb{R}$. Assume that there exists $f\in E$ such that $\Phi(f)=g$. Then for all $x\in \mathbb{R},$ we have $xf(x)=1$. This is impossible since for $x=0$ we will obtain $0=1$!!. Then $\Phi$ is not surjective.

3) Let $g\in {\rm Im}(\Phi)$. Then there is $f\in E$ such that $g(x)=xf(x)$ for all $x\in \mathbb{R}$. In particular, $g(0)=0$. On the other have \begin{align*} \forall x\in \mathbb{R}\setminus\{0\},\quad \frac{g(x)-g(0)}{x-0}=f(x). \end{align*} As $f$ is continuous at $0,$ we deduce that $g$ is differentiable in $0$ and $g'(0)=f(0)$. This implies that \begin{align*} {\rm Im}(\Phi)\subset \{g\in E: g(0)=0\;\text{and}\; f\;\text{is differentiable at}\; 0\}. \end{align*} Conversely, let $g\in E$ such that $g(0)=0$ and $g$ is differentiable at $0$. Then the function \begin{align*} f(x)=\begin{cases}\frac{g(x)}{x},& x\neq 0,\cr g'(0),& x=0,\end{cases} \end{align*} is an element of $E$ and $g=\Phi(f)\in {\rm Im}(\Phi)$. Hence \begin{align*} {\rm Im}(\Phi)= \{g\in E: g(0)=0\;\text{and}\; f;\text{is differentiable at}\; 0\}. \end{align*}

Exercise: Let $\mathbb{K}$ be a field and consider the $\mathbb{K}$-vector space $E=\mathbb{K}^n$ with $n\ge 0$. Let $a=(1,1,\cdots,1)\in E$ and denote \begin{align*} A&:=\mathbb{K}a={(\lambda,\lambda,\cdots,\lambda):\lambda\in \mathbb{K}}\cr B&:=\{x=(x_1,x_2,\cdots,x_n)\in E: x_1+x_2+\cdots+x_n=0\}. \end{align*} Let the linear transformation \begin{align*} f:E\to \mathbb{K},\quad f(x_1,x_2,\cdots,x_n)=\sum_{i=1}^n x_i. \end{align*}

• Determine $\ker(f)$. Deduce that $B$ is a subspace.
• Let $x\in E$. Prove that there exists a unique scalar $\lambda\in\mathbb{K}$ such that $f(x)=\lambda f(a)$.
• Justify that $A\cap B=\{0\}$.
• Deduce that the sum $A+B$ is direct, that is, $E=A\oplus B$.

Solution: 1) $A$ is not empty because $a\in A,$ just take $\lambda=1$. Observe that $A={\rm span}(a)$ the vector space generated by $a\in E$. Then $A$ is a subspace of $E$.

The kernel of $f$ is, by definition, \begin{align*} \ker(f)&=\left\{(x_1,x_2,\cdots,x_n)\in E: f(x_1,x_2,\cdots,x_n)=0\right\}\cr &  =\left\{(x_1,x_2,\cdots,x_n)\in E: x_1+x_2+\cdots+x_n=0\right\}\cr &= B. \end{align*} On the other hand, \begin{align*} (x_1,x_2,\cdots,x_n)\in \ker(f)\;\Longleftrightarrow\; x_1=-x_2-x_3-\cdots-x_n. \end{align*} Then, we can write \begin{align*} (x_1,x_2,\cdots,x_n)&=(-x_2-x_3-\cdots-x_n,x_2,\cdots,x_n)\cr & = (-x_2,x_2,0,\cdots,0)+(-x_3,0,x_3,0,\cdots,0)\cr &=\hspace{2.5cm}+\cdots +(-x_n,0,\cdots,0,x_n)\cr &= x_2 v_2+x_3 v_3+\cdots+x_n v_n, \end{align*} where for each $iin {2,3,\cdots,n}$, we denote $v_i:=(-1,0,\cdots,1,0,\cdots,0)$ where $1$ takes the $i^{\rm th}$ place. This is equivalent to \begin{align*} \ker(f)=B={\rm span}(v_2,v_3,\cdots,v_n). \end{align*} $B$ is then a subspace of $E$.

2) Let’s prove the uniqueness of $\lambda$. Assume that there exist $(\lambda,\mu)\in\mathbb{K}^2$ such that $f(x)=\lambda f(a)=\mu f(a)$. As $f(a)=n,$ we then have $(\lambda-\mu) n=0$, so that $\lambda=\mu$. Now let us prove its existence. Let $x=(x_1,x_2,\cdots,x_n)\in X$. It suffice to prove that there exist $\lambda\in\mathbb{K}$ such that $x-\lambda a\in \ker(f)$, so that \begin{align*} \sum_{i=1}^n x_i-\lambda n=0. \end{align*} It suffice to take \begin{align*} \lambda=\frac{x_1+x_2+\cdots+x_n}{n}. \end{align*}

3) Let $x\in A\cap B$ Then we have there exist $\lambda\in \mathbb{K}$ such that \begin{align*} x=\lambda a\quad\text{and}\quad x_1+x_2+\cdots+x_n=0. \end{align*} As $f$ is linear then $f(x)=\lambda f(a)$. By the previous question we have \begin{align*} \lambda=\frac{x_1+x_2+\cdots+x_n}{n}=\frac{0}{n}=0. \end{align*} Hence $x=\lambda a=0\times a=0$, so that $A\cap B=\{0\}$.

4) Because of the previous question it suffices to show that $E=A+B$. According to the question $2$, there exists $\lambda\in\mathbb{K}$ such that $f(x)=\lambda f(a)$, so that $f(x-\lambda a)=0$. Then $x-\lambda a\in \ker(f)=B$. On the other hand, $\lambda a \in A$. Thus $x=\lambda a+(x-\lambda a)\in A+B$. This ends the proof.