We find standard matrices for classic transformations of the plane such as scalings, shears, rotations and reflections.

LTR-0070: Geometric Transformations of the Plane

Digital image manipulation apps continue to increase in popularity. To manipulate a digital image, we treat every pixel of the image as a point or a vector in . A transformation is applied to each pixel, and the output pixel is colored the same color as the input pixel. The figure below shows the result of a non-linear transformation.

Many familiar transformations, such as rotations, reflections and shears, are linear. Every pixel of a digital image is treated as a vector . To perform a linear transformation, we multiply the vector by a matrix. The figure below shows the result of a linear transformation applied to the photo of a building. Linear transformations keep the origin fixed, and map lines to lines. (See Practice Problem prob:linestolines)

We now consider several basic linear transformations and the standard matrices associated with them. The key concept is that if we want to understand what a linear transformation does, it is enough to understand what it does to basis vectors, such as standard basis vectors and . Caution: we can get into trouble if we try to construct a standard matrix for a non-linear transformation by tracking images of and , as you will see in one of the Practice Problems!

Horizontal and Vertical Scaling

Let us attempt to find the standard matrix of a transformation that stretches an image vertically by a factor of 2, as shown in the figure below.

Assuming that this transformation is linear, we need to find what the transformation does to the standard basis vectors. Once we have a candidate for the standard matrix, we will test it to make sure it accomplishes the stretch.

Consider what this transformation does to the standard unit vectors. We observe that and . This allows us to construct a candidate for the standard matrix , by making the images of and the columns of . Thus,

We can now check to see what this matrix does to an arbitrary point . Treating this point as a vector , we compute Thus, this transformation takes point to point . So, the proposed transformation doubles all -coordinates resulting in a vertical stretch by a factor of 2.

In general, a vertical stretch (or compression) leaves unchanged, and scales the vector while preserving its vertical direction. Thus, a vertical stretch (or compression) maps to , and maps to for some positive number . Similarly, a horizontal stretch (or compression) maps to , and maps to .

In stating the above formula we stipulated that . If we were to allow to be zero, what would the resulting transformations accomplish? In what way would the resulting matrices be fundamentally different from matrices and ? What would happen if were allowed to be negative? (See Practice Problem prob:k0)

Horizontal and Vertical Shears

A horizontal shear is a transformation that takes an arbitrary point and maps it to the point . The effect of this transformation is that all points along a fixed horizontal line slide to the left or to the right by a fixed amount. Note that the higher the point is above the -axis, the greater is the magnitude of , resulting in a greater amount of horizontal slide.

Adding a scalar multiple of the component to the component can be accomplished by matrix multiplication. Observe that

A vertical shear is a transformation that takes an arbitrary point and maps it to the point . This too, can be accomplished by matrix multiplication.

Because both types of shears are induced by matrices, horizontal and vertical shears are linear transformations.

Rotations about the Origin

Recall that to prove that a transformation is linear, we have to show that for all vectors and and scalars and we have

We are used to going through this verification algebraically. In some situations, however, it is instructive to think about this property geometrically. Consider a transformation that rotates every point in the plane counter-clockwise through angle about the origin. Is a linear transformation?

The figure below illustrates the left-hand side of Equation eq:rotlintrans. Scalar multiples of and are added in the domain, then the sum is rotated through angle by .

The next figure illustrates the right-hand side of Equation eq:rotlintrans. First, vectors and are rotated through angle , then their images are scaled and added together.

Because the diagonal of a parallelogram rotates with the parallelogram, it is clear that So, intuition tells us that is linear.

Before we consider the general standard matrix of , let’s take a look at a specific example.

In general, we find the standard rotation matrix by determining the images of vectors and .

Reflections about Lines of the Form

When a point is reflected about a line, its image is located on the opposite side of the line and the same distance away from the line as the original point.

For example, the figure below shows the reflection of point about line . Note that the reflection lies on a line through perpendicular to .

Arguing in a manner similar to our discussion of linearity of rotations, we can see that reflections are also linear. Our task is to find the matrix of a reflection of the plane about an arbitrary line through the origin.

In this problem we will find the standard matrix for the reflection about the and axes. You can easily do this on your own by finding the images of vectors and .

We will start with the reflection about the -axis.

So, the standard matrix that induces the reflection about the -axis is Next, we will consider the reflection about the -axis.

Thus, the standard matrix that induces the reflection about the -axis is

Now we will turn our attention to transformations that reflect the plane about the line . We will assume that .

Consider the vector and its reflection.

Observe that the head of the image vector, , will lie on the line that passes through and is perpendicular to the line . The equation of this line is given by

The head of will also lie on the circle with equation

To find the image of we need to determine where the line intersects the circle. Substitution gives us

After a little algebra we get The quadratic formula yields

The solution corresponds to the head of the vector . So, the -component of is . We find the -component of by substituting into Equation eq:reflectionline. Thus, the image of under this reflection is given by

Next we need to find the image of . The head of is located at one of the intersections of line and the circle .

We leave it to the reader to verify that

The standard matrix of this reflection is then given by

Note that when , expression (eq:reflectionymx) is consistent with the reflection matrix you found in Exploration init:reflectionxyaxes.

Note that the eye of the duck in Example ex:reflectedduck is located on the line . The reflection leaves the eye fixed in place. The eye is an example of a fixed point. In Practice Problem prob:fixedpoint you will be asked to show that every point along the line is a fixed point.

Composition of Linear Transformations

If a linear transformation is followed by another linear transformation, the resulting transformation can be represented by a product of the two matrices that induce the individual transformations. Thus, if is induced by and is induced by , then is induced by .

Remember that matrix multiplication is not commutative, so the order in which the matrices are multiplied is of utmost importance.

In this problem we will consider compositions of two reflections and use geometry to illustrate non-commutativity of matrix multiplication. Let be a reflection about the line . Let be a reflection about the line . We will denote the standard matrices for these transformations by and , and use geometry to demonstrate that .

To do this, consider transformations and . Transformation is induced by , and is induced by .

The figure on the left illustrates the action of on a single point . First, is reflected about the line , then is reflected about the line .

The figure on the right shows the action of on the same point . The point is first reflected about the line , followed by a reflection about the line . The final images of point under and are clearly different.

Since , we conclude that .

Inverse of a Linear Transformation

Recall that two linear transformations are inverses of each other if their composition is the identity transformation. If a linear transformation induced by the matrix is invertible, then is induced by .

Geometry can help find the inverse of certain matrices. For example, we can easily see that the inverse of the rotation transformation with standard matrix has the inverse with standard matrix .

Practice Problems

Consider matrices and in (vscale) and (hscale).
(a)
If we were to allow to be zero, what would the resulting transformations accomplish?
(b)
In what way would the resulting matrices be fundamentally different from matrices and ?
(c)
Do and have inverses? What about and ?
(d)
What would happen if we allowed to be negative?
Find the standard matrix of a linear transformation that would double the length of a photo horizontally, and triple the height of the photo.
(Sheared Sheep) Find the standard matrix of the linear transformation shown in the figure.

In the beginning of this module we claimed that linear transformations leave the origin fixed and map lines to lines. Prove this claim.

Suppose a 1 by 1 photo of a chipmunk was shifted as shown in the figure.

Suppose we tried to construct a standard matrix for this transformation by making the images of and the columns of . We would obtain Does this matrix describe the transformation? If so, prove it. If not, explain why not.

A transformation that shifts all points in the plane horizontally or vertically by a fixed amount is called a translation. Is a linear transformation? Prove your claim.
A reflection about the line followed by another reflection about the same line, amounts to the identity transformation. Prove this using matrix multiplication.
Verify Equation (eq:imageofj).
Prove that every point along the line in Example ex:reflectedduck is a fixed point.
The figure below shows a sequence of two linear transformations that accomplishes a reflection about the line . The first transformation is a reflection of the plane about the -axis. The second transformation is a rotation of the plane about the origin. Find the standard matrices for the two transformations and verify that their product (in the correct order) is the reflection matrix of Example ex:reflectedduck.

Photo Credits

The following images are courtesy of Wikimedia Commons

Adrian Pingstone, A male Mandarin Duck at Slimbridge Wildfowl and Wetlands Centre, Gloucestershire, England. Public Domain

Ansgar Koreng, Facade of ARD-Hauptstadtstudio in Berlin-Mitte. CC-BY 4.0

Christoph Braun, Reflection of St. Michaelis Church in a window of St. Ansgar in Hamburg, Germany. Public Domain.

Daniel Gammert, Red-billed Gulls Chroicocephalus novaehollandiae scopulinus. Brighton Beach, New Zealand. Public Domain

I, Tony Wills, Red billed gull in Wellington Harbour, Wellington, New Zealand. CC-BY

Jackhynes, Lleyn sheep taken with a Sony Digital Camera at 3.2 megapixels in Devon, UK. Public Domain

Thomas Bresson from Belfort, France, Old World Swallowtail. CC-BY