← Math 221PS 8 · Solutions↑ Top

Math 221, Fall 2026

Problem Set 8: Rotations and Determinants

Solutions

And am I under some spell?
And do my thoughts belong to me?
Or just some slogan I ingested to save time?

From Content Nausea by Parquet Courts

Solutions must be typeset in LaTeX and written in complete, grammatical sentences. You may consult the course notes, the supplementary textbook, your classmates, your professor, math interns, or Q-Center tutors for help with the assignment, but all sources and collaborators must be explicitly referenced. Everyone is expected to write their own solutions. Feel free to DM on Discord if you have any questions. Problems marked (Challenge) are optional and are for extra credit

Problem 8.1

A shear is a matrix of the form \[ H_a = \begin{bmatrix} 1 & a \\ 0 & 1 \end{bmatrix} \qquad\text{or}\qquad V_b = \begin{bmatrix} 1 & 0 \\ b & 1 \end{bmatrix}. \] The horizontal shear $H_a$ sends $(x, y)$ to $(x + ay, y)$, so it slides the horizontal row at height $y$ sideways by $ay$. The vertical shear $V_b$ sends $(x, y)$ to $(x, bx + y)$, so it slides the vertical column at position $x$ up by $bx$. I encourage you to experiment with these to see how they work using the visualizer.

Digital images are grids of pixels. Shears are very easy for a computer to apply to a digital image, since they only slide pixels horizontally or vertically. To apply $H_a$, the computer slides each row of pixels sideways as a block, and the pixels within a row stay in the same order. Rotating an image directly is much harder, since most pixels land between the grid points and the computer has to blend neighboring pixels together. For this reason, image editing programs often rotate an image by applying three shears in a row. The pictures below show how three shears rotate the face counterclockwise by $90^\circ$.

  1. Use the pictures to write the rotation matrix \[ R = \begin{bmatrix*}[r] 0 & -1 \\ 1 & 0 \end{bmatrix*} \] as a product of three shears.

    Solution

    In the first step, the bottom edge of the face stays put and the top edge, at height $1$, slides to the left by $1$. So the first shear is $H_{-1}$. In the second step, the corner $(1, 0)$ moves up to $(1, 1)$ and the corner $(-1, 1)$ moves down to $(-1, 0)$, so the column at position $x$ moves up by $x$. So the second shear is $V_1$. In the third step, the corners $(-1, 0)$ and $(0, 0)$ on the bottom stay put and the top corners $(1, 1)$ and $(0, 1)$ slide to the left by $1$. So the third shear is $H_{-1}$ again.

    The first shear applied is the rightmost factor, so \[ R = H_{-1} V_1 H_{-1}. \] As a check,

  2. In fact, every rotation other than the rotation by $180^\circ$ is a product of three shears. The counterclockwise rotation by an angle $\theta$ is \[ R_\theta = \begin{bmatrix*}[r] \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix*}. \] Let $\theta$ be the angle with $\cos\theta = \frac{3}{5}$ and $\sin\theta = \frac{4}{5}$, so that \[ R_\theta = \begin{bmatrix*}[r] \frac{3}{5} & -\frac{4}{5} \\[2pt] \frac{4}{5} & \frac{3}{5} \end{bmatrix*}. \] Find numbers $a$, $b$, and $c$ such that $R_\theta = H_a V_b H_c$.

    Solution

    Multiplying out,

    Setting this equal to $R_\theta$ and comparing entries, the bottom left entry gives $b = \frac{4}{5}$. The top left entry gives $1 + \frac{4}{5}a = \frac{3}{5}$, so $a = -\frac{1}{2}$. The bottom right entry gives $1 + \frac{4}{5}c = \frac{3}{5}$, so $c = -\frac{1}{2}$. We must still check the top right entry: \[ a + c + abc = -\frac{1}{2} - \frac{1}{2} + \left(-\frac{1}{2}\right)\left(\frac{4}{5}\right)\left(-\frac{1}{2}\right) = -1 + \frac{1}{5} = -\frac{4}{5}. \] So \[ R_\theta = H_{-1/2} \, V_{4/5} \, H_{-1/2}. \]

  3. (Challenge) Let $\theta$ be an angle that is not a multiple of $180^\circ$. Find numbers $a$, $b$, and $c$, depending on $\theta$, such that $R_\theta = H_a V_b H_c$.

    Solution

    As in part (b), setting \[ H_a V_b H_c = \begin{bmatrix} 1 + ab & a + c + abc \\ b & 1 + bc \end{bmatrix} \] equal to $R_\theta$ and comparing entries gives four equations: \[ 1 + ab = \cos\theta, \qquad a + c + abc = -\sin\theta, \qquad b = \sin\theta, \qquad 1 + bc = \cos\theta. \] Since $\theta$ is not a multiple of $180^\circ$, we have $\sin\theta \neq 0$. So the third equation gives $b = \sin\theta$, and then the first and last equations give \[ a = c = \frac{\cos\theta - 1}{\sin\theta}. \] We must still check the remaining equation. Using $ab = \cos\theta - 1$,

    So $R_\theta = H_a V_b H_a$ with $a = \frac{\cos\theta - 1}{\sin\theta}$ and $b = \sin\theta$. For $\theta = 90^\circ$ this gives $a = -1$ and $b = 1$, as in part (a), and for $\cos\theta = \frac{3}{5}$, $\sin\theta = \frac{4}{5}$ it gives $a = -\frac{1}{2}$ and $b = \frac{4}{5}$, as in part (b).

    For the rotation by $180^\circ$, the bottom left entry forces $b = \sin 180^\circ = 0$, and then the top left entry is $1 + ab = 1 \neq \cos 180^\circ = -1$. So this rotation is not a product of three shears in this way.

Problem 8.2

The face below has been rotated a bit, so its sides are no longer parallel to the axes.

In each part, $A$ is a $2 \times 2$ matrix and $T_A$ maps the face above to the face shown. Use the picture to find $\det(A)$.

  1. Solution

    The face above sits on the square with sides $u_1 = (2, 1)$ along the bottom of the face and $u_2 = (-1, 2)$ along the left side of the face. Its area is \[ \left| \det \begin{bmatrix*}[r] 2 & -1 \\ 1 & 2 \end{bmatrix*} \right| = |4 + 1| = 5. \] The transformation $T_A$ multiplies every area by $|\det(A)|$, and $\det(A)$ is negative exactly when $T_A$ flips the face over into its mirror image. So in each part, \[ |\det(A)| = \frac{\text{area of the new face}}{5}, \] and the sign of $\det(A)$ tells us whether the face has been flipped.

    Equivalently, let $U$ be the matrix with columns $u_1, u_2$ and let $W$ be the matrix whose columns are the new bottom and left sides $w_1 = Au_1$ and $w_2 = Au_2$. Then $AU = W$, so $\det(A) \det(U) = \det(W)$ and $\det(A) = \frac{1}{5}\det(W)$.

    In this part, the new face sits on the square with sides $w_1 = (1, 3)$ along the bottom of the face and $w_2 = (-3, 1)$ along the left side. Its area is \[ \left| \det \begin{bmatrix*}[r] 1 & -3 \\ 3 & 1 \end{bmatrix*} \right| = |1 + 9| = 10. \] The face has been rotated and enlarged, but not flipped over. So $\det(A) = \frac{10}{5} = 2$. (In fact, $A = \begin{bmatrix*}[r] 1 & -1 \\ 1 & 1 \end{bmatrix*}$.)

  2. Solution

    The new face sits on the parallelogram with sides $w_1 = (2, 1)$ along the bottom of the face and $w_2 = (-1, -3)$ along the left side. Its area is \[ \left| \det \begin{bmatrix*}[r] 2 & -1 \\ 1 & -3 \end{bmatrix*} \right| = |-6 + 1| = 5. \] This time the face has been flipped over: its smirk is now on the other side of its mouth. So $\det(A) = -\frac{5}{5} = -1$. (In fact, $A = \begin{bmatrix*}[r] 1 & 0 \\ 1 & -1 \end{bmatrix*}$.)

  3. Solution

    The new face sits on the unit square, which has area $1$. The face has been straightened out and shrunk, but not flipped over. So $\det(A) = \frac{1}{5}$. (In fact, $A = U^{-1} = \frac{1}{5}\begin{bmatrix*}[r] 2 & 1 \\ -1 & 2 \end{bmatrix*}$.)

  4. Sadly, in this part the face has been squished onto a line segment.

    Solution

    The new face is a line segment, which has area $0$. So $\det(A) = \frac{0}{5} = 0$. (In fact, $A = \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix}$, which sends $u_1$ to $(2, 2)$ and $u_2$ to $(-1, -1)$.)

Problem 8.3

Use row operations to answer the following questions. You may use the Row Reducer to help you calculate.

  1. Find $\det(A)$, where \[ A = \begin{bmatrix} 0 & 2 & 1 & 3 \\ 1 & 1 & 0 & 2 \\ 2 & 2 & 1 & 1 \\ 1 & 3 & 2 & 1 \end{bmatrix}. \]

    Solution

    We row reduce $A$ to an upper triangular matrix.

    \[ \begin{aligned} &\left[\begin{array}{cccc} 0 & 2 & 1 & 3 \\ 1 & 1 & 0 & 2 \\ 2 & 2 & 1 & 1 \\ 1 & 3 & 2 & 1 \end{array}\right] \xrightarrow{R_{1} \leftrightarrow R_{2}} \left[\begin{array}{cccc} 1 & 1 & 0 & 2 \\ 0 & 2 & 1 & 3 \\ 2 & 2 & 1 & 1 \\ 1 & 3 & 2 & 1 \end{array}\right] \xrightarrow{R_{3} \to R_{3} - 2\,R_{1}} \left[\begin{array}{cccc} 1 & 1 & 0 & 2 \\ 0 & 2 & 1 & 3 \\ 0 & 0 & 1 & \llap{$-$}3 \\ 1 & 3 & 2 & 1 \end{array}\right] \\[4pt] &\xrightarrow{R_{4} \to R_{4} - R_{1}} \left[\begin{array}{cccc} 1 & 1 & 0 & 2 \\ 0 & 2 & 1 & 3 \\ 0 & 0 & 1 & \llap{$-$}3 \\ 0 & 2 & 2 & \llap{$-$}1 \end{array}\right] \xrightarrow{R_{4} \to R_{4} - R_{2}} \left[\begin{array}{cccc} 1 & 1 & 0 & 2 \\ 0 & 2 & 1 & 3 \\ 0 & 0 & 1 & \llap{$-$}3 \\ 0 & 0 & 1 & \llap{$-$}4 \end{array}\right] \\[4pt] &\xrightarrow{R_{4} \to R_{4} - R_{3}} \left[\begin{array}{cccc} 1 & 1 & 0 & 2 \\ 0 & 2 & 1 & 3 \\ 0 & 0 & 1 & \llap{$-$}3 \\ 0 & 0 & 0 & \llap{$-$}1 \end{array}\right] \end{aligned} \]

    Adding a multiple of one row to another row does not change the determinant, and swapping two rows multiplies it by $-1$. We used one swap, so $\det(A)$ is $-1$ times the determinant of the final upper triangular matrix, which is the product of its diagonal entries: \[ \det(A) = -\left( 1 \cdot 2 \cdot 1 \cdot (-1) \right) = 2. \]

  2. Find all values of $c$ for which the matrix \[ B = \begin{bmatrix} 1 & 2 & 1 \\ 2 & 5 & c \\ 1 & 3 & 4 \end{bmatrix} \] is not invertible.

    Solution

    We row reduce $B$ to an upper triangular matrix. \[ \begin{aligned} &\left[\begin{array}{ccc} 1 & 2 & 1 \\ 2 & 5 & c \\ 1 & 3 & 4 \end{array}\right] \xrightarrow{R_{2} \to R_{2} - 2\,R_{1}} \left[\begin{array}{ccc} 1 & 2 & 1 \\ 0 & 1 & c - 2 \\ 1 & 3 & 4 \end{array}\right] \\[4pt] &\xrightarrow{R_{3} \to R_{3} - R_{1}} \left[\begin{array}{ccc} 1 & 2 & 1 \\ 0 & 1 & c - 2 \\ 0 & 1 & 3 \end{array}\right] \xrightarrow{R_{3} \to R_{3} - R_{2}} \left[\begin{array}{ccc} 1 & 2 & 1 \\ 0 & 1 & c - 2 \\ 0 & 0 & 5 - c \end{array}\right] \end{aligned} \]

    These row operations do not change the determinant, so \[ \det(B) = 1 \cdot 1 \cdot (5 - c) = 5 - c. \] A matrix is invertible exactly when its determinant is nonzero, so $B$ is not invertible only for $c = 5$. As a check, when $c = 5$ the second row of $B$ minus the first row is $(1, 3, 4)$, which is the third row, so the rows of $B$ are linearly dependent.

Problem 8.4

Suppose that \[ \det \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = 5. \] Find the determinant of each matrix below.

  1. $\begin{bmatrix} d & e & f \\ a & b & c \\ g & h & i \end{bmatrix}$

    Solution

    This matrix is obtained by swapping the first two rows, which multiplies the determinant by $-1$. So its determinant is $-5$.

  2. $\begin{bmatrix} a & b & c \\ d + 3a & e + 3b & f + 3c \\ g & h & i \end{bmatrix}$

    Solution

    This matrix is obtained by the row operation $R_2 \to R_2 + 3R_1$, which does not change the determinant. So its determinant is $5$.

  3. $\begin{bmatrix} a & b & c \\ 2d & 2e & 2f \\ g & h & i \end{bmatrix}$

    Solution

    This matrix is obtained by multiplying the second row by $2$, which multiplies the determinant by $2$. So its determinant is $10$.

  4. $\begin{bmatrix} g & h & i \\ 2d & 2e & 2f \\ a + 4g & b + 4h & c + 4i \end{bmatrix}$

    Solution

    We can get to this matrix from the original one in three steps.

    • Swap the first and third rows, giving rows $(g, h, i)$, $(d, e, f)$, $(a, b, c)$; this multiplies the determinant by $-1$.
    • Multiply the second row by $2$; this multiplies the determinant by $2$.
    • Apply $R_3 \to R_3 + 4R_1$; this does not change the determinant.

    So its determinant is $(-1) \cdot 2 \cdot 5 = -10$.

Problem 8.5

Let $A$ and $B$ be $3 \times 3$ matrices with $\det(A) = 3$ and $\det(B) = -2$. Find each of the following.

  1. $\det(AB)$

    Solution

    The determinant is multiplicative, so $\det(AB) = \det(A)\det(B) = 3 \cdot (-2) = -6$.

  2. $\det(A^{-1})$

    Solution

    Since $\det(A^{-1}) = \det(A)^{-1}$, we get $\det(A^{-1}) = \frac{1}{3}$.

  3. $\det(A^2 B^{-1})$

    Solution

    Using the multiplicative property, $\det(A^2) = \det(A)^2$, and $\det(B^{-1}) = \det(B)^{-1}$, \[ \det(A^2 B^{-1}) = \det(A)^2 \det(B)^{-1} = \frac{3^2}{-2} = -\frac{9}{2}. \]

  4. $\det(A^{-1} B A)$

    Solution

    The determinants are numbers, so they can be multiplied in any order: \[ \det(A^{-1} B A) = \det(A)^{-1} \det(B) \det(A) = \det(B) = -2. \]

  5. $\det(2A)$

    Solution

    We can write $2A = (2I_3)A$. The matrix $2I_3$ is upper triangular with diagonal entries $2, 2, 2$, so $\det(2I_3) = 2^3 = 8$. So \[ \det(2A) = \det(2I_3)\det(A) = 8 \cdot 3 = 24. \] Note that $\det(2A)$ is not $2\det(A)$.

Problem 8.6

For each statement below, decide whether it is true or false. If it is true, explain why. If it is false, give an example for which it fails.

  1. If $A$ and $B$ are $2 \times 2$ matrices, then $\det(A + B) = \det(A) + \det(B)$.

    Solution

    False. For example, take $A = B = I_2$. Then $\det(A) + \det(B) = 1 + 1 = 2$, but $A + B = 2I_2$ is upper triangular with diagonal entries $2, 2$, so $\det(A + B) = 4$.

  2. If $A$ is a square matrix with $A^2 = A$, then $\det(A) = 0$ or $\det(A) = 1$.

    Solution

    True. Taking determinants of both sides of $A^2 = A$ gives $\det(A)^2 = \det(A)$. So $\det(A)\left(\det(A) - 1\right) = 0$, which means $\det(A) = 0$ or $\det(A) = 1$.

  3. If $A$ is a $4 \times 4$ matrix with $A^3 = 0$, then $A$ is not invertible.

    Solution

    True. The zero matrix is upper triangular with zeros on the diagonal, so its determinant is $0$. Taking determinants of both sides of $A^3 = 0$ gives $\det(A)^3 = 0$, so $\det(A) = 0$. A matrix with determinant $0$ is not invertible.

  4. There is no $3 \times 3$ matrix $A$ with $A^2 = -I_3$.

    Solution

    True. The matrix $-I_3$ is upper triangular with diagonal entries $-1, -1, -1$, so $\det(-I_3) = (-1)^3 = -1$. If $A^2 = -I_3$, then taking determinants gives $\det(A)^2 = -1$. This is impossible, since the square of a real number is never negative.

    The same argument does not work for $2 \times 2$ matrices, since $\det(-I_2) = (-1)^2 = 1$. In fact, the rotation $R = \begin{bmatrix*}[r] 0 & -1 \\ 1 & 0 \end{bmatrix*}$ from Problem 1 satisfies $R^2 = -I_2$, since rotating twice by $90^\circ$ is rotating by $180^\circ$.

  5. If $A$ is a $2 \times 2$ matrix with $\det(A) = 1$, then $T_A$ is a rotation.

    Solution

    False. The shear $H_1 = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$ from Problem 1 is upper triangular with diagonal entries $1, 1$, so $\det(H_1) = 1$. But $T_{H_1}$ is not a rotation, since it sends $e_2 = (0, 1)$, which has length $1$, to $(1, 1)$, which has length $\sqrt{2}$, while rotations do not change lengths.

  6. If $A$ is a $2 \times 2$ matrix with $A^6 = I_2$, then $\det(A) = 1$.

    Solution

    False. Taking determinants only tells us that $\det(A)^6 = 1$, so $\det(A) = 1$ or $\det(A) = -1$. For example, the reflection across the $x$-axis \[ A = \begin{bmatrix*}[r] 1 & 0 \\ 0 & -1 \end{bmatrix*} \] satisfies $A^2 = I_2$, since reflecting twice returns every point to where it started. So $A^6 = (A^2)^3 = I_2$, but $\det(A) = -1$.