Chapter 6 ยท Linear Transformations

6.4 The Geometry of Linear Maps in the Plane

Rotations, reflections, projections, stretches and shears are all $2\times2$ matrices. Composing maps multiplies their matrices (order matters), $|\det A|$ is the area scale factor, the sign of $\det A$ tells you whether the picture is flipped, and $3\times3$ homogeneous matrices bring translations into the same framework.

Every time you rotate a photo on your phone, mirror a selfie, zoom a map or watch an animated character walk across the screen, a computer is applying a $2\times2$ (or $3\times3$) matrix to thousands of points. Graphics designers, robot engineers and game developers do not think of these as "matrices with entries $a,b,c,d$" โ€” they think of rotate by $30^\circ$, reflect in this line, squash vertically, shear sideways. This section builds a dictionary between the two languages.

The key fact from Section 6.1 is that a linear map $T:\mathbb{R}^2\to\mathbb{R}^2$ is completely determined by where it sends $\mathbf{e}_1=(1,0)$ and $\mathbf{e}_2=(0,1)$: the standard matrix is $A=\begin{bmatrix}T(\mathbf{e}_1)&T(\mathbf{e}_2)\end{bmatrix}$. So to find the matrix of any geometric map, just ask "where do the two unit vectors go?" We will also see how a single number, $\det A$, measures how the map changes area and whether it turns the plane over, and how one extra coordinate lets matrices handle translations โ€” the move that linear maps cannot make on their own.

Rotations, Reflections and Projections

Rotating $\mathbf{e}_1=(1,0)$ anticlockwise through the angle $\theta$ lands it on $(\cos\theta,\sin\theta)$; rotating $\mathbf{e}_2=(0,1)$ lands it on $(-\sin\theta,\cos\theta)$, a quarter turn further on. Those are the two columns of the rotation matrix. For a line $\ell$ through the origin, the orthogonal projection onto $\ell$ is $\operatorname{proj}_{\mathbf{u}}\mathbf{v}=(\mathbf{v}\cdot\mathbf{u})\,\mathbf{u}$ for a unit vector $\mathbf{u}$ along $\ell$ (Section 4.2), and the reflection in $\ell$ goes from $\mathbf{v}$ to its projection and then the same distance again: $F(\mathbf{v})=2\operatorname{proj}_{\mathbf{u}}\mathbf{v}-\mathbf{v}$.

๐Ÿ“ Theorem 6.14 โ€” Standard matrices of rotations, reflections and projections

Let $\theta$ be a real number and let $\ell_\theta$ be the line through the origin making angle $\theta$ with the positive $x$-axis (unit direction $\mathbf{u}=(\cos\theta,\sin\theta)$). The following maps of $\mathbb{R}^2$ are linear, with standard matrices

$$R_\theta=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\ \ (\text{rotation by }\theta\text{ anticlockwise about }\mathbf{0}),$$ $$F_\theta=\begin{bmatrix}\cos2\theta&\sin2\theta\\\sin2\theta&-\cos2\theta\end{bmatrix}\ \ (\text{reflection in }\ell_\theta),\qquad P_\theta=\begin{bmatrix}\cos^2\theta&\sin\theta\cos\theta\\\sin\theta\cos\theta&\sin^2\theta\end{bmatrix}\ \ (\text{projection onto }\ell_\theta).$$

If the line is given by a non-zero direction vector $(a,b)$ instead of an angle, $$P=\frac{1}{a^2+b^2}\begin{bmatrix}a^2&ab\\ab&b^2\end{bmatrix},\qquad F=2P-I=\frac{1}{a^2+b^2}\begin{bmatrix}a^2-b^2&2ab\\2ab&b^2-a^2\end{bmatrix}.$$

Special cases worth knowing by heart: reflection in the $x$-axis $\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ ($\theta=0$), in the $y$-axis $\begin{bmatrix}-1&0\\0&1\end{bmatrix}$ ($\theta=90^\circ$), in $y=x$ $\begin{bmatrix}0&1\\1&0\end{bmatrix}$ (swap the coordinates), in $y=-x$ $\begin{bmatrix}0&-1\\-1&0\end{bmatrix}$; projection onto the $x$-axis $\begin{bmatrix}1&0\\0&0\end{bmatrix}$; rotation by $90^\circ$ $\begin{bmatrix}0&-1\\1&0\end{bmatrix}$ and by $180^\circ$, $-I$.

โœ๏ธ Example 1 โ€” A rotation
Find the matrix of the anticlockwise rotation through $120^\circ$ and the image of the point $(3,1)$.
Matrix $\cos120^\circ=-\tfrac12$, $\sin120^\circ=\tfrac{\sqrt3}{2}$, so $R_{120^\circ}=\begin{bmatrix}-\tfrac12&-\tfrac{\sqrt3}{2}\\\tfrac{\sqrt3}{2}&-\tfrac12\end{bmatrix}$.
Image $$R_{120^\circ}\begin{bmatrix}3\\1\end{bmatrix}=\begin{bmatrix}-\tfrac32-\tfrac{\sqrt3}{2}\\\tfrac{3\sqrt3}{2}-\tfrac12\end{bmatrix}\approx\begin{bmatrix}-2.366\\2.098\end{bmatrix}.$$
Check A rotation keeps lengths: $\|(3,1)\|^2=10$ and $\left(\tfrac{3+\sqrt3}{2}\right)^2+\left(\tfrac{3\sqrt3-1}{2}\right)^2=\tfrac{12+6\sqrt3}{4}+\tfrac{28-6\sqrt3}{4}=10$. โœ“ Also $\det R_\theta=\cos^2\theta+\sin^2\theta=1$.
โœ๏ธ Example 2 โ€” Projection and reflection for a line with slope $\tfrac34$
Let $\ell$ be the line $y=\tfrac34x$. Find the standard matrices of the projection $P$ onto $\ell$ and of the reflection $F$ in $\ell$, and find the images of $\mathbf{v}=(5,0)$.
Direction $\ell$ has direction $(a,b)=(4,3)$, with $a^2+b^2=25$.
Matrices $$P=\frac1{25}\begin{bmatrix}16&12\\12&9\end{bmatrix},\qquad F=2P-I=\frac1{25}\begin{bmatrix}7&24\\24&-7\end{bmatrix}.$$
Images $P\mathbf{v}=\tfrac15(16,12)=\left(\tfrac{16}{5},\tfrac{12}{5}\right)$ and $F\mathbf{v}=\tfrac15(7,24)=\left(\tfrac75,\tfrac{24}{5}\right)$.
Check $P\mathbf{v}$ lies on $\ell$ ($\tfrac{12}{5}=\tfrac34\cdot\tfrac{16}{5}$ โœ“); $\mathbf{v}-P\mathbf{v}=\left(\tfrac95,-\tfrac{12}{5}\right)$ is perpendicular to $(4,3)$ โœ“; $\|F\mathbf{v}\|^2=\tfrac{49+576}{25}=25=\|\mathbf{v}\|^2$ โœ“. Finally $P^2=P$ (projecting twice changes nothing) and $F^2=I$ (reflecting twice gets you back).

Stretches, Dilations and Shears

๐Ÿ“˜ Definition 6.9 โ€” Scalings and shears of the plane
Let $k$, $k_1$, $k_2$ be real numbers.
  • Scaling (stretch or compression along the axes): $\begin{bmatrix}k_1&0\\0&k_2\end{bmatrix}$, $k_1,k_2\gt0$. With $k_2=1$ it stretches ($k_1\gt1$) or compresses ($0\lt k_1\lt1$) horizontally only.
  • Dilation ($k\gt1$) or contraction ($0\lt k\lt1$) by the factor $k$: $kI=\begin{bmatrix}k&0\\0&k\end{bmatrix}$ โ€” every vector is multiplied by $k$.
  • Horizontal shear with factor $k$: $\begin{bmatrix}1&k\\0&1\end{bmatrix}$, so $(x,y)\mapsto(x+ky,\,y)$ โ€” each point slides horizontally by an amount proportional to its height.
  • Vertical shear with factor $k$: $\begin{bmatrix}1&0\\k&1\end{bmatrix}$, so $(x,y)\mapsto(x,\,y+kx)$.

A shear turns the unit square into a parallelogram with the same base and the same height โ€” so it keeps area, even though it changes every angle. Shears appear when a deck of cards is pushed sideways, when italic letters are generated from upright ones, and in the deformation of soil and fluids.

โœ๏ธ Example 3 โ€” Recognising a map from its matrix
Describe geometrically the maps with matrices (a) $\begin{bmatrix}0&-2\\2&0\end{bmatrix}$, (b) $\begin{bmatrix}1&0\\3&1\end{bmatrix}$, (c) $\begin{bmatrix}3&4\\4&-3\end{bmatrix}$.
(a) $\begin{bmatrix}0&-2\\2&0\end{bmatrix}=2\begin{bmatrix}0&-1\\1&0\end{bmatrix}=2R_{90^\circ}$: rotate anticlockwise by $90^\circ$ and dilate by $2$ (in either order, since $2I$ commutes with everything). $\mathbf{e}_1\mapsto(0,2)$, $\mathbf{e}_2\mapsto(-2,0)$.
(b) $(x,y)\mapsto(x,\,y+3x)$: a vertical shear with factor $3$. Points on the $y$-axis stay put; the point $(1,0)$ slides up to $(1,3)$.
(c) The columns have length $5$ and are perpendicular, and the matrix is symmetric with trace $0$. Divide by $5$: $\tfrac15\begin{bmatrix}3&4\\4&-3\end{bmatrix}$ has the form $F=\tfrac1{a^2+b^2}\begin{bmatrix}a^2-b^2&2ab\\2ab&b^2-a^2\end{bmatrix}$ with $(a,b)=(2,1)$: $\tfrac15\begin{bmatrix}4-1&4\\4&1-4\end{bmatrix}$. โœ“ So (c) is the reflection in the line $y=\tfrac12x$ followed by a dilation by $5$.
Check (c) $\begin{bmatrix}3&4\\4&-3\end{bmatrix}\begin{bmatrix}2\\1\end{bmatrix}=\begin{bmatrix}10\\5\end{bmatrix}=5\begin{bmatrix}2\\1\end{bmatrix}$ (the mirror line is kept, stretched by $5$) and $\begin{bmatrix}3&4\\4&-3\end{bmatrix}\begin{bmatrix}-1\\2\end{bmatrix}=\begin{bmatrix}5\\-10\end{bmatrix}=-5\begin{bmatrix}-1\\2\end{bmatrix}$ (the perpendicular is flipped). โœ“

Composing Maps: Order Matters

Doing one map after another is again a linear map, and its matrix is the product of the matrices (Section 6.1). Because we write functions on the left, $S\circ T$ means "first $T$, then $S$", and its matrix is $[S][T]$ โ€” the first map is on the right.

๐Ÿ“ Theorem 6.15 โ€” Compositions of plane maps

If $T,S:\mathbb{R}^2\to\mathbb{R}^2$ are linear with standard matrices $A$ and $B$, then $S\circ T$ ("first $T$, then $S$") is linear with standard matrix $BA$. In general $BA\ne AB$. In particular, for all real $\alpha,\beta,\theta,\varphi$: $$R_\alpha R_\beta=R_{\alpha+\beta}\ \ (\text{rotations add, and commute}),\qquad F_\varphi F_\theta=R_{2(\varphi-\theta)}\ \ (\text{two reflections make a rotation}).$$

The first identity is the addition formulas for sine and cosine in disguise; multiply out $R_\alpha R_\beta$ and compare (Exercise III.3). The second explains why two mirrors at an angle produce a rotated image, as in a kaleidoscope.

โœ๏ธ Example 4 โ€” Rotate then reflect, or reflect then rotate?
Let $R$ be the rotation by $90^\circ$ and $F$ the reflection in the $x$-axis. Find the matrices of "rotate, then reflect" and "reflect, then rotate", identify both maps, and compare the images of $(2,1)$.
Rotate, then reflect $$FR=\begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix}0&-1\\1&0\end{bmatrix}=\begin{bmatrix}0&-1\\-1&0\end{bmatrix},$$ the reflection in the line $y=-x$. Image of $(2,1)$: $(-1,-2)$.
Reflect, then rotate $$RF=\begin{bmatrix}0&-1\\1&0\end{bmatrix}\begin{bmatrix}1&0\\0&-1\end{bmatrix}=\begin{bmatrix}0&1\\1&0\end{bmatrix},$$ the reflection in $y=x$. Image of $(2,1)$: $(1,2)$.
Conclusion $FR\ne RF$: the two orders give different maps and send $(2,1)$ to opposite points. Both results are reflections (a rotation, $\det=1$, combined with a reflection, $\det=-1$, always has $\det=-1$).
Check Trace the steps: $(2,1)\xrightarrow{R}(-1,2)\xrightarrow{F}(-1,-2)$ โœ“, and $(2,1)\xrightarrow{F}(2,-1)\xrightarrow{R}(1,2)$ โœ“. Try this pair in Interactive 1 with "compare with the reverse order" ticked.
Interactive 1 โ€” Build a Transformation Step by Step

Choose up to three steps. Press Play to watch the picture move through them in order; the combined $3\times3$ homogeneous matrix is $M=M_3M_2M_1$ (the first step on the right). Its top-left $2\times2$ block is the linear part and its last column is the translation. Tick the box to also draw (dashed orange) the result of doing the same steps in the reverse order.

combined matrix $M$โ€”
$\det$ of linear partโ€”
area: before โ†’ afterโ€”
orientationโ€”
reverse order givesโ€”

Area, Orientation and the Determinant

A linear map sends the unit square (spanned by $\mathbf{e}_1$, $\mathbf{e}_2$) to the parallelogram spanned by the columns $A\mathbf{e}_1$, $A\mathbf{e}_2$, whose area is $|\det A|$ (Section 3.3). Every other region can be filled with tiny squares, each of which is scaled in the same way, so the whole region is scaled by the same factor. The sign of $\det A$ records something area cannot: whether the turn from $A\mathbf{e}_1$ to $A\mathbf{e}_2$ is still anticlockwise.

๐Ÿ“ Theorem 6.16 โ€” Area scale factor and orientation

Let $T:\mathbb{R}^2\to\mathbb{R}^2$ be linear with standard matrix $A$, and let $S$ be a region of the plane with finite area (a polygon, a disc, โ€ฆ). Then $$\operatorname{area}\big(T(S)\big)=|\det A|\cdot\operatorname{area}(S).$$ Moreover, if $\det A\gt0$ then $T$ preserves orientation (anticlockwise stays anticlockwise; a letter F still reads as F); if $\det A\lt0$ then $T$ reverses orientation (the F appears mirrored); and if $\det A=0$ then $T$ squashes the plane onto a line or a point, and every region has image of area $0$.

A quick reference: rotations $\det R_\theta=1$; reflections $\det F_\theta=-\cos^22\theta-\sin^22\theta=-1$; projections $\det P_\theta=0$; shears $1$; scalings $k_1k_2$; dilations $k^2$. Since $\det(BA)=\det B\det A$, area factors multiply under composition and two orientation reversals cancel out.

โœ๏ธ Example 5 โ€” Area and orientation of a transformed triangle
The triangle $\Delta$ has vertices $O=(0,0)$, $P=(3,1)$, $Q=(1,2)$, listed anticlockwise. Find the area of its image under (a) $A=\begin{bmatrix}2&1\\-1&3\end{bmatrix}$, (b) $B=\begin{bmatrix}1&2\\3&4\end{bmatrix}$, and say whether each map preserves orientation.
Original area $\operatorname{area}(\Delta)=\tfrac12\left|\det\begin{bmatrix}3&1\\1&2\end{bmatrix}\right|=\tfrac12|6-1|=\tfrac52$, and the determinant is positive because $O\to P\to Q$ is anticlockwise.
(a) $\det A=6+1=7\gt0$: image area $7\cdot\tfrac52=\tfrac{35}{2}$, orientation preserved. Check: $AP=(7,0)$, $AQ=(4,5)$, and $\tfrac12\det\begin{bmatrix}7&4\\0&5\end{bmatrix}=\tfrac{35}{2}\gt0$ โœ“.
(b) $\det B=4-6=-2\lt0$: image area $2\cdot\tfrac52=5$, orientation reversed. Check: $BP=(5,13)$, $BQ=(5,11)$, $\tfrac12\det\begin{bmatrix}5&5\\13&11\end{bmatrix}=\tfrac12(55-65)=-5$: area $5$, and the negative sign shows the image vertices now run clockwise โœ“.
Interactive 2 โ€” Area and Orientation Meter

The unit square (dashed) is sent to the parallelogram spanned by $A\mathbf{e}_1$ (red) and $A\mathbf{e}_2$ (blue); the curved arrow shows the turn from $A\mathbf{e}_1$ to $A\mathbf{e}_2$. The meter shows $\det A$: its size is the area of the parallelogram, its sign says whether the turn is still anticlockwise. Press Play and watch the parallelogram flatten to a segment exactly when $\det A=0$, then come back flipped.

$A=\begin{bmatrix}a&b\\c&d\end{bmatrix}$โ€”
$\det A=ad-bc$โ€”
area of image of square / of unit discโ€”
orientationโ€”
โš ๏ธ Common mistakes

1. Multiplying in the wrong order. "First $A$, then $B$" has matrix $BA$, not $AB$. Read products right to left, like function composition $B(A\mathbf{x})$.

2. Using $\theta$ instead of $2\theta$ in a reflection. The reflection in the line at angle $\theta$ has $\cos2\theta$ and $\sin2\theta$ in its matrix. Test it: the line at $45^\circ$ must give $\begin{bmatrix}0&1\\1&0\end{bmatrix}$.

3. Confusing projection with reflection. A projection is not invertible ($\det=0$, $P^2=P$); a reflection is its own inverse ($\det=-1$, $F^2=I$).

4. Forgetting the absolute value. The area scale factor is $|\det A|$; a negative determinant does not mean "negative area" but "flipped over".

5. Treating translation as linear. $\mathbf{x}\mapsto\mathbf{x}+\mathbf{h}$ sends $\mathbf{0}$ to $\mathbf{h}\ne\mathbf{0}$, so no $2\times2$ matrix can do it โ€” see the next subsection.

Homogeneous Coordinates: Translations for Computer Graphics

A translation $\mathbf{x}\mapsto\mathbf{x}+\mathbf{h}$ is not linear when $\mathbf{h}\ne\mathbf{0}$, because it moves the origin. Yet graphics software wants every move โ€” rotate, scale, translate โ€” to be "multiply by a matrix", so that a whole chain of moves can be stored as one matrix and applied to millions of points. The trick is to add a third coordinate that is always $1$.

๐Ÿ“˜ Definition 6.10 โ€” Homogeneous coordinates

The point $(x,y)$ of the plane is represented by the vector $(x,y,1)$ in $\mathbb{R}^3$, its homogeneous coordinates. A $2\times2$ matrix $A$ and a translation by $\mathbf{h}=(h,k)$ are represented by the $3\times3$ matrices $$\begin{bmatrix}A&\mathbf{0}\\\mathbf{0}^{T}&1\end{bmatrix}=\begin{bmatrix}a_{11}&a_{12}&0\\a_{21}&a_{22}&0\\0&0&1\end{bmatrix},\qquad T_{(h,k)}=\begin{bmatrix}1&0&h\\0&1&k\\0&0&1\end{bmatrix}.$$

Indeed $T_{(h,k)}\begin{bmatrix}x\\y\\1\end{bmatrix}=\begin{bmatrix}x+h\\y+k\\1\end{bmatrix}$. A chain of moves is represented by the product of their $3\times3$ matrices, with the first move on the right; the last row stays $(0,0,1)$, so the result always has third coordinate $1$.

๐Ÿงญ Problem-solving strategy โ€” a map about a point other than the origin
  1. Translate the special point $\mathbf{p}$ (centre of rotation, centre of scaling, a point on the mirror line) to the origin: $T_{-\mathbf{p}}$.
  2. Apply the linear map about the origin: $\begin{bmatrix}A&\mathbf{0}\\\mathbf{0}^{T}&1\end{bmatrix}$.
  3. Translate back: $T_{\mathbf{p}}$. The whole map is $M=T_{\mathbf{p}}\begin{bmatrix}A&\mathbf{0}\\\mathbf{0}^{T}&1\end{bmatrix}T_{-\mathbf{p}}$.
  4. Check that $M$ fixes $\mathbf{p}$ (it must), and test one more point.
โœ๏ธ Example 6 โ€” Rotating about the point $(2,1)$
Find the $3\times3$ matrix of the rotation by $90^\circ$ about the point $\mathbf{p}=(2,1)$, and the image of $(4,1)$.
Pieces $T_{-\mathbf{p}}=\begin{bmatrix}1&0&-2\\0&1&-1\\0&0&1\end{bmatrix}$, $\ R=\begin{bmatrix}0&-1&0\\1&0&0\\0&0&1\end{bmatrix}$, $\ T_{\mathbf{p}}=\begin{bmatrix}1&0&2\\0&1&1\\0&0&1\end{bmatrix}$.
Multiply (right to left) $RT_{-\mathbf{p}}=\begin{bmatrix}0&-1&1\\1&0&-2\\0&0&1\end{bmatrix}$, then $$M=T_{\mathbf{p}}RT_{-\mathbf{p}}=\begin{bmatrix}0&-1&3\\1&0&-1\\0&0&1\end{bmatrix}.$$
Image $M\begin{bmatrix}4\\1\\1\end{bmatrix}=\begin{bmatrix}-1+3\\4-1\\1\end{bmatrix}=\begin{bmatrix}2\\3\\1\end{bmatrix}$, so $(4,1)\mapsto(2,3)$.
Check $M(2,1,1)=(-1+3,\,2-1,\,1)=(2,1,1)$: the centre is fixed โœ“. And $(4,1)$ is $2$ units to the right of the centre; a quarter turn puts it $2$ units above, at $(2,3)$ โœ“. In ordinary coordinates the map is $\mathbf{x}\mapsto R\mathbf{x}+(3,-1)$ โ€” linear part plus translation.

Exercises

I
Write down the standard matrix of each map of $\mathbb{R}^2$.
  • 1 Rotation anticlockwise by $30^\circ$.
  • 2 Rotation clockwise by $90^\circ$.
  • 3 Reflection in the $y$-axis.
  • 4 Reflection in the line $y=-x$.
  • 5 Reflection in the line $y=\sqrt3\,x$.
  • 6 Orthogonal projection onto the line $y=-2x$.
  • 7 Horizontal shear with factor $-3$.
  • 8 Vertical compression by the factor $\tfrac12$ (horizontal lengths unchanged).
Check: projection and reflection for a line with direction $(a,b)$
projection $P$โ€”
reflection $F=2P-I$โ€”
$P\mathbf{v}$โ€”
$F\mathbf{v}$โ€”
1 $R_{30^\circ}=\begin{bmatrix}\tfrac{\sqrt3}{2}&-\tfrac12\\\tfrac12&\tfrac{\sqrt3}{2}\end{bmatrix}$.
2 Clockwise $90^\circ$ is $\theta=-90^\circ$: $\mathbf{e}_1\mapsto(0,-1)$, $\mathbf{e}_2\mapsto(1,0)$, so $\begin{bmatrix}0&1\\-1&0\end{bmatrix}$.
3 $\begin{bmatrix}-1&0\\0&1\end{bmatrix}$.
4 $(x,y)\mapsto(-y,-x)$: $\begin{bmatrix}0&-1\\-1&0\end{bmatrix}$ (or $F_\theta$ with $\theta=-45^\circ$).
5 The line makes angle $60^\circ$, so $2\theta=120^\circ$: $F=\begin{bmatrix}-\tfrac12&\tfrac{\sqrt3}{2}\\\tfrac{\sqrt3}{2}&\tfrac12\end{bmatrix}$.
6 Direction $(1,-2)$, $a^2+b^2=5$: $P=\dfrac15\begin{bmatrix}1&-2\\-2&4\end{bmatrix}$.
7 $\begin{bmatrix}1&-3\\0&1\end{bmatrix}$, i.e. $(x,y)\mapsto(x-3y,\,y)$.
8 $\begin{bmatrix}1&0\\0&\tfrac12\end{bmatrix}$.
II
Images and identification.
  • 1 Find the image of $(3,4)$ under the rotation by $90^\circ$.
  • 2 Find the image of $(2,-1)$ under the reflection in $y=x$.
  • 3 Project $(5,5)$ onto the line through the origin with direction $(3,4)$.
  • 4 Reflect $(5,5)$ in the same line, and check that the length is unchanged.
  • 5 Describe the map with matrix $\begin{bmatrix}0&3\\-3&0\end{bmatrix}$.
  • 6 Describe the map with matrix $\begin{bmatrix}\tfrac12&\tfrac{\sqrt3}{2}\\\tfrac{\sqrt3}{2}&-\tfrac12\end{bmatrix}$.
  • 7 Describe the map with matrix $\begin{bmatrix}\tfrac12&\tfrac12\\\tfrac12&\tfrac12\end{bmatrix}$.
1 $\begin{bmatrix}0&-1\\1&0\end{bmatrix}\begin{bmatrix}3\\4\end{bmatrix}=\begin{bmatrix}-4\\3\end{bmatrix}$.
2 Swap the coordinates: $(-1,2)$.
3 $\dfrac{(5,5)\cdot(3,4)}{25}(3,4)=\dfrac{35}{25}(3,4)=\left(\dfrac{21}{5},\dfrac{28}{5}\right)$.
4 $F\mathbf{v}=2P\mathbf{v}-\mathbf{v}=\left(\tfrac{42}{5}-5,\tfrac{56}{5}-5\right)=\left(\tfrac{17}{5},\tfrac{31}{5}\right)$. Length: $\tfrac{289+961}{25}=50=5^2+5^2$ โœ“.
5 $3\begin{bmatrix}0&1\\-1&0\end{bmatrix}=3R_{-90^\circ}$: a clockwise quarter turn combined with a dilation by $3$.
6 It has the form $F_\theta$ with $\cos2\theta=\tfrac12$, $\sin2\theta=\tfrac{\sqrt3}{2}$, so $2\theta=60^\circ$: the reflection in the line through the origin at $30^\circ$, i.e. $y=\tfrac{1}{\sqrt3}x$. (Determinant $-\tfrac14-\tfrac34=-1$ โœ“.)
7 It is $\tfrac1{2}\begin{bmatrix}1&1\\1&1\end{bmatrix}$ with direction $(1,1)$: the orthogonal projection onto $y=x$. (Check: $P^2=P$ and $\det P=0$.)
III
Compositions.
  • 1 Find the matrix of "rotate by $90^\circ$, then dilate by $2$".
  • 2 Find the matrices of "horizontal shear with $k=1$, then reflect in the $x$-axis" and of the same two maps in the opposite order. Are they equal?
  • 3 Show that $R_\alpha R_\beta=R_{\alpha+\beta}$, and explain why rotations of the plane commute.
  • 4 Find the matrix of "reflect in the $x$-axis, then reflect in $y=x$" and identify the map. Compare with $F_\varphi F_\theta=R_{2(\varphi-\theta)}$.
  • 5 For the line with direction $(3,4)$, verify that $P^2=P$ and $F^2=I$, and explain each geometrically.
  • 6 Without multiplying out, find $\left(R_{45^\circ}\right)^3$ and the smallest $n\ge1$ with $\left(R_{45^\circ}\right)^n=I$.
  • 7 Let $P$ be the projection onto the $x$-axis and $R$ the rotation by $90^\circ$. Compute $PR$ and $RP$ and describe each.
1 $(2I)R_{90^\circ}=\begin{bmatrix}0&-2\\2&0\end{bmatrix}$.
2 Shear first: $\begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix}1&1\\0&1\end{bmatrix}=\begin{bmatrix}1&1\\0&-1\end{bmatrix}$. Reflect first: $\begin{bmatrix}1&1\\0&1\end{bmatrix}\begin{bmatrix}1&0\\0&-1\end{bmatrix}=\begin{bmatrix}1&-1\\0&-1\end{bmatrix}$. Not equal (e.g. $(0,1)\mapsto(1,-1)$ in the first case but $(-1,-1)$ in the second).
3 $R_\alpha R_\beta=\begin{bmatrix}\cos\alpha\cos\beta-\sin\alpha\sin\beta&-(\cos\alpha\sin\beta+\sin\alpha\cos\beta)\\\sin\alpha\cos\beta+\cos\alpha\sin\beta&\cos\alpha\cos\beta-\sin\alpha\sin\beta\end{bmatrix}=\begin{bmatrix}\cos(\alpha+\beta)&-\sin(\alpha+\beta)\\\sin(\alpha+\beta)&\cos(\alpha+\beta)\end{bmatrix}$. Since $\alpha+\beta=\beta+\alpha$, $R_\alpha R_\beta=R_\beta R_\alpha$.
4 $\begin{bmatrix}0&1\\1&0\end{bmatrix}\begin{bmatrix}1&0\\0&-1\end{bmatrix}=\begin{bmatrix}0&-1\\1&0\end{bmatrix}=R_{90^\circ}$. With $\theta=0$ (first mirror) and $\varphi=45^\circ$ (second mirror), $2(\varphi-\theta)=90^\circ$ โœ“.
5 $P=\tfrac1{25}\begin{bmatrix}9&12\\12&16\end{bmatrix}$; $P^2=\tfrac1{625}\begin{bmatrix}225&300\\300&400\end{bmatrix}=P$ โ€” a vector already on the line stays put. $F=\tfrac1{25}\begin{bmatrix}-7&24\\24&7\end{bmatrix}$; $F^2=\tfrac1{625}\begin{bmatrix}625&0\\0&625\end{bmatrix}=I$ โ€” reflecting twice returns every point.
6 $\left(R_{45^\circ}\right)^3=R_{135^\circ}=\begin{bmatrix}-\tfrac{\sqrt2}{2}&-\tfrac{\sqrt2}{2}\\\tfrac{\sqrt2}{2}&-\tfrac{\sqrt2}{2}\end{bmatrix}$; $\left(R_{45^\circ}\right)^n=R_{45n^\circ}=I$ first when $45n=360$, i.e. $n=8$.
7 $PR=\begin{bmatrix}1&0\\0&0\end{bmatrix}\begin{bmatrix}0&-1\\1&0\end{bmatrix}=\begin{bmatrix}0&-1\\0&0\end{bmatrix}$: $(x,y)\mapsto(-y,0)$, rotate then drop onto the $x$-axis. $RP=\begin{bmatrix}0&0\\1&0\end{bmatrix}$: $(x,y)\mapsto(0,x)$, project then turn the $x$-axis onto the $y$-axis. Different maps, with different ranges (the $x$-axis versus the $y$-axis).
IV
Area and orientation.
  • 1 The triangle with vertices $(0,0)$, $(2,0)$, $(1,3)$ is mapped by $A=\begin{bmatrix}3&1\\1&2\end{bmatrix}$. Find the area of the image in two ways.
  • 2 Which of these preserve orientation: a rotation, a reflection, a shear, a projection, $\begin{bmatrix}2&5\\1&3\end{bmatrix}$?
  • 3 A square of area $4$ is mapped by $\begin{bmatrix}1&2\\3&4\end{bmatrix}$. Find the area of the image and say whether it is flipped.
  • 4 For which real $k$ does $\begin{bmatrix}k&2\\2&k\end{bmatrix}$ reverse orientation? For which $k$ does it flatten the plane?
  • 5 Printing. A logo of area $12$ cmยฒ is printed on a T-shirt after being transformed by $\begin{bmatrix}1.5&0.5\\0&2\end{bmatrix}$ (lengths in cm). What area of fabric does the printed logo cover, and will the lettering read correctly?
1 Original area $\tfrac12|2\cdot3-0\cdot1|=3$, $\det A=5$, so the image has area $15$. Directly: the vertices go to $(0,0)$, $(6,2)$, $(6,7)$ and $\tfrac12|6\cdot7-2\cdot6|=\tfrac{30}{2}=15$ โœ“.
2 Rotation ($\det=1$) yes; reflection ($-1$) no; shear ($1$) yes; projection ($0$) neither โ€” it collapses the plane; $\begin{bmatrix}2&5\\1&3\end{bmatrix}$ has $\det=6-5=1$, yes.
3 $\det=-2$: area $|-2|\cdot4=8$, and the image is flipped (orientation reversed).
4 $\det=k^2-4$. Reverses orientation when $k^2-4\lt0$, i.e. $-2\lt k\lt2$; flattens the plane when $k=\pm2$.
5 $\det=1.5\cdot2-0.5\cdot0=3\gt0$: the printed logo covers $3\times12=36$ cmยฒ, and since the determinant is positive the lettering is not mirrored (it is stretched and slanted, but reads correctly).
V
Homogeneous coordinates and graphics. Give each answer as a $3\times3$ matrix and check it on a point.
  • 1 Translation by $(-3,5)$.
  • 2 Rotation by $90^\circ$ about the point $(1,1)$.
  • 3 Dilation by the factor $2$ centred at the point $(3,2)$.
  • 4 Reflection in the line $y=x+1$. (Hint: translate a point of the line to the origin.)
  • 5 Game design. A sprite is moved by "translate by $(4,0)$" and "rotate by $90^\circ$ about the origin". Find the combined matrix for each order and the two images of the sprite's corner $(1,1)$.
1 $\begin{bmatrix}1&0&-3\\0&1&5\\0&0&1\end{bmatrix}$; e.g. $(0,0)\mapsto(-3,5)$.
2 $T_{(1,1)}RT_{(-1,-1)}=\begin{bmatrix}1&0&1\\0&1&1\\0&0&1\end{bmatrix}\begin{bmatrix}0&-1&1\\1&0&-1\\0&0&1\end{bmatrix}=\begin{bmatrix}0&-1&2\\1&0&0\\0&0&1\end{bmatrix}$. Check: $(1,1)\mapsto(-1+2,\,1)=(1,1)$ โœ“; $(2,1)\mapsto(1,2)$ โœ“.
3 $T_{(3,2)}\begin{bmatrix}2&0&0\\0&2&0\\0&0&1\end{bmatrix}T_{(-3,-2)}=\begin{bmatrix}2&0&-3\\0&2&-2\\0&0&1\end{bmatrix}$. Check: $(3,2)\mapsto(6-3,\,4-2)=(3,2)$ โœ“; $(4,2)\mapsto(5,2)$, twice as far from the centre โœ“.
4 $(0,1)$ lies on the line, which is parallel to $y=x$. $M=T_{(0,1)}\begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix}T_{(0,-1)}=\begin{bmatrix}0&1&-1\\1&0&1\\0&0&1\end{bmatrix}$, i.e. $(x,y)\mapsto(y-1,\,x+1)$. Check: $(1,0)\mapsto(-1,2)$; the midpoint $(0,1)$ is on the line and $(-2,2)$ is perpendicular to $(1,1)$ โœ“.
5 Translate first, then rotate: $RT=\begin{bmatrix}0&-1&0\\1&0&4\\0&0&1\end{bmatrix}$, $(1,1)\mapsto(-1,5)$. Rotate first, then translate: $TR=\begin{bmatrix}0&-1&4\\1&0&0\\0&0&1\end{bmatrix}$, $(1,1)\mapsto(3,1)$. The orders give different positions โ€” game engines must apply moves in the intended order.
๐Ÿ”ฌ Researchโ€“Teaching NexusResearch-tutored ยท optional, about 30 minutes

Research question. How does an industrial robot arm know where its gripper is? Engineers chain $3\times3$ homogeneous matrices โ€” one rotation and one translation per joint โ€” and this "forward kinematics" runs thousands of times a second in factories, surgical robots and planetary rovers.

Why it matters. A planar arm with two links of lengths $L_1$, $L_2$ and joint angles $\theta_1$, $\theta_2$ places its gripper at the point given by $M=R_{\theta_1}T_{(L_1,0)}R_{\theta_2}T_{(L_2,0)}$ applied to $(0,0,1)$: rotate at the shoulder, move along the first link, rotate at the elbow, move along the second link. Order matters exactly as in Theorem 6.15.

What to do.

  1. Sample case: $L_1=0.4$ m, $L_2=0.3$ m, $\theta_1=30^\circ$, $\theta_2=45^\circ$. Write the four $3\times3$ matrices and multiply them (by hand or in a spreadsheet).
  2. Read off the gripper position from the last column of $M$ and compare with the formula $\left(L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2),\ L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)\right)$.
  3. Explain why the top-left $2\times2$ block of $M$ is $R_{\theta_1+\theta_2}$ and what it tells you about the gripper's direction.
  4. Describe the set of all positions the gripper can reach as $\theta_1$, $\theta_2$ vary (hint: an annulus) and give its inner and outer radii.

Tools: Calculator or spreadsheet; optionally Python with numpy

Hand in: The product matrix, the gripper position to the nearest millimetre, a sketch of the arm, and the reachable region.

Going further. The inverse problem โ€” which angles put the gripper at a given point? โ€” needs the cosine rule and usually has two solutions ("elbow up" and "elbow down"). Real robots use $4\times4$ homogeneous matrices for 3-D motion (the Denavitโ€“Hartenberg convention); the same idea runs every 3-D game engine and the camera models in self-driving cars.

Instructor note: $M=\begin{bmatrix}\cos75^\circ&-\sin75^\circ&0.4241\\\sin75^\circ&\cos75^\circ&0.4898\\0&0&1\end{bmatrix}$; the gripper is at $(0.4241,\ 0.4898)$ m, distance $\approx0.648$ m from the shoulder. Reachable region: $0.1\le r\le0.7$ m. For the target $(0.5,0.3)$ m: $\cos\theta_2=0.375$, $\theta_2\approx\pm67.98^\circ$.

๐Ÿงช Self-check quiz

0/5 correct

Q1. The anticlockwise rotation of the plane by $\theta$ has matrix

Q2. The determinant of any reflection of the plane in a line through the origin is

Q3. The orthogonal projection onto the $x$-axis sends the unit square to a figure of area

Q4. With $R=\begin{bmatrix}0&-1\\1&0\end{bmatrix}$ (rotation by $90^\circ$) and $F=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ (reflection in the $x$-axis), the matrix of "first rotate, then reflect" is

Q5. Why do computer-graphics programs use $3\times3$ matrices for moves of the plane?