library(pracma)

Linear Transformation

\[T: \mathbb{C}^3\rightarrow\mathbb{C}^2,\quad T\left(\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}\right)=\begin{bmatrix}2x_1 - x_2 + 5x_3 \\ -4x_1 + 2x_2 - 10x_3\end{bmatrix}\]

For the defined linear transformation, compute the preimages:

\(T^{-1}\left(\begin{bmatrix}2\\3\end{bmatrix}\right)\) and \(T^{-1}\left(\begin{bmatrix}4\\-8\end{bmatrix}\right)\)

Finding Preimages

Finding the pre-images is another way of saying: finding the values \(x_1\), \(x_2\), and \(x_3\) such that running the transformation on a vector of those values results in the given solution vector. We can do that by treating — as a system of equations.

\[2x_1 - x_2 + 5x_3 = 2 \\ -4x_1 + 2x_2 - 10x_3 = 3\] Unfortunately, for the vector \(T\left(\begin{bmatrix}2\\3\end{bmatrix}\right)\), there is no pre-image, because there is no set of values of \(x_1\), \(x_2\), and \(x_3\) that satisfy this system of equations. Intuitively, this makes sense because looking at the left side of each equation, the second expression is exactly \(-2\) times the first. It holds that the right side of the equation must adhere to the same rule for the equations to hold.

Fortunately, in our second example, that condition is satisfied, since \(4 * -2 = -8\). We can represent our system of equations as above:

\[2x_1 - x_2 + 5x_3 = 4 \\ -4x_1 + 2x_2 - 10x_3 = -8\] This time, in order to solve, we can treat the system as an augmented matrix, like so:

aug_matrix = matrix(c(2,-1,5,4,
                      -4,2,-10,-8),
                    nrow=2,
                    byrow=TRUE)

aug_matrix
##      [,1] [,2] [,3] [,4]
## [1,]    2   -1    5    4
## [2,]   -4    2  -10   -8

As with any system of equations represented as an augmented matrix, we can attempt to solve this by reducing it to reduced row echelon form.

rref(aug_matrix)
##      [,1] [,2] [,3] [,4]
## [1,]    1 -0.5  2.5    2
## [2,]    0  0.0  0.0    0

As we can see, the second row was reduced to all 0s. Again, this makes intuitive sense, as we demonstrated the two equations are linearly dependent (they are multiples of one another).

We therefore have infinitely many solutions, but that does not mean our problem in unsolveable. Rather, we can solve for one of our variables and use arbitrary values for the others to produce a vector.

\[x_1 - (1/2)x_2 + (5/2)x_3 = 2\\x_1 = (1/2)x_2 - (5/2)x_3 + 2\] If we decide that \(x_2\) and \(x_3\) both equal \(0\), that means:

\[x_1 = (1/2)(0) - (5/2)(0) + 2\\x_1 = 2\] Plugging that vector back into \(T\), we can confirm it is a valid preimage for the transformation.

\[T\left(\begin{bmatrix}2\\0\\0\end{bmatrix}\right)=\begin{bmatrix}2(2) - (0) + (0) \\ -4(2) + (0) - (0)\end{bmatrix}=\begin{bmatrix}4\\-8\end{bmatrix}\]