Section 3 Problem Set 3
- Due: Tuesday February 9 by noon CST.
- Upload your solutions to Moodle in a PDF.
- Please feel free to use RStudio for all row reductions.
- You can download the Rmd source file for this problem set.
The Problem Set covers sections 1.8, 1.9, 2.1, 2.2.
3.1 Linear Transformations
In each case below, if the transformation is linear, then find is matrix. If it is not linear, then demonstrate that it is not linear by showing, with a specific example, that one of the properties of being linear is broken.
The transformation \(T\) is given by: \[T \left( \begin{bmatrix} x_1 \\ x_2 \\ \end{bmatrix}\right) = \begin{bmatrix} x_1 + x_2 \\ 2 x_1 \\ -x_2 \\\end{bmatrix}. \]
The transformation \(T\) is given by: \[T \left( \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \right)= \begin{bmatrix} x_1 + x_2 + x_3 \\ x_1 x_2 \\ -x_2 + 2 x_3 \end{bmatrix}. \]
The transformation \(L: \mathbb{R}^2 \to \mathbb{R}^2\) sends the shaded region on the left to the the shaded region on the right such that \(A\) maps to \(A\), \(B\) maps to \(B\), \(C\) maps to \(C\), and \(D\) maps to \(D\).
\(\qquad \qquad\)
- The transformation \(R: \mathbb{R}^2 \to \mathbb{R}^2\) sends the shaded region on the left to the the shaded region on the right such that \(A\) maps to \(A\), \(B\) maps to \(B\), \(C\) maps to \(C\), and \(D\) maps to \(D\).
\(\qquad \qquad\)
3.2 Partial Information about a Linear Transformation
We are given that \(T: \mathbb{R}^4 \rightarrow \mathbb{R}^3\) is a linear transformation such that: \[ T\left(\begin{bmatrix} 3 \\ ~2~ \\ 1 \\ 2 \end{bmatrix} \right)=\begin{bmatrix} ~2~ \\ 3 \\ 6 \end{bmatrix} \qquad\hbox{and}\qquad T\left(\begin{bmatrix}~~2 \\ -1 \\ 0 \\ -1 \end{bmatrix} \right)=\begin{bmatrix} 2 \\ ~0~ \\ 1 \end{bmatrix}. \] Use this information to compute the value of \(T\) below? \[T\left(\begin{bmatrix} 5 \\ 8 \\ ~3~ \\ 8 \end{bmatrix} \right) = \hskip5in\]
3.3 House Renovations
Below are two linear transformations \(T: \mathbb{R}^2 \to \mathbb{R}^2\) that transform my house as shown. Find the matrix of each of these transformations (hint: use the base, the doorway and the peak of the roof as a guide).
- Transformation #1
\(\qquad \qquad\)
- Transformation #2
\(\qquad \qquad\)
3.4 Matrix of a Nonlinear Transformation?
This problem illustrates what happens if you try to make the matrix of a transformation that is not linear. Consider the transformation \(T\) defined by \[ T \left( \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \right) = \begin{bmatrix} x_1 + x_2^2 + x_3 \\ 2 x_2 + x_1 x_3 + 1 \\ 2 x_1 + 3 x_2 + x_3 \end{bmatrix} \] a. Show that this is not a linear transformation by demonstrating, with a specific example, that one of the rules of being linear is not true.
- Now. let’s see what happens if we compute its matrix anyway. Compute \(T(\mathbf{e}_1)\), \(T(\mathbf{e}_2)\), and \(T(\mathbf{e}_3)\), and put the vectors you get in the columns of a matrix \(A\). Then compute the product below: \[ \underbrace{\begin{bmatrix} \cdot & \cdot & \cdot \\ \cdot & \cdot & \cdot \\ \cdot & \cdot & \cdot \\ \end{bmatrix}}_{A} \begin{bmatrix} x_1 \\ x_ 2 \\ x_3 \end{bmatrix} = \] Explain how the result of this computation demonstrates that \(T\) is not linear.
3.5 A Proof
Let \(T: \mathbb{R}^n \to \mathbb{R}^m\) be a linear transformation. Suppose that \(\{v_1, v_2, v_3, v_4\}\) is a linearly independent set of vectors in \(\mathbb{R}^n\) but the set of images \(\{T(v_1), T(v_2), T(v_3), T(v_4)\}\) is a linearly dependent set in \(\mathbb{R}^m\). In the following steps, you will prove that \(T\) is not one-to-one.
Write out clearly, using the definition, what it means for \(\{v_1, v_2, v_3, v_4\}\) to be linearly independent.
Write out clearly, using the definition, what it means for \(\{T(v_1), T(v_2), T(v_3), T(v_4)\}\) to be linearly dependent.
Use the definition of linear transformation and parts (a) and (b) above to argue that \(T(x) = \vec{0}\) for some nonzero vector \(x \in \mathbb{R}^n\).
Explain why this tells us that \(T\) is not one-to-one.
3.6 Inner and Outer Products
We can also think of vectors as matrix. A column vector is an \(n \times 1\) matrix and a row vector is a \(1 \times n\) matrix.
- Compute the following products. These matrix products are called inner products (or dot products) of the vectors.
\[ \begin{bmatrix} 4 & -1 & 2 & 3\end{bmatrix} \begin{bmatrix} 1 \\ 2 \\1 \\3 \\\end{bmatrix} = \hskip3in \] \[ \begin{bmatrix} 4 & -1 & 2 & 3\end{bmatrix} \begin{bmatrix} 1 \\ 1 \\1 \\1 \\\end{bmatrix} = \hskip3in \] \[ \begin{bmatrix} 4 & -1 & 2 & 3\end{bmatrix} \begin{bmatrix} 2 \\ 5 \\ 0 \\ -1 \\\end{bmatrix} = \hskip3in \] b. Now compute the following products. These are called outer products.
\[ \begin{bmatrix} 1 \\ 2 \\1 \\3 \\\end{bmatrix} \begin{bmatrix} 1 & -5 & 2 & 3\end{bmatrix} = \hskip3in \]
\[ \begin{bmatrix} 1 \\ 2 \\1 \\3 \\\end{bmatrix} \begin{bmatrix} 1 & 1 & 1 & 1\end{bmatrix} =\hskip3in \]
- Row reduce both of the matrices that you get in part b (this should be easy to do by hand,but you can use R if you want to). How many pivots do you get? Explain why you always get this number of pivots when you row reduce an outer product.
3.7 Archaeological Seriation
The matrix \(A\) below is used in archaeological dating. Its rows correspond to four different grave sites \(G_1, G_2, G_3, G_4\) and its columns correspond to five types of pottery\(P_1, P_2, P_3, P_4, P_5\). There is a 1 in position \(i\)-\(j\) if pottery type \(P_j\) is found in grave \(G_i\) (and a 0 otherwise). \[ A=\begin{array}{c|ccccc} & P_1 & P_2 & P_3 & P_4 & P_5 \\ \hline G_1 & 1 & 1 & 0 & 1 & 1 \\ G_2 & 0 & 0 & 1 & 0 & 1 \\ G_3 & 0 & 1 & 1 & 0 & 1 \\ G_4 & 1 & 1 & 1 & 1 & 1 \\ \end{array} \]
Compute the matrix \(\mathbf{G} = A A^T\), where \(A^T\) is the transpose of \(A\), meaning that the rows and columns have been interchanged.
Give the meaning of the \(i\)-\(j\) entry of \(\mathbf{G}\) (the entry in row \(i\) and column \(j\)). State clearly the meaning of this entry using complete sentences (or sentence) and explain why it has this meaning.
3.8 Rental Car
Solve this problem using R and turn in a markdown file knitted to .html.
A group of Macalester alumni open a rental car company specializing in renting electric cars. As a start, they have opened offices in St. Paul, Rochester, and Duluth. Through market research they find that of the cars rented in St. Paul, 85% will get returned in St. Paul, 9% will get returned in Rochester, and 6% will get returned in Duluth. Of the cars rented in Rochester, 30% will get returned in St. Paul, 60% will get returned in Rochester, and 10% in Duluth. Of the cars rented in Duluth, 35% will get returned in St. Paul, 5% in Rochester, and 60% in Duluth. This information is represented in the matrix below.
= c(.85,.09,.06)
StP = c(.30,.60,.10)
Roch = c(.35,.05,.60)
Dul = cbind(StP,Roch,Dul)
M M
## StP Roch Dul
## [1,] 0.85 0.3 0.35
## [2,] 0.09 0.6 0.05
## [3,] 0.06 0.1 0.60
Such a matrix is called a probability matrix or a stochastic matrix because it contains numbers between 0 and 1 and each of its columns sum to 1.
The owners are trying to use this data to estimate how much of their fleet will be at each location on average in the long run. Assume that initially they locate 20 cars in each city. This can be recorded by the vector
v0 = c(20,20,20)
. Apply, M to v0, call this vector v1, and explain, using how the matrix-vector product works, why v1 represents the number of cars at each location one day later (for simplicity, we assume that each rental is for 1 day).Now apply M to v1 and call it v2. This should represent the number of cars at each location 2 days later. Also compute the square of the matrix M and call it M2. Confirm that M2 times v0 is the same as M times v1.
Write a for loop that applies M over and over again to see what happens to the distribution of cars in the long-run (we will learn how to do this in class but you can also probably just google it). Does this sequence stabilize or does it keep changing after each application? If it does stabilize, how long does it take to stabilize (to within 0.1 cars at each location).
Does the starting distribution matter? Try 4 different starting distributions (with a total of 60 cars) and see what the final distribution looks like in each case. For one of your 4 starting distributions, try all 60 cars at one of the locations.