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.

### Course: Multivariable calculus>Unit 1

Lesson 6: Visualizing multivariable functions (articles)

# Transformations

Here we see how to think about multivariable functions through movement and animation.

## The idea of transformations

In all of our methods for visualizing multivariable functions, the goal is to somehow see the connection between the input and the output of a function.
• With graphs, this means plotting points whose coordinates include both input and output information.
• With contour maps this means marking which input values will go to certain output values.
• With parametric functions, you mark where the input lands in the output space.
• With vector fields you plot the output as a vector whose tail sits at the input.
The thought behind transformations is to simply watch (or imagine) each input point moving to its corresponding output point.
It can be a bit of a mind-warp to view functions as transformations if you never have before, so if it feels confusing at first, that's okay.
To whet your appetite for what this might look like, here's a video from the parametric surface article which shows how a certain function transforms a square into a torus (doughnut shape):

## Concept over precision

Thinking about functions as transformations can be very powerful for a few reasons:
• We are not constrained as much by dimension. Both the input and the output can have either one, two or three dimensions, and there will be a way to concretely think about what the function is doing.
Even when the dimensions are too big to look at, thinking in terms of a transformation at least allows for a vague idea of what's happening in principle. For example, we can know that a function from $100$-dimensional space to $20$-dimensional space is "flattening" down $80$ dimensions, perhaps analogous to squishing three-dimensional space onto the line.
• This idea generalizes more easily to functions with different types of inputs and outputs, such as functions of the complex numbers, or functions that map points of the sphere onto the $xy$-plane.
• Understanding functions in this capacity will make it easier to see the connections between multivariable calculus and linear algebra.
However, with all that said, it should be stressed that transformations are most powerful as an understanding of what functions do, not as a precise description. It would be rare to learn the properties of a given function by observing what it looks like as a transformation.

## Example 1: From line to line

Let's start simple, with a single-variable function.
$f\left(x\right)={x}^{2}-3$
Consider all the input-output pairs.
$x$ (input)${x}^{2}-3$ (output)
$-2$$\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}1$
$-1$$-2$
$\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}0$$-3$
$\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}1$$-2$
$\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}2$$\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}\phantom{\rule{0.278em}{0ex}}1$
$\phantom{\rule{1em}{0ex}}⋮$$\phantom{\rule{1em}{0ex}}⋮$
What would it look like for all the inputs on the number line to slide over onto their corresponding output? If we pictured the input space as one number line, and the output space as another number line, we might get a motion like this:
Alternatively, since in this case the input space and output space are really the same thing, a number line, we could think of the line transforming onto itself, dragging each point $x$ to where the point ${x}^{2}-3$ started off, like this:

## Example 2: From line to plane

Now let's take a function with a one-dimensional input and a two-dimensional output, like
$\begin{array}{r}\phantom{\rule{1em}{0ex}}f\left(x\right)=\left(\mathrm{cos}\left(x\right),\frac{x}{2}\mathrm{sin}\left(x\right)\right)\end{array}$
Again we consider all input-output pairs.
Inputs $x$Outputs $\left(\mathrm{cos}\left(x\right),\frac{x}{2}\mathrm{sin}\left(x\right)\right)$
$0$$\left(1,0\right)$
$\frac{\pi }{2}$$\left(0,\frac{\pi }{4}\right)$
$\pi$$\left(-1,0\right)$
$⋮$$\phantom{\rule{1em}{0ex}}\phantom{\rule{0.278em}{0ex}}⋮$
Imagine all possible inputs on the number line sliding onto their corresponding outputs. This time, since the outputs have two coordinates, they live in the $xy$-plane.
Notice, the final image of the warped and twirled number line inside the $xy$-plane is what we would have drawn if we interpreted $f$ as a parametric function, but this time, we can actually see which input points end up where on the final curve.
Let's take a moment to watch it again and follow some specific inputs as they move to their outputs.
$\begin{array}{rl}\phantom{\rule{1em}{0ex}}0& \to f\left(0\right)=\left(\mathrm{cos}\left(0\right),0\mathrm{sin}\left(0\right)\right)=\left(1,0\right)\\ \\ \frac{\pi }{2}& \to f\left(\frac{\pi }{2}\right)=\left(\mathrm{cos}\left(\frac{\pi }{2}\right),\frac{\pi }{4}\mathrm{sin}\left(\frac{\pi }{2}\right)\right)=\left(0,\pi /4\right)\\ \\ \pi & \to f\left(\pi \right)=\left(\mathrm{cos}\left(\pi \right),\frac{\pi }{2}\mathrm{sin}\left(\pi \right)\right)=\left(-1,0\right)\\ \end{array}$

## Example 3: Simple plane to plane transformation

Consider a ${90}^{\circ }$ rotation of the plane (arrows are pictured just to help follow the transformation):
This could be considered a way to visualize a certain function with a two-dimensional input and a two-dimensional output. Why?
This transformation moves points in two-dimensional space to other points in two-dimensional space. For example, the point that starts at $\left(1,0\right)$ ends at $\left(0,1\right)$. The point that starts at $\left(1,2\right)$ ends at $\left(-2,1\right)$, etc. The function describing this transformation is
$f\left(x,y\right)=\left(-y,x\right)$
For any given point, like $\left(3,4\right)$, this function $f$ tells you where that point lands after you rotate the plane ${90}^{\circ }$ counterclockwise, (in this case $\left(-4,3\right)$).

## Example 4: More complicated plane to plane transformation

Now let's look at a more complicated function with a two-dimensional input and a two-dimensional output:
$f\left(x,y\right)=\left({x}^{2}+{y}^{2},{x}^{2}-{y}^{2}\right)$.
Each input is a point on the plane, such as $\left(1,2\right)$, and it moves to another point on the plane, such as $\left({1}^{2}+{2}^{2},{1}^{2}-{2}^{2}\right)=\left(5,-3\right)$. When we watch every point on the plane slide over to its corresponding output point, it looks as if a copy of the plane is morphing:
Notice, all the points end up on the right side of the plane. This is because the first coordinate of the output is ${x}^{2}+{y}^{2}$, which must always be positive.
Challenge question: In the transformation above, representing the function $f\left(x,y\right)=\left({x}^{2}+{y}^{2},{x}^{2}-{y}^{2}\right)$, notice that all points end up in the sideways-$V$-shaped region between the lines $x=y$ and $x=-y$. Which of the following numerical facts explains this?

## Example 5: From plane to line

Next think of a function with a two-dimensional input and a one-dimensional output.
$f\left(x,y\right)={x}^{2}+{y}^{2}$,
The corresponding transformation will squish the $xy$-plane onto the number line.
Such squishification can make it hard to follow everything that's going on, so for the sake of a precise and clear description, you would be better off using a graph or a contour map. Nevertheless, it can be a helpful concept to keep in the back of your mind that what function from two dimensions to one dimension does is squish the plane onto the line in a certain way.
For instance, this gives a new way to interpret the level sets in a contour map: they are all the points of the plane which scrunch together into a common point on the line.

## Example 6: From plane to space

Functions with a two-dimensional input and three-dimensional output map the plane into three-dimensional space. For instance, such a transformation might look like this (the red and blue lines are just to help keep track of what happens to the $x$ and $y$ directions):
Analogous to the one-to-two dimensions example above, our final image reflects the surface we would get by interpreting the function as a parametric function.

## Example 7: From space to space

Functions from three dimensions to three dimensions can be seen as mapping all three-dimensional space onto itself. With this many variables, actually looking at the transformation can be a combination of horrifying, beautiful, and confusing. For instance, consider this function:
$f\left(x,y,z\right)=\left(yz,xz,xy\right)$
Here's what it looks like as a transformation.
It might be pretty, but it's a serious spaghettified mess to actually try to follow.

## Final thoughts

Transformations can provide wonderful ways to interpret properties of a function once you learn them. For instance, constant functions squish their input space to a point, and discontinuous functions must tear apart the input space during the movement.
These physical interpretations can become particularly helpful as we venture into the topics of multivariable calculus, in which one runs the risk of learning concepts and operations symbolically without an underlying understanding of what's happening.

## Want to join the conversation?

• I would like to suggest in this article to implement the idea of Jacobian determinant to introduce the unit area or volume of a transformed object.
• Can someone explain to me better what exactly the reflection question is? I don't understand it, although I feel like I understand the material.
• I think it's when one thing goes to another thing.
(1 vote)
• Can anyone explain a little bit more about the challenge question? I guessed it correctly, but couldn`t understand it even with the answer.
• The 𝑥-coordinate of the output, 𝑥² + 𝑦²,
is always greater than or equal to 0,
which means that the output will always be
on or to the right of the 𝑦-axis.

The absolute value of the 𝑦-coordinate of the output, |𝑥² − 𝑦²|,
is always less than or equal to the 𝑥-coordinate of the output,
which means that the output's distance to the 𝑥-axis is
never greater than its distance to the 𝑦-axis.
Thereby the output must be below the line 𝑦 = 𝑥
and above the line 𝑦 = −𝑥.
• Math is really amazing!
• If we consider a function from 3-dimensional space to 1-d real line (like a scalar-valued f(x,y,z) kind of function) and look at it as a transformation, we will see a 3d space being squeezed to a line. Similarly in a 1-input 3-output vector valued function we will see the real line to take a curvy shape in 3-space. But, is it possible to devise a function from 1D space to 3D space that will convert a line to a surface ? Intuitively it seems unlikely to have such a vector valued function, but is it really mathematically impossible?
• Nice question! :-)

After thinking about it for a while I'm come to the conclusion that it is NOT possible. Anytime you only have one argument in your function/transformation then as you change that argument we will draw a curve in the N-dimensional space depending on the dimensions of our output vector.

Now I suppose we could write another mathematical function that takes this output and create a surface using its outputs, but I can't think of a way to create a surface by itself.

So as far as I can tell we would need (at least) a a function with a 2-dimensional domain (2 operands).

If anyone else has additional thoughts feel free to share them with us, but this makes sense to me at least.

Hope this helps!
- Convenient Colleague
• What about transformations from space to plane, from line to space, and from space to line?
• Yes, they are possible. But they might've been left out of this article for sake of brevity.
• Is there a way of following the space to space transformation?