The image and kernel of a linear mapping are vector subspaces with certain important properties
$\displaystyle \left[\begin{matrix}1 & 2 & -1 & 0\\1 & 0 & 0 & 1\end{matrix}\right]$
Nullspace of a matrix :
[Matrix([ [ 0], [1/2], [ 1], [ 0]]),
$Im(A)=span(\begin{bmatrix}
2 \\
6 \\
\end{bmatrix})$
$T=\begin{bmatrix}
1 & 1 \\
1 & 2 \\
2 & 3
\end{bmatrix}$
The transformation matrix is
Definition: Image and Kernel
For $\Phi: V \to W $, we define the kernel or null space
$ker(\Phi)=\Phi^{-1}(0_w)=\{v \in V: \Phi(v)=0_w\}$
and image or range
$Im(\Phi) =\Phi(V)=\{w \in W| \exists v \in V: \Phi(v)=w\}$
We also call $V$ and $W$ as domain and codomain of $\Phi$, respectively.
Intuitively, the kernel is the set of vectors in $v \in V$ that $\Phi$ maps onto the neutral element $0_w \in W$. The image is the set of vectors $w \in W$ that can be “reached” by $\Phi$ from any vector in $V$ . An illustration is given in figure.
Remark: Consider a linear mapping $\Phi: V \to W$, where $V,W$ are vector spaces.
- It always holds that $\Phi(0_v)=0_w$ and therefore $0_v \in ker(\Phi)$.In particular the null space is never empty.
- $Im(\Phi) \subseteq W$ is a subspace of $W$, and $ker(\Phi) \subseteq V$ is a subspace of $V$.
Remark(Null space and Column space)
Let us consider $A \in \mathbb{R}^{m \times n}$ and a linear mapping $\Phi: \mathbb{R}^n \to \mathbb{R}^m, x \to Ax$
- for $A=[a_1,\ldots,a_n]$, where $a_i$ are the columns of $A_i$, we obtain$Im(\Phi)={Ax:x \in \mathbb{R}^n}=\sum_{i=1}^n x_ia_i : x_1,\ldots,x_n \in \mathbb{R}$ $=span[a_1,\ldots,a_n] \subseteq \mathbb{R}^m$
- i.e., the image is the span of the columns of $A$, also called the column space. Therefore, the column space(image) is a subspace of $\mathbb{R}^m$ ,where $m$ is the height of the matrix.
- $rk(A)=dim(Im(\Phi))$
- The kernel/null space $ker(\Phi)$ is the general solution to the homogenious system of linear equations $Ax=0$ and captures all possible linear combination of elements in $\mathbb{R}^n$ that produces $0 \in \mathbb{R}^m$
- The kernel is a subspace of $\mathbb{R}^n$, where $n$ is the width of the matrix.
- The kernel focuses on the relationship among the columns, and we can use it to determine whether/how we can express a column as a linear combination of other columns
Rank Nullity Theorem
For vector spaces $V,W$ and a linear mapping $\Phi:V \to W$ it holds that
$dim(ker(\Phi))+ dim(Im(\Phi))= dim(V)$
The rank nullity theorem is also referred to as the fundamental theorem of linear mapping.
If $dim(Im(\Phi)) < dim(V)$, then $ker(\Phi)$ is non trivial, i.e, the kernel contains more than $0_v$ and $dim(ker(\Phi)) \ge 1$.
If $A_\phi$ is the transformation matrix of $\Phi$ with respect to an ordered basis and $dim(Im(\Phi)) < dim(V)$, then the system of linear equations $A_\phi x=0$ has infinitely many solutions.
If $dim(V)=dim(W)$, then the following three way equivalence holds
$\Phi$ is injective
$\Phi$ is surjective
$\Phi$ is bijective
since $Im(\Phi) \subseteq W$
import sympy as sp
import numpy as np
row1=[1,2,-1,0]
row2=[1,0,0,1]
M = sp.Matrix((row1,row2))
print("Transformation Matrix")
display(M)
print("Reduced Echelon Form")
display(M.rref())
O/P
Transformation Matrix$\displaystyle \left[\begin{matrix}1 & 2 & -1 & 0\\1 & 0 & 0 & 1\end{matrix}\right]$
Reduced Echelon Form
(Matrix([ [1, 0, 0, 1],
(Matrix([ [1, 0, 0, 1],
[0, 1, -1/2, -1/2]]),
(0, 1))
Note: from the reduced echelon form we can find out the null space.
We can also sympy package nullspace method to find null space
# import sympy
from sympy import *
M = Matrix([[1, 2, -1, 0], [1, 0, 0, 1]])
display(M)
# Use sympy.nullspace() method
M_nullspace = M.nullspace()
print("Nullspace of a matrix : ")
display(M_nullspace)
O/P
$\displaystyle \left[\begin{matrix}1 & 2 & -1 & 0\\1 & 0 & 0 & 1\end{matrix}\right]$Nullspace of a matrix :
[Matrix([ [ 0], [1/2], [ 1], [ 0]]),
Matrix([
[ -1],
[1/2],
[ 0],
[ 1]])]
Watch the video https://www.youtube.com/watch?v=4SlMWZxgZFE
Example:
Find the Image and Kernel of a linear mapping $A=\begin{bmatrix}
2 &3 \\
6 & 9
\end{bmatrix}$
2 &3 \\
6 & 9
\end{bmatrix}$
After row reduction the echelon form is
$A=\begin{bmatrix}
2 &3 \\
0 & 0
\end{bmatrix}$
2 &3 \\
0 & 0
\end{bmatrix}$
$A=\begin{bmatrix}
1 &3/2 \\
0 & 0
\end{bmatrix}$
1 &3/2 \\
0 & 0
\end{bmatrix}$
So the pivot column indicate linear independent vector
2 \\
6 \\
\end{bmatrix})$
The null space is spanned by
$Null(A)=span(\begin{bmatrix}
3/2 \\
-1 \\
\end{bmatrix})$
3/2 \\
-1 \\
\end{bmatrix})$
Example ( university question)
Consider the transformation $T (x, y) = (x + y, x + 2y, 2x + 3y)$. Obtain ker $T$ and use this to calculate the nullity. Also find the transformation matrix for $T$.
The transformation matrix is
1 & 1 \\
1 & 2 \\
2 & 3
\end{bmatrix}$
The null space consist of the trivial vector
$\begin{bmatrix}0 \\
0\\
\end{bmatrix}$
0\\
\end{bmatrix}$
Given the linear transformation $T(x,y,z,w)=(x+2y-z,x+w) $, find the basis each for Ker(T) and Range(T) ( University Question)
$\begin{bmatrix}
1 & 2 & -1 & 0 \\
1 & 0 & 0 & 1 \\
\end{bmatrix}$
Basis for Range(T) is $\begin{bmatrix}
2 \\
1\\
\end{bmatrix}\begin{bmatrix}
-6 \\
-1 \\
\end{bmatrix} $
Basis for Ker(T) is
1 & 2 & -1 & 0 \\
1 & 0 & 0 & 1 \\
\end{bmatrix}$
After row reduction, the reduced echelon form is
$\begin{bmatrix}
1 & 2 & -1 & 0 \\
0 & -2 & 1 & 1 \\
\end{bmatrix} R2= R2-R1$
$\begin{bmatrix}
1 & 0 & 0 & 1 \\
0 & -2 & 1 & 1 \\
\end{bmatrix} R1=R1+R2$
$\begin{bmatrix}
1 & 0 & 0 & 1 \\
0 & 1 & -1/2 & -1/2 \\
\end{bmatrix} R2=R2/-2$
Basis for Range(T) is $\begin{bmatrix}
1 \\
1\\
\end{bmatrix}\begin{bmatrix}
2 \\
0 \\
\end{bmatrix} $
Basis for Ker(T) is $\begin{bmatrix}
0 \\
-1/2 \\
-1\\
0
\end{bmatrix}\begin{bmatrix}
1 \\
-1/2 \\
0\\
-1
\end{bmatrix} $
$\begin{bmatrix}
1 & 2 & -1 & 0 \\
0 & -2 & 1 & 1 \\
\end{bmatrix} R2= R2-R1$
$\begin{bmatrix}
1 & 0 & 0 & 1 \\
0 & -2 & 1 & 1 \\
\end{bmatrix} R1=R1+R2$
$\begin{bmatrix}
1 & 0 & 0 & 1 \\
0 & 1 & -1/2 & -1/2 \\
\end{bmatrix} R2=R2/-2$
Basis for Range(T) is $\begin{bmatrix}
1 \\
1\\
\end{bmatrix}\begin{bmatrix}
2 \\
0 \\
\end{bmatrix} $
Basis for Ker(T) is $\begin{bmatrix}
0 \\
-1/2 \\
-1\\
0
\end{bmatrix}\begin{bmatrix}
1 \\
-1/2 \\
0\\
-1
\end{bmatrix} $
Let $T$ be the linear transformation from $R^2$ to $R^3$ defined by $T(v)=Av$, with standard matrix $A=\begin{bmatrix} 2& -6 & 4 \\ 1 & -1 & 2 \end{bmatrix}$. Find the kernel and image of $T$.
After row reduction, the reduced echelon form is
$A=\begin{bmatrix} 2& -6 & 4 \\ 1 & -1 & 2 \end{bmatrix}$
$R1=R1/2$
$A=\begin{bmatrix} 1& -3& 2 \\ 1 & -1 & 2 \end{bmatrix}$
$R2=R2-R1$
$A=\begin{bmatrix} 1& -3& 2 \\ 0 & 2 & 0 \end{bmatrix}$
$R2=R2/2$
$A=\begin{bmatrix} 1& -3& 2 \\ 0 & 1 & 0 \end{bmatrix}$
$R1=R2*3 + R1$
$A=\begin{bmatrix} 1& 0& 2 \\ 0 & 1 & 0 \end{bmatrix}$
2 \\
1\\
\end{bmatrix}\begin{bmatrix}
-6 \\
-1 \\
\end{bmatrix} $
Basis for Ker(T) is
$\begin{bmatrix}
2 \\
0 \\
-1\\
\end{bmatrix}$
2 \\
0 \\
-1\\
\end{bmatrix}$
Comments
Post a Comment