Examples of linear transformation matrices In two-dimensional space R2 linear maps are described by 2 × 2 real matrices. These are some examples:
\(\mathbf{A}=\begin{pmatrix}0 & -1\\ 1 & 0\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}1 & 0\\ 0 & -1\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}-1 & 0\\ 0 & 1\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}2 & 0\\ 0 & 2\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}1 & m\\ 0 & 1\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}k & 0\\ 0 & 1/k\end{pmatrix}\)
\(\mathbf{A}=\begin{pmatrix}0 & 0\\ 0 & 1\end{pmatrix}\)
\(B = LA\)
Using the unit vector matrix we determine the transform matrix
\(B = L (\begin{pmatrix}1 \\ 0 \end{pmatrix}) = \begin{pmatrix}3 \\ 5 \end{pmatrix}\)
\(B = L (\begin{pmatrix}0 \\ 1 \end{pmatrix}) = \begin{pmatrix}2 \\ -1 \end{pmatrix}\)
\(L = \begin{pmatrix}3 & 2 \\ 5 & -1 \end{pmatrix}\)
Given above calculate
\(B = L (\begin{pmatrix}2 \\ 3 \end{pmatrix}) = ?\)
\(B = \begin{pmatrix}3 & 2 \\ 5 & -1 \end{pmatrix} \begin{pmatrix}2 \\ 3 \end{pmatrix}\) \(= \begin{pmatrix}3 & 2 \\ 5 & -1 \end{pmatrix} \begin{pmatrix}2 \\ 3 \end{pmatrix}\)
L=matrix(c(3,5,2,-1),ncol=2)
# does not matter this is "row vector". The multiply matrix will change it
# to the column vector
A=c(2,3)
B=L%*%A
> A
[1] 2 3
> L
[,1] [,2]
[1,] 3 2
[2,] 5 -1
> B
[,1]
[1,] 12
[2,] 7
In this case we do not solve for L given the unit vector results and then apply L to the input vector. Here we solve for B directly given the results of scaling the unit vector results.
\(B = L (\begin{pmatrix}2 \\ 3 \end{pmatrix}) = ?\)
\(B = L (2\begin{pmatrix}1 \\ 0 \end{pmatrix} + 3\begin{pmatrix}0 \\ 1 \end{pmatrix}) = ?\)
\(B = 2L(\begin{pmatrix}1 \\ 0 \end{pmatrix}) + 3L(\begin{pmatrix}0 \\ 1 \end{pmatrix}) = ?\)
\(B = 2\begin{pmatrix}3 \\ 5 \end{pmatrix} + 3\begin{pmatrix}2 \\ -1 \end{pmatrix} = ?\)
\(B = \begin{pmatrix}6 \\ 10 \end{pmatrix} + \begin{pmatrix}6 \\ -3 \end{pmatrix} = ?\)
\(B = \begin{pmatrix}12 \\ 7 \end{pmatrix}\)
Instead of doing the substitution method to solve n-variables and n-equations, arrange the factors in a matrix to solve for a upper triangular matrix.
\(\begin{pmatrix}2 & 4 & -2 \\ 4 & -2 & 6 \\ 6 & -4 & 2 \end{pmatrix} \begin{pmatrix}x_0 \\ x_1 \\ x_2 \end{pmatrix} =\begin{pmatrix}-10 \\ 20\\ 18 \end{pmatrix}\)
We try to form the upper diagonal so that the last row is just one factor times \(x_2\) so its trivial to solve for \(x_2\).
Take each coefficient below the diagonal and divide it by the diagonal to form the factor to reduce that row. Then multiply each term in the diagonal row by the factor and subtract from the existing values in the reducing row.
or
New Row 2 element = Row 2 element minus Row 1 element times Factor.
Factor = Row 2 elimination element / Row 1 keep element
or
Row2,column1 = 4-(2)(4/2) = 4-4=0
Row2,column2 = -2-(4)(4/2) = -2-8=-10
Row2,column3 = 6-(-2)(4/2) = 6+4 = 10
Result2,column1 = 20-(-10)(4/2) = 20+20 = 40
\(\begin{pmatrix}2 & 4 & -2 \\ 0 & -10 & +10 \\ 0 & -16 & 8 \end{pmatrix} \begin{pmatrix}x_0 \\ x_1 \\ x_2 \end{pmatrix} =\begin{pmatrix}-10 \\ 40\\ 48 \end{pmatrix}\)
Repeat for the middle diagonal.
\(\begin{pmatrix}2 & 4 & -2 \\ 0 & -10 & +10 \\ 0 & 0 & -8 \end{pmatrix} \begin{pmatrix}x_0 \\ x_1 \\ x_2 \end{pmatrix} =\begin{pmatrix}-10 \\ 40\\ -16 \end{pmatrix}\)