Skip to main content

Section 3.3 Reflections and Projections

In this section, we shall look at reflections and rotations in \(\R^2\) \(\R^3\) as linear maps. We shall also find their matrices explicitley.

Subsection 3.3.1 Reflections in \(\R^2\)

Recall that the reflection \(R_f\) about the \(x\)-axis in \(\R^2\) is give by \(R(x_1,x_2)=(x_1,-x_2)\text{.}\) The matrix of \(R_f\) with respect to the standard basis is \(\begin{bmatrix}1 \amp 0\\0 \amp -1 \end{bmatrix}\text{.}\) Let us look at how to find the reflection about any line \(y=mx\) where \(m=\tan\theta\text{.}\)

Example 3.3.1.

Let \(Q\) be the reflection in \(\R^2\) about the line \(y=mx\text{,}\) where \(m=\tan\theta\text{.}\) We wish to find the matrix of \(Q\) with respect to the standard basis.
Note that \(Q\) can be accomplished by first rotating by \(-\theta\text{,}\) then reflecting about \(x\)-axis and then rotating back by \(\theta\text{.}\) Thus
\begin{equation*} Q=R_\theta\circ R_f\circ R_{-\theta}\text{.} \end{equation*}
Note that \(R_f, R_\theta\) and \(R_{-\theta}\) are linear map, and hence \(Q\) is a linear map.
Using the notion of matrix of composition, the matrix of \(Q\) is given by
\begin{align*} Q=\amp \begin{bmatrix}\cos (\theta) \amp -\sin (\theta) \\\sin(\theta) \amp \cos(\theta) \end{bmatrix} \begin{bmatrix}1 \amp 0\\0 \amp -1 \end{bmatrix} \begin{bmatrix}\cos (-\theta) \amp -\sin (-\theta) \\ \sin(-\theta) \amp \cos(-\theta) \end{bmatrix}\\ =\amp \begin{bmatrix}\cos^2\theta-\sin^2\theta \amp 2\cos\theta\sin\theta\\ 2\cos\theta\sin\theta \amp \sin^2\theta-\cos^2\theta \end{bmatrix} \end{align*}
Since \(m=\tan\theta\text{,}\) \(\cos \theta = \frac{1}{\sqrt{1+m^2}}\) and \(\sin \theta = \frac{m}{\sqrt{1+m^2}}\text{.}\) Using this the matrix of \(Q\) with respect to the standard basis \(\beta\) of \(\R^2\)
\begin{equation*} [Q]_\beta=Q=\begin{bmatrix}\frac{1-m^2}{1+m^2} \amp \frac{2m}{1+m^2}\\ \frac{2m}{1+m^2} \amp \frac{m^2-1}{1+m^2} \end{bmatrix} =\frac{1}{1+m^2}\begin{bmatrix}1-m^2 \amp 2m\\ 2m \amp m^2-1 \end{bmatrix}\text{.} \end{equation*}

Checkpoint 3.3.2.

For the following linear transformation \(T\colon \R^2\to \R^2\text{.}\) Show that \(T\) is induced by a matrix and hence find the matrix.
(i) \(T\) is reflection about \(y\) axis.
(ii) \(T\) is reflection about the line \(y=x\)
(iii) \(T\) is reflection about the line \(y=-x\)
(iv) \(T\) is a clockwise rotation by an angle \(\pi/2\text{.}\)

Checkpoint 3.3.3.

(i) Let \(T\colon \R^3\to \R^3\) be a linear transformation which is reflection about the \(xy\) plane. Write \(T\) explicitly and hence show that it is induced by a matrix.
(ii) Let \(T\colon \R^3\to \R^3\) be a linear transformation which is reflection about the \(yz\) plane. Write \(T\) explicitly and hence show that it is induced by a matrix.

Subsection 3.3.2 Projections in \(\R^2\)

The linear map \(\pi_1\colon \R^2\to \R^2\text{,}\) given \(\pi_(x_1,x_2)=x_1\) is the projection on to \(x\)-axis. Similarly, \(\pi_1\colon \R^2\to \R^2\text{,}\) given \(\pi_(x_1,x_2)=x_2\) is the projection on to \(y\)-axis. It is easy to check that the matrix of \(\pi_1\) with respect to the standard basis is \(\begin{bmatrix}1 \amp 0 \\0 \amp 0 \end{bmatrix}\text{.}\) Similarly, the matrix of \(\pi_2\) with respect to the standard basis is \(\begin{bmatrix}0 \amp 0 \\0 \amp 1 \end{bmatrix}\text{.}\)
We wish to define the projection \(P\) onto the line \(y=mx\text{,}\) where \(m=\tan\theta\text{.}\)

Example 3.3.4.

Let \(P\) be the projection in \(\R^2\) onto the line \(y=mx\text{,}\) where \(m=\tan\theta\text{.}\) We wish to find the matrix of \(Q\) with respect to the standard basis.
Using a similar procedure, we have
\begin{equation*} P =R_\theta\circ \pi_1\circ R_{-\theta} \end{equation*}
Hence the matrix of \(P\) is
\begin{align*} P=\amp \begin{bmatrix} \cos (\theta) \amp -\sin (\theta) \\ \sin(\theta) \amp \cos(\theta) \end{bmatrix} \begin{bmatrix}1 \amp 0\\0 \amp 0 \end{bmatrix} \begin{bmatrix}\cos (-\theta) \amp -\sin (-\theta) \\ \sin(-\theta) \amp \cos(-\theta) \end{bmatrix} \\ =\amp \begin{bmatrix}\cos^2\theta\amp \cos\theta\sin\theta\\ \cos\theta\sin\theta \amp \sin^2\theta \end{bmatrix}\text{.} \end{align*}
After simplification, the matrix of \(P\) is
\begin{equation*} P =\frac{1}{1+m^2}\begin{bmatrix}1 \amp m \\m \amp m^2 \end{bmatrix}\text{.} \end{equation*}
Write down the matrix of reflection about the line passing through the origin and the point \((a,b)\text{,}\) with \(a\neq 0\text{.}\)

Checkpoint 3.3.5.

If \(P\) is the projection onto the line \(y=mx\text{,}\) then show that \(P^2=P\text{.}\) In particular, \(P^{-1}=P\text{.}\) Thus the matrix \(P =\frac{1}{1+m^2}\begin{bmatrix}1 \amp m \\m \amp m^2 \end{bmatrix}\) is an idempotent matrix.
Write down the matrix of reflection onto the line passing through the origin and the point \((a,b)\text{,}\) with \(a\neq 0\text{.}\)

Checkpoint 3.3.6.

For the following linear transformations \(P\colon \R^3\to T^3\text{,}\) show that its is induced by a matrix and find the matrix.
(i) \(P\) is is projection onto \(xy\) plane.
(ii) \(P\) is is projection onto \(yz\) plane.

Subsection 3.3.3 Projection and Reflection in \(\R^3\)

Example 3.3.7. Rotation in \(\R^3\).

Let \(R_{z,\theta} \colon \R^3\to \R^3\) denote the rotation in \(\R^3\) about the \(z\)-axis through an angle \(\theta\) from the positive x=\(x\)-axis toward the positive \(y\)-axis (that is anticlockwise). Let us find the matrix of this transformation with respect to the standard basis.
First of notice that in this case, the \(z\)-coordinate of any vector does not change. Thus \(R_{z,\theta}(e_3)=e^3\text{.}\) What happens to \(e_1\) and \(e_2\text{?}\) They get rotated by an angle \(\theta\text{.}\) That is \(R_{z,\theta}(e_1)=\begin{bmatrix}\cos \theta \\\sin\theta\amp 0 \end{bmatrix}\) and \(R_{z,\theta}(e_2)=\begin{bmatrix}-\sin \theta \\\cos\theta\amp 0 \end{bmatrix}\text{.}\) Hence the matrix of \(R_{z,\theta}\) is
\begin{equation*} R_{z,\theta} =\begin{bmatrix}\cos \theta \amp -\sin\theta\amp 0\\ \sin\theta \amp \cos\theta \amp 0\\ 0 \amp 0 \amp 1 \end{bmatrix} \end{equation*}
Find the matrix of \(R_{x,\theta}\) and \(R_{y,\theta}\text{.}\)

Example 3.3.8. Projection onto a line in \(\R^3\).

Let \(v=(a,b,c)\) be a nonzero vector in \(\R^3\) and \(L\) is the line passing through \((a,b,c)\) and the origin, that is, \(L=\R_v=\{\alpha v:\alpha\in \R\}\text{.}\) We wish to find the orthogonal projection of any vector \(u=(x,y,z)\in \R^3\text{.}\) If \(p\) is the orthogonal projection of \(u\) onto \(L\text{,}\) then \(p=tv\) for some scalar \(t\) and \(u-p\) is orthogonal to \(p\text{.}\) Reader is encouraged to draw figure. From this, it is easy to see that \(t=\frac{v\cdot u}{||v||^2}\text{.}\) Hence
\begin{align*} p=\frac{ax+by+cz}{a^2+b^2+c^2}\begin{bmatrix}a\\b\\c \end{bmatrix} =\amp \frac{1}{a^2+b^2+c^2} \begin{bmatrix}a^2x+aby+acz\\abx+b^2y+bcz\\acx+bcy+c^2z \end{bmatrix}\\ = \amp \frac{1}{a^2+b^2+c^2}\begin{bmatrix}a^2\amp ab\amp ac\\ab\amp b^2\amp bc\\ ac\amp bc\amp c^2 \end{bmatrix} \begin{bmatrix}x\\y\\z \end{bmatrix}\text{.} \end{align*}
We denote this projection by \(P_L\text{.}\) Thus the matrix of \(P_L\) is
\begin{equation*} P_L=\frac{1}{a^2+b^2+c^2}\begin{bmatrix}a^2\amp ab\amp ac\\ab\amp b^2\amp bc\\ac\amp bc\amp c^2 \end{bmatrix}\text{.} \end{equation*}

Example 3.3.9. Reflection about a line in \(\R^3\).

Let \(v=(a,b,c)\) be a nonzero vector in \(\R^3\) and \(L\) is the line passing through \((a,b,c)\text{.}\) We wish to find the reflection \(Ref_L(u)\) of any vector \(u=(x,y,z)\in \R^3\) through the line \(L\text{.}\) Suppose \(P_L(u)\) is the orthogonal projection of \(u\) onto \(L\text{.}\) Then \(P_L(u)\) is the mid point of \(u\) and \(Ref_L(u)\text{.}\) Hence \(Ref_L(u)=2P_L(u)-u\text{.}\) By the Ex. Checkpoint 3.2.6, the matrix of \(Ref_L\) is given by
\begin{align*} Ref_L =\amp \frac{2}{a^2+b^2+c^2}\begin{bmatrix}a^2\amp ab\amp ac\\ab\amp b^2\amp bc\\ac\amp bc\amp c^2 \end{bmatrix} -\begin{bmatrix}1\amp 0\amp 0\\0\amp 1\amp 0\\0 \amp 0 \amp 1 \end{bmatrix}\\ =\amp \frac{2}{a^2+b^2+c^2}\begin{bmatrix}a^2-b^2-c^2\amp 2ab\amp 2ac\\2ab\amp b^2-a^2-c^2\amp 2bc\\2ac\amp 2bc\amp c^2-a^2-b^2 \end{bmatrix} \end{align*}

Example 3.3.10. Projection onto a plane in \(\R^3\).

Let \(\pi\) be a plane given by the equation \(ax+by+cz=0\text{.}\) Then the vector \(n=(a,b,c)\) is normal to \(\pi\text{.}\) We wish to find the orthogonal projection of any vector \(v=(x,y,z)\) onto \(\pi\text{.}\)
Let \(P_\pi(v)\) be denote the projection of \(v\) onto \(\pi\) and \(P_n(v)\text{,}\) the projection of \(v\) onto to \(n\text{.}\) (Draw figure) Then
\begin{equation*} P_\pi(v)=v-P_n(v)\text{.} \end{equation*}
Hence the the matrix of \(P_\pi\) is given by
\begin{align*} P_\pi\amp =\amp \begin{bmatrix}1\amp 0\amp 0\\0\amp 1\amp 0\\0 \amp 0 \amp 1 \end{bmatrix} -\frac{1}{a^2+b^2+c^2}\begin{bmatrix}a^2\amp ab\amp ac\\ab\amp b^2\amp bc\\ac\amp bc\amp c^2 \end{bmatrix}\\ \amp =\amp \frac{1}{a^2+b^2+c^2}\begin{bmatrix}b^2+c^2\amp -ab\amp -ac\\-ab\amp a^2+c^2\amp -bc\\-ac\amp -bc\amp a^2+b^2 \end{bmatrix} \end{align*}

Example 3.3.11. Reflection through a plane in \(\R^3\).

Let \(\pi\) be a plane given by the equation \(ax+by+cz=0\text{.}\) Then the vector \(n=(a,b,c)\) is normal to \(\pi\text{.}\) We wish to find the reflection \(Ref_\pi(v)\) of any vector \(v=(x,y,z)\) through \(\pi\text{.}\)
Suppose \(P_\pi(v)\) is the orthogonal projection of \(v\) onto \(\pi\text{.}\) Then it is easy to see that
\begin{equation*} P_M(v)=\frac{1}{2}\left[v+Ref_\pi(v)\right]\text{.} \end{equation*}
Now it is easy to show that the matrix of \(Ref_\pi\) is given by
\begin{equation*} Ref_\pi = \frac{1}{a^2+b^2+c^2}\begin{bmatrix}b^2+c^2-a^2\amp -2ab\amp -2ac\\-2ab\amp a^2+c^2-b^2\amp -2bc\\-2ac\amp -2bc\amp a^2+b^2-c^2 \end{bmatrix}\text{.} \end{equation*}