#Installing pracma package
install.packages("pracma", dependencies = TRUE, repos = "http://mirrors.nics.utk.edu/cran/")
## Installing package into 'C:/Users/Lelan/Documents/R/win-library/3.4'
## (as 'lib' is unspecified)
## package 'pracma' successfully unpacked and MD5 sums checked
## 
## The downloaded binary packages are in
##  C:\Users\Lelan\AppData\Local\Temp\RtmpQhLdA6\downloaded_packages
library(pracma)

Exercise C30, page 444

\[\textrm{Define the linear transformation } \textit{T: }\mathbb{C}^3\rightarrow\mathbb{C}^2, \textit{T} \left ( \left [ \begin{array}{c} x_1\\ x_2\\ x_3\\ \end{array}\right ]\right ) = \left [ \begin{array}{c} 2x_1 - x_2 + 5x_3\\ -4x_1 + 2x_2 - 10x_3\\ \end{array}\right ] \]

\[\textrm{Compute the preimages, }\textit{T}^{-1} \left ( \left [ \begin{array}{c} 2\\ 3\\ \end{array}\right ]\right ) and \textit{T}^{-1} \left ( \left [ \begin{array}{c} 4\\ -8\\ \end{array}\right ]\right )\]

\[\textrm{The first preimage is the span of vectors }x\textrm{ such that }\textit{T}(x) = \left [ \begin{array}{c} 2\\ 3\\ \end{array}\right ]\]

\[\textrm{Which is }\left [ \begin{array}{c} 2x_1 - x_2 + 5x_3\\ -4x_1 + 2x_2 - 10x_3\\ \end{array}\right ] = \left [ \begin{array}{c} 2\\ 3\\ \end{array}\right ]\]

#Matrix for first preimage
pi1 <- matrix(c(2,-4,-1,2,5,-10,2,3),nrow=2)
pi1
##      [,1] [,2] [,3] [,4]
## [1,]    2   -1    5    2
## [2,]   -4    2  -10    3
#Matrix pi1 in row reduced-echelon form
pi1r = rref(pi1)
pi1r
##      [,1] [,2] [,3] [,4]
## [1,]    1 -0.5  2.5    0
## [2,]    0  0.0  0.0    1

You can see from the second row of the reduced matrix that the system of equations is inconsistent, which means there are no preimages (empty set).


\[\textrm{The second preimage is the span of vectors }x\textrm{ such that }\textit{T}(x) = \left [ \begin{array}{c} 4\\ -8\\ \end{array}\right ]\]

#Matrix for second preimage
pi2 <- matrix(c(2,-4,-1,2,5,-10,4,-8),nrow=2)
pi2
##      [,1] [,2] [,3] [,4]
## [1,]    2   -1    5    4
## [2,]   -4    2  -10   -8
#Matrix pi2 in row reduced-echelon form
pi2r = rref(pi2)
pi2r
##      [,1] [,2] [,3] [,4]
## [1,]    1 -0.5  2.5    2
## [2,]    0  0.0  0.0    0

In the case, the reduced row-echelon matrix indicates that the system of equations is consistent, and because the bottom row of the matrix is all zeroes, variables \(x_2\) and \(x_3\) are free variables, which tells us there are infinite solutions. Using the vector form of solutions to linear systems, we can define the span of preimage vectors as:

\[\textit{T}^{-1} \left ( \left [ \begin{array}{c} 4\\ -8\\ \end{array}\right ]\right ) = \left \{ \left [ \begin{array}{c} 2\\ 0\\ 0\\ \end{array} \right ] - x_2 \left [ \begin{array}{c} \frac{1}{2}\\ 1\\ 0\\ \end{array} \right ] + x_3 \left [ \begin{array}{c} \frac{-5}{2}\\ 0\\ 1\\ \end{array} \right ] \Bigg| x_2, x_3 \in \mathbb{C} \right \} \]