Each lab worksheet will contain several activities, most of which will involve writing math on paper, and some of which will involve running code in a Jupyter Notebook. To receive credit for todayβs lab, you must show your lab TA your work on this worksheet.
While you must get checked off by your lab TA individually, we encourage you to form groups with 1-2 other students to complete the activities together.
Review: Inverses. For a square matrix \(A\), an inverse is a matrix \(A^{-1}\) satisfying
$$ A^{-1}A=AA^{-1}=I. $$
Thus \(A^{-1}(A\vec x)=\vec x\) for every input \(\vec x\). A square matrix with an inverse is invertible; one without an inverse is singular.
Activity 1: A quick check
Let \(D=\begin{bmatrix}-2&0\\0&3\end{bmatrix}\) and \(E=\begin{bmatrix}-1/2&0\\0&1/3\end{bmatrix}\). Verify that \(E=D^{-1}\) by computing both products in the definition above. Explain geometrically how \(E\) undoes \(D\).
So \(\boxed{E=D^{-1}}\). The matrix \(D\) flips the sign of the horizontal coordinate and stretches it by a factor of \(2\), and stretches the vertical coordinate by a factor of \(3\). The matrix \(E\) flips the horizontal sign back and scales the coordinates by \(1/2\) and \(1/3\), undoing both stretches.
Activity 2: Undo the motion
Find the inverse of each matrix below without using the formula given in Activity 3. Instead, use geometry and/or your understanding of the given transformation. Verify your answers by multiplying.
a)
The matrix \(Q=\begin{bmatrix}0&-1\\1&0\end{bmatrix}\) rotates counterclockwise by \(90^\circ\). Describe the inverse transformation and write \(Q^{-1}\).
Solution
To undo a counterclockwise rotation by \(90^\circ\), rotate clockwise by \(90^\circ\). This sends \(\begin{bmatrix}x\\y\end{bmatrix}\) to \(\begin{bmatrix}y\\-x\end{bmatrix}\), so
The shear \(S=\begin{bmatrix}1&2\\0&1\end{bmatrix}\) sends \(\begin{bmatrix}x\\y\end{bmatrix}\) to \(\begin{bmatrix}x+2y\\y\end{bmatrix}\). Explain how to recover the original coordinates from the output, and use this to find \(S^{-1}\).
Solution
The second coordinate doesnβt change. To recover the first coordinate, subtract twice the second coordinate from the first. In other words, the inverse sends \(\begin{bmatrix}u\\v\end{bmatrix}\) to \(\begin{bmatrix}u-2v\\v\end{bmatrix}\), so
For which values of \(t\) is \(M=\begin{bmatrix}4&-2\\3&t\end{bmatrix}\) invertible? For the value of \(t\) that makes \(M\) singular, describe the span of its columns and explain why some output vectors cannot be reached.
Solution
The determinant is \(4t-(-2)(3)=4t+6\). Thus, \(M\) is invertible exactly when
$$ \boxed{t\ne-\frac32}. $$
When \(t=-3/2\), the second column is \(-1/2\) times the first. Their span is therefore the line
Every output \(M\vec x\) is a linear combination of these columns, so it lies on this line. A vector outside the line, such as \(\begin{bmatrix}1\\0\end{bmatrix}\), cannot be an output. There is no way to undo \(M\) on all of \(\mathbb R^2\).
Write \(A\vec x=\vec b\) as a system of two equations in the two unknowns \(x_1\) and \(x_2\). Then solve the system using \(A^{-1}\) and verify your solution.
Checking in the original equations, \(4(2)-2(1)=6\) and \(3(2)+2(1)=8\), as needed.
b)
Suppose the first entry of \(\vec b\) increases by \(1\) while the second stays fixed. How do \(x_1\) and \(x_2\) change? Explain how your answer is encoded in a column of \(A^{-1}\) and why the change does not depend on the original entries of \(\vec b\).
Solution
Increasing the first entry of \(\vec b\) by \(1\) adds \(\begin{bmatrix}1\\0\end{bmatrix}\) to \(\vec b\). The new solution is
So \(\boxed{x_1\text{ increases by }1/7}\) and \(\boxed{x_2\text{ decreases by }3/14}\). Multiplying by \(\begin{bmatrix}1\\0\end{bmatrix}\) picks out the first column of \(A^{-1}\). The change depends only on this column and the change in \(\vec b\), not on the original entries of \(\vec b\).
Activity 5: Undo a sequence
An image editor first stretches horizontally by a factor of \(2\), then applies a horizontal shear:
Find the combined matrix \(C\) and its inverse. Express \(C^{-1}\) as a product involving \(D^{-1}\) and \(S^{-1}\), and explain the order in terms of undoing the two edits.
Solution
Stretching first and then shearing gives \(S(D\vec x)\), so
where \(I\) and \(0\) are the identity and zero matrices of the same shape as \(A\). Find an expression for \(A^{-1}\) in terms of powers of \(A\), and justify why it is an inverse.
Solution
Move the constant term to the other side and factor out \(A\):
We can also factor \(A\) on the right, because multiplying powers of \(A\) in either order gives the same result. Thus the proposed inverse multiplies with \(A\) to give \(I\) in both orders, and