% This is lecture no. 7 of MH1201/: Linear Algebra II.

\chapter{Properties of Linear Transformations}%
\label{cha:properties_of_linear_transformations}

\section{One-to-one and onto}%
\label{sec:one_to_one_and_onto}



For further study of properties of linear transformations, the concept of \textbf{one-to-one} and \textbf{onto} mappings is needed.
\begin{definition}
	One-to-one, onto, and bijective.
	A mapping $\mathsf{T}$ is \textbf{one-to-one} (or \textbf{injective}), if:
	\[
		x\neq y\implies \mathsf{T}(x)\neq \mathsf{T}(y) \iff \mathsf{T}(x) = \mathsf{T}(y) \implies x=y
	.\]
	That is, distinct elements of $\mathsf{V}$ must have distinct images in W.
	$\mathsf{T}$ is \textbf{onto} (or \textbf{surjective}), if:
	\[
		\mathsf{T}(\mathsf{V})=\mathsf{W}
	.\]
	That is, the range of $\mathsf{T}$ is $\mathsf{W}$.
	$\mathsf{T}$ is \textbf{bijective} if it is both injective and surjective.
\end{definition}
\begin{exmp}
	Let $\mathsf{T}:\mathbb{R}^2\mapsto\mathbb{R}^2$ be defined by:
	\[
		\mathsf{T}(v) = Av,\quad A =
		\begin{bmatrix}
			1 & 1\\
			-1 & 0\\
		\end{bmatrix}
	.\]
	Show that $\mathsf{T}$ is one-to-one and onto.
	\begin{sol}
		To show that $\mathsf{T}$ is one-to-one, let:
		\[
		u =
		\begin{bmatrix}
			u_1\\
			u_2\\
		\end{bmatrix}
		,\qquad
		v = 
		\begin{bmatrix}
			v_1\\
			v_2\\
		\end{bmatrix}
		.\]
		Then:
		\begin{equation*}
			\mathsf{T}(u) =
			\begin{bmatrix}
				1 & 1\\
				-1 & 0\\
			\end{bmatrix}
			\cdot
			\begin{bmatrix}
				u_1\\
				u_2\\
			\end{bmatrix}
			,\qquad \mathsf{T}(v) =
			\begin{bmatrix}
				1 & 1\\
				-1 & 0\\
			\end{bmatrix}
			\cdot
			\begin{bmatrix}
				v_1\\
				v_2\\
			\end{bmatrix}
		\end{equation*}
		Now if $\mathsf{T}(u)=\mathsf{T}(v)$, then:
		\[
		\begin{bmatrix}
			u_1+u_2\\
			-u_1\\
		\end{bmatrix}
		=
		\begin{bmatrix}
			v_1+v_2\\
			-v_1\\
		\end{bmatrix}
		.\]
		The last matrix equation gives $u_1=v_1$, $u_2=v_2$, that is, $u=v$.
		Thus $\mathsf{T}$ is one-to-one.
		To show that $\mathsf{T}$ is onto, take an arbitrary $w= \begin{bmatrix} a\\ b\\ \end{bmatrix}\in\mathbb{R}^2$.
		We must show that there is a vector $v = \begin{bmatrix} v_1\\ v_2\\ \end{bmatrix}\in\mathbb{R}^2$ such that:
		\[
			\mathsf{T}(v) =
			\begin{bmatrix}
				1 & 1\\
				-1 & 0\\
			\end{bmatrix}
			\cdot
			\begin{bmatrix}
				v_1\\
				v_2
			\end{bmatrix}
			=
			\begin{bmatrix}
				a\\
				b\\
			\end{bmatrix}
			\iff
			\begin{bmatrix}
				v_1+v_2\\
				-v_1\\
			\end{bmatrix}
			=
			\begin{bmatrix}
				a\\
				b\\
			\end{bmatrix}
		.\]
		The last matrix equation gives $v_1=-b$, $v_2=a+b$.
		Thus $\mathsf{T}$ is onto.
	\end{sol}
\end{exmp}
For a linear transformation, both of these concepts are connected to the rank and nullity of the transformation.
The following result gives a useful way to detrmine whether a linear transformation is one-to-one.
\begin{thrm}
	Consider the linear transformation:
	\[
	\mathsf{T}:\mathsf{V}\mapsto \mathsf{W}
	.\]
	Then the followng bijective statement holds true:
	\[
		\mathsf{T}\text{ one-to-one }\iff
		N(\mathsf{T})=\{0\}
	.\]
	That is, the null space only contains the trivial solution.
\end{thrm}
\begin{proof}
	$\mathsf{T}$ one-to-one $\iff N(\mathsf{T})=\{0\}$.
	Suppose that $\mathsf{T}$ is one-to-one and $v\in N(\mathsf{T})$.
	Now, we must show that $v=0$.
	Indeed:
	\[
		\begin{aligned}
			v\in N(\mathsf{\mathsf{T}}) & \implies \mathsf{\mathsf{T}}(v) = 0\\
			\mathsf{\mathsf{T}}\text{ linear } & \implies \mathsf{\mathsf{T}}(0) = 0\\
		\end{aligned}
		\implies
		v=0
	.\]
	Since $\mathsf{T}$ is one-to-one.
	Thus $N(\mathsf{T})=\{0\}$.
	Now, suppose that $\mathsf{T}(u)=\mathsf{T}(v)$.
	Then $0=\mathsf{T}(u)-\mathsf{T}(v)$.
	By linearity of $\mathsf{T}$, we have $\mathsf{T}(u)-\mathsf{T}(v)=\mathsf{T}(u-v)$.
	Then we get $\mathsf{T}(u-v)=0$, which means that $u-v\in N(\mathsf{T})=\{0\}$.
	So $u-v=0$ or $u=v$.
	Thus $\mathsf{T}$ is one-to-one.
\end{proof}
\begin{exmp}
	Consider the linear transformation $\mathsf{T}:\mathbb{R}^2\mapsto\mathbb{R}^2$ defined by:
	\[
	\mathsf{T}
	\begin{bmatrix}
		x\\
		y\\
	\end{bmatrix}
	=
	\begin{bmatrix}
		2x-3y\\
		5x+2y\\
	\end{bmatrix}
	.\]
	Use the theorem above to prove that $\mathsf{T}$ is one-to-one.
	\begin{sol}
		The vector $ \begin{bmatrix} x\\ y\\ \end{bmatrix}$ is in $N(\mathsf{T})$ if and only if:
		\begin{align*}
			2x - 3y & = 0\\
			5x + 2y & = 0
		\end{align*}
		This linear system has the unique solution $x=y=0$.
		Thus $N(\mathsf{T})=\{0\}$ and hence by the theorem above, $\mathsf{T}$ is one-to-one.
	\end{sol}
\end{exmp}

In general, a linear transformation may be one-to-one without being onto and may be onto without being one-to-one.
Surprisingly, these properties are equivalent in an important special case.
\begin{thrm}
	Consider the linear transformation $\mathsf{T}:\mathsf{V}\mapsto \mathsf{W}$ where:
	\[
		\dim(\mathsf{V}) = \dim(\mathsf{W})<\infty
	.\]
	Then the following are equivalent:
	\begin{enumerate}
		\item $\mathsf{T}$ is \textbf{one-to-one}
		\item $\mathsf{T}$ is \textbf{onto}
		\item rank($\mathsf{T}$) = $\dim(\mathsf{V})$, that is $\dim(R(\mathsf{T}))=\dim(\mathsf{V})$
	\end{enumerate}
\end{thrm}
\begin{proof}
	Linear transformations that preserve dimension are bijective.
	We use the \textbf{dimension theorem}:
	\[
		\dim(N(\mathsf{T})) + \dim(R(\mathsf{T})) = \dim(\mathsf{V})
	.\]
	By the theorem above:
	\begin{align*}
		\mathsf{T}\text{ is one-to-one } & \iff N(\mathsf{T}) = \{0\}\\
					& \iff \dim(N(\mathsf{T})) = 0\\
					& \iff \dim(R(\mathsf{T})) = \dim(\mathsf{V}) \iff \dim(R(\mathsf{T})) = \dim(\mathsf{W})\\
					& \iff \dim(R(\mathsf{T})) = \dim(\mathsf{W})
	\end{align*}
	Since $R(\mathsf{T})\subseteq \mathsf{W}$, the last equality is equivalent to $R(\mathsf{T})=\mathsf{W}$, which means that $\mathsf{T}$ is onto.
\end{proof}
\begin{exmp}
	Consider the linear transformation $\mathsf{T}:P_2(\mathbb{R})\mapsto P_3(\mathbb{R})$ defined by:
	\[
		\mathsf{T}(f(x)) = 2f^{\prime}(x)+\int_{0}^{x} 3f(t) \ud t
	.\]
	\begin{sol}
		Since $\left\{1,x,x^2\right\}$ is a basis for $P_2(\mathbb{R})$, we have:
		\begin{align*}
			R(\mathsf{T}) & = \mspan\left(\left\{\mathsf{T}(1), \mathsf{T}(x), \mathsf{T}\left(x^2\right)\right\}\right)\\
			     & = \mspan\left(\left\{3x, 2 + \frac{3}{2}x^2, 4x + x^3\right\}\right)
		\end{align*}
		We can confirm that $\left\{3x, 2 + \frac{3}{2}x^2, 4x+x^3\right\}$ is linearly independent, then:
		\[
			\text{rank}(\mathsf{T}) = \dim(R(\mathsf{T})) = 3
		.\]
		Because $\dim(P_3(\mathbb{R}))=4$, $\mathsf{T}$ is not onto.
		From the dimension theorem, $\dim(N(\mathsf{T}))+3=3$, so $\dim(N(\mathsf{T}))=0$, and therefore, $N(\mathsf{T})=\{0\}$.
		This means that $\mathsf{T}$ is one-to-one.
	\end{sol}
\end{exmp}

\section{Uniqueness of linear transformations}%
\label{sec:uniqueness_of_linear_transformations}



One of the most important properties of a linear transformation is that it is completely determined by its action on a basis.

\begin{thrm}
	\label{uniq}
	Unique Linear Transformation.
	Suppose that we have vector spaces $\mathsf{V}$ \& $\mathsf{W}$ over the field $F$.
	And suppose that $\mathsf{V}$ has a basis:
	\[
	\left\{v_1,v_2,\dotsc,v_n\right\}
	.\]
	Then for every set $w_1,w_2,\dotsc,w_n\in \mathsf{W}$, there exists uniquely a linear transformation $\mathsf{T}:\mathsf{V}\mapsto \mathsf{W}$ depending on the set such that:
	\[
		\mathsf{T}(v_i)=w_i,\ \forall i= 1,2,\dotsc,n
	.\]
\end{thrm}
\begin{proof}
	Existence of unique linear transformation.
	For this proof, we have to prove two parts, the existence and the uniqueness of $\mathsf{T}$.
	To prove existence, we let $v\in \mathsf{V}$. Then $v$ can be represented uniquely in the form:
	\[
	v = \sum_{i=1}^{n} \lambda_i v_i
	,\]
	where $\lambda_1,\lambda_2,\dotsc,\lambda_n$ are scalars.
	Then, let us define $\mathsf{T}:\mathsf{V}\mapsto \mathsf{W}$ by the rule:
	\[
		\mathsf{T}(v) = \sum_{i=1}^{n} \lambda_iw_i
	.\]
	We can prove that $\mathsf{T}$ is linear.
	Indeed, for $u,v\in \mathsf{V}$ and $\lambda \in F$ there are scalars $a_1,a_2,\dotsc,a_n$ and $b_1,b_2,\dotsc,b_n$ such that:
	\[
	u = \sum_{i=1}^{n} a_iv_i
	\quad
	\text{and}
	\quad
	v = \sum_{i=1}^{n} b_iv_i
	.\]
	Then $\lambda u+v=\ds{\sum_{i=1}^{n} (\lambda a_i+b_i)v_i}$, and so
	\begin{align*}
		\mathsf{T}(\lambda u+v) & = \mathsf{T}\left(\sum_{i=1}^{n} (\lambda a_i+b_i)v_i\right)\\
			       & = \sum_{i=1}^{n} (\lambda a_i+b_i)w_i\\
			       & = \lambda \sum_{i=1}^{n} a_i w_i + \sum_{i=1}^{n} b_iw_i\\
			       & = \lambda \mathsf{T}(u) + \mathsf{T}(v).
	\end{align*}
	Thus it is clear that:
	\[
		\mathsf{T}(v_i)=w_i\ \forall i = 1,2,\dotsc,n
	.\]
	To prove the transformation's uniqueness, we first suppose that there exists another linear transformation $\mathsf{U}:\mathsf{V}\mapsto \mathsf{W}$ such that $\mathsf{U}(v_i)=w_i$ for $i=1,2,\dotsc,n$.
	Then for $v\in \mathsf{V}$ with $v=\ds{\sum_{i=1}^{n} \lambda_iv_i}$, we have:
	\[
		\mathsf{U}(v) = \sum_{i=1}^{n} \lambda_i\mathsf{U}(v_i) = \sum_{i=1}^{n} \lambda_iw_i = \mathsf{T}(v)
	.\]
	Thus $\mathsf{U}(v) = \mathsf{T}(v)$, $\forall v\in \mathsf{V}$, that is $\mathsf{U}=\mathsf{T}$.
\end{proof}
\begin{exmp}
	Let $\mathsf{T}:\mathbb{R}^2\mapsto\mathbb{R}^2$ be a linear transformation defined by:
	\[
		\mathsf{T}(a_1,a_2) = (2a_2-a_1,3a_1)
	.\]
	And let $\mathsf{U}:\mathbb{R}^2\mapsto\mathbb{R}^2$ be a linear transformation.

	If we know that $\mathsf{U}(1,2) = (3,3)$ and $\mathsf{U}(1,1)=(1,3)$, then $\mathsf{U}=\mathsf{T}$.
	This follows from the fact that $\left\{(1,2),(1,1)\right\}$ is a basis for $\mathbb{R}^2$.
\end{exmp}
