If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Matrices as transformations

Learn how exactly 2x2 matrices act as transformations of the plane.

Introduction

If we think about a matrix as a transformation of space it can lead to a deeper understanding of matrix operations. This viewpoint helps motivate how we define matrix operations like multiplication, and, it gives us a nice excuse to draw pretty pictures. This material touches on linear algebra (usually a college topic).

Multiplication as a transformation

The idea of a "transformation" can seem more complicated than it really is at first, so before diving into how 2×2 matrices transform 2-dimensional space, or how 3×3 matrices transform 3-dimensional space, let's go over how plain old numbers (a.k.a. 1×1 matrices) can be considered transformations of 1-dimensional space.
"1-dimensional space" is simply the number line.
Number Line
What happens when you multiply every number on the line by a particular value, like 2? One way to visualize this is as follows:
Khan Academy video wrapper
We keep a copy of the original line for reference, then slide each number on the line to 2 times that number.
Similarly, multiplication by 12 could be visualized like this:
Khan Academy video wrapper
And so that negative numbers don't feel neglected, here is multiplication by 3:
Khan Academy video wrapper
For those of you fond of fancy terminology, these animated actions could be described as "Linear transformations of 1-dimensional space". The word “transformation” means the same thing as “function”: something which takes in a number and outputs a number, like f(x)=2x. However, while we typically visualize functions with their graphs, people tend to use the word “transformation” to indicate that you should instead visualize some object moving, stretching, squishing, etc. So the function f(x)=2x visualized as a transformation gives us the "Multiplication by 2" video above. It moves the point 1 on the number line to where 2 starts off, moves 2 to where 4 starts off, etc.
Before we move on to 2-dimensional space, there's one simple but important fact we should keep in the back of our minds. Suppose you watch one of these transformations, knowing that it's multiplication by some number, but without knowing what that number is, like this one:
Khan Academy video wrapper
You can easily figure out which number is being multiplied into the line by following 1. In this case, 1 lands where 3 started off, so you can tell that the animation represents multiplication by 3.

What do linear transformations in 2 dimensions look like?

A 2-dimensional linear transformation is a special kind of function which takes in a 2-dimensional vector [xy] and outputs another 2-dimensional vector. As before, our use of the word “transformation” indicates we should think about smooshing something around, which in this case is 2-dimensional space. Here are some examples:
Khan Academy video wrapper
For our purposes, what makes a transformation linear is the following geometric rule: The origin must remain fixed, and all lines must remain lines. So all the transforms in the above animation are examples, but the following are not:
Khan Academy video wrapper
Khan Academy video wrapper

Following specific vectors during a transformation

Imagine you are watching one particular transformation, like this one
Khan Academy video wrapper
How could you describe this to a friend who is not watching the same animation? You can no longer describe it using a single number, the way we could just follow the number 1 in the one dimensional case. To help keep track of everything, let's put a green arrow over the vector [10], put a red arrow over the vector [01], and fix a copy of the grid in the background.
Khan Academy video wrapper
Now it's a lot easier to see where things land. For example, watch the animation again, and focus on the vector [11], we can more easily follow it to see that it lands on the vector [42].
We can represent this fact with the following notation:
[11][42]
Practice Problem: Where does the point at [10] end up after the plane has undergone the transformation in the above video?
صرف 1 جواب چنو

Practice Problem Even though it has gone off screen, can you predict where the point [30] has landed?
صرف 1 جواب چنو

Notice, a vector like [20], which starts off as 2 times the green arrow, continues to be 2 times the green arrow after the transformation. Since the green arrow lands on [12], we can deduce that
[20]2[12]=[24].
And in general
[x0]=x[10]x[12]=[x2x]
Similarly, the destination of the entire y-axis is determined by where the red arrow [01] lands, which for this transformation is [30].
Practice Problem: After the plane has undergone the transformation illustrated above, where does the general point [0y] on the y-axis land?
صرف 1 جواب چنو

In fact, once we know where [10] and [01] land, we can deduce where every point on the plane must go. For example, let's follow the point [12] in our animation:
Khan Academy video wrapper
It starts at 1 times the green arrow plus 2 times the red arrow, but it also ends at 1 times the green arrow plus 2 times the red arrow, which after the transformation means
1[12]+2[30]=[52]
This ability to break up a vector in terms of its components both before and after the transformation is what's so special about linear transformations.
Practice Problem: Use this same tactic to compute where the vector [11] lands.
صرف 1 جواب چنو

Representing two dimensional linear transforms with matrices

In general, since each vector [xy] can be broken down as
[xy]=x[10]+y[01]
If the green arrow [10] lands on some vector [ac], and the red arrow [01] lands on some vector [bd], then the vector [xy] must land on
x[ac]+y[bd]=[ax+bycx+dy]
A really nice way to describe all this is to represent a given linear transform with the matrix
A=[abcd]
where the first column tells us where [10] lands and the second column tells us where [01] lands. Now we can describe where any vector v=[xy] lands very compactly as the matrix-vector product
Av=[ax+bycx+dy]
In fact, this is where the definition of a matrix-vector product comes from.
So in the same way that 1-dimensional linear transforms could be described as multiplication by some number, namely whichever number 1 lands on top of, 2-dimensional linear transforms can always be described by a 2×2 matrix, namely the one whose first column indicates where [10] lands, and whose second column indicates where [01] lands.