M10, p444: Define two linear transformations, T : C⁴ → C³ and S : C³ → C² by
\[S (\begin{bmatrix} x1\\ x2\\ x3\\ \end{bmatrix}) = \begin{bmatrix} x1 - 2x2 + 3x3 \\ 5x1 + 4x2 + 2x3\\ \end{bmatrix}\]
\[T (\begin{bmatrix} x1\\ x2\\ x3\\ x4\\ \end{bmatrix}) = \begin{bmatrix} -x1 - 3x2 + x3 + 9x4 \\ 2x1 + x3 + 7x4\\ 4x1 + 2x2 + x3 + 2x4\\ \end{bmatrix}\]
Using the proof of Theorem MLTCV compute the matrix representations of the three linear transformations T , S and S ◦ T . Discover and comment on the relationship between these three matrices.
Solution:
Theorem MLTCV: Matrix of a Linear Transformation, Column Vectors- Suppose that T : Cn → Cm is a linear transformation. Then there is an m x n matrix A such that T (x) = Ax.
In this proof, columns of the identity matrix of size n are used as input vectors for each linear transformation. The resulting matrix representations are m x n matrices with dimensions based on the transformation Cn → Cm. The matrix representation of S will therefore be a 2 x 3 matrix and T will be a 3 x 4 matrix. Here are the matrices that represent S and T:
\[S = \begin{bmatrix} 1 & -2 & 3\\ 5 & 4 & 2\\ \end{bmatrix}\]
\[T = \begin{bmatrix} -1 & -3 & 1 & 9\\ 2 & 0 & 1 & 2\\ 4 & 2 & 1 & 2\\ \end{bmatrix}\] \[T (\begin{bmatrix} x1\\ x2\\ x3\\ x4\\ \end{bmatrix}) = \begin{bmatrix} -x1 - 3x2 + x3 + 9x4 \\ 2x1 + x3 + 7x4\\ 4x1 + 2x2 + x3 + 2x4\\ \end{bmatrix}\]
The matrix S * T can be found by multipling the matrix represenation of S by T.
matrixS <- matrix(c(1, 5, -2, 4, 3, 2), 2,3)
matrixT <- matrix(c(-1, 2, 4, 3, 0, 2, 1, 1, 1, 9, 7, 2), 3, 4)
matrixSbyT <- matrixS %*% matrixT
print(matrixSbyT)
## [,1] [,2] [,3] [,4]
## [1,] 7 9 2 1
## [2,] 11 19 11 77
matrix2latex <- function(
M, one_line = TRUE, print = TRUE, ret = !print) {
M <- as.matrix(M)
if (one_line) {
newline = ' '
} else {
newline = '\n'
}
rows <- apply(M, 1, function(r) paste0(r, collapse = ' & '))
rows_collapsed <- paste0(rows, collapse = paste0(' \\\\', newline))
latex <- paste0(
c('\\begin{bmatrix}', rows_collapsed, '\\end{bmatrix}'),
collapse = newline)
if (print) message(latex)
if (ret) return(latex)
invisible()
}
matrix2latex(matrixSbyT)
## \begin{bmatrix} 7 & 9 & 2 & 1 \\ 11 & 19 & 11 & 77 \end{bmatrix}
The matrix representation of S * T is equal to:
\[\begin{bmatrix} 7 & 9 & 2 & 1 \\ 11 & 19 & 11 & 77 \end{bmatrix}\] Or expressed as a linear transformation S * T: C4 → C2
\[S * T (\begin{bmatrix} x1\\ x2\\ x3\\ x4\\ \end{bmatrix}) = \begin{bmatrix} 7x1 + 9x2 + 2x3 + x4\\ 11x1 + 19x2 + 11x3 + 77x4\end{bmatrix}\]