# Linear transformations of the plane

The untransformed photo, or the photo acted on by the identity matrix.

As a continuation of my post on graphs of various functions, I am looking at a particular subclass of functions $f: \mathbb{R}^2 \to \mathbb{R}^2$.   Specifically, these will be linear transformations of the plane (as opposed to more general functions- for example, here is a fantastic video on Möbius transformations).

Before going further, let me say a fact that took me a surprisingly long time to realize: linear transformations of the plane are the same as 2 x 2 matrices.  This is a theorem and not a definition, in the following sense: a linear transformation from a real vector space V to a real vector space W is a function f  so that f(av+bw) = af(v)+bf(w) for any vectors v and w in V and real numbers a and b.  An m x n matrix A can be thought of as a function $A: \mathbb{R}^n \to \mathbb{R}^m$, since it acts on n dimensional vectors by multiplication and gives back an m dimensional vector.

So any matrix is a linear transformation: we would write $A(av+bw) = aAv+bAw$, where v and w are vectors, a and b real numbers.

Acted on by the matrix (-1 0;0 1)

The only difficult part is realizing that any linear transformation can be represented by a matrix.  Rather than be bogged down in notation, if $f: \mathbb{R}^2 \to \mathbb{R}^2$ is a linear transformation, then we only need to know the values of f on a basis of $\mathbb{R}^2$.  That is to say, if f((1,0)) = (a,c) and f((0,1)) = (b,d), then the matrix

$A = \left( \begin{array}{cc} a &b \\ c& d \end{array} \right)$

is the associated matrix.  We check this by noting that f((x,y)) = f((x,0)+(0,y)) = xf((1,0)) + yf((0,1)) = x(a,c)+y(b,d) = (ax + by, cx + dy).  Similarly,

$Av=\left(\begin{array}{cc}a&b\\c&d\end{array}\right)\left(\begin{array}{c}x\\y\end{array}\right)=\left(\begin{array}{c}ax+by\\cx+dy\end{array}\right)$

Acted on by -1 times the identity matrix. This is a rotation.

Thus, for at least finite dimensional vector spaces, we can use the words “matrix” and “linear transformation” interchangeably.  Notice where I used the fact that a (finite) basis for the domain exists.  Just to drive the point home, I will state the result in a different way: any linear transformation of the plane has real numbers a,b,c,d so that each point (x,y) is sent to the point (ax + by,cx+dy).

Now how do we visualize these transformations?  If we wanted to graph them, we would need four dimensions: two for the domain and two for the range.  If we wanted to view it as a parametric plot, we’ll only need two dimensions, but most such maps are surjective, that is to say, the image of the plane under a (nonsingular) matrix is the entire plane.  So using our previous strategies, we would just display a picture of the plane, which is not very helpful.

Shearing the image with the matrix (1 0;1 1). Also, a joke: how do you shear a sheep? Multiply it by the matrix (1 0;1 1). Hey-o!

So what do we do?  Well, we really care about where individual points go.  Intuitively, one might think of these maps as stretching, pulling and rotating the plane.  If you had a sandbox with a rainbow of colored sand inside, and then the wind blew on this sandbox all day, you would be able to see how the colors changed during the day.  This is an example of a function from the plane (the sandbox before the wind) to the plane (the sandbox after the wind).  We can do this pretty well with pictures.  What we will do is take an image, and move the pixel in the (i,j)-th position to the (ai+bj,ci+dj)-th position (or the nearest integer to that number).

I have displayed a few examples of matrices acting on the same image.

A random matrix that reflects, rotates and shears.