Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 1

Lesson 3: Visualizing scalar-valued functions# Introduction to 3d graphs

Three-dimensional graphs are a way to represent functions with a two-dimensional input and a one-dimensional output. Created by Grant Sanderson.

## Want to join the conversation?

- who is Grant and does he do more instructional videos?(19 votes)
- Hello, This Very Cool Guy is Grant Sanderson, he has a YouTube Channel named 3blue1brown (I'd like to know what does that mean), where he talks about many different topics of his own choice, these days He's doing series on The essence of Linear Algebra, I recommend that you check them out, video-by-video.

That's all ! Have A Nice Day !(47 votes)

- How difficult is it to visualize more than 3 dimensions? Like, how many people can actually do that? Is it a requirement for very advanced math?(14 votes)
- That's difficult indeed! It would be hard to go beyond 4 dimensions, which could be a 3d object changing in time.

He mentions near the end of the video its tempting to think of all functions in terms of graphs, but difficult to do beyond 3 inputs+outputs. That's why we'll take a look at the 'work around' ways of visualizing those, like contour maps and vector space. Good luck!(19 votes)

- Are all outputs of multivariable equations 1-dimensional? I am wondering because I noticed that for f(x)=x^2, the input was 1-D and the output was 1-D. For f(x,y)=x^2+y^2, the input was 2-D and the output was 1-D again. So, are all outputs of multivariable functions the "height" of the graph? What would be examples of multidimensional outputs? Thanks!(7 votes)
- There are definitely outputs of more than 1D. Parametric equations such as x = 2t, y = t^2 are an example. The calculus of functions with one input and multiple outputs is pretty trivial (just do the operation on each dimension of output). But when there are multiple inputs and outputs, you need vector calculus (which is taught on Khan Academy).(6 votes)

- What software is being utilized to generate the graphs? Thank you.(4 votes)
- It's called Grapher. If you have a newer Mac, go to your home screen, and press "command + spacebar", and type in Grapher.(9 votes)

- As far as graphing utilities, do we only go up to 3D graphs? Is it even possible to have computers map out more than 3D?(5 votes)
- The 4th dimension is cosidered to be time, the different positions of the 3rd dimension at different stages. So if you think about it, an animated movie (or any computer animation) is in 4D.(7 votes)

- How can I turn on the subtitle? I want the transcript showing at the bottom of video.(3 votes)
- If you click the link in the lower right corner just below the video that reads "Switch to full player," you will get the version that is hosted on YouTube and you can toggle subtitles on.(4 votes)

- Why aren't there any exercises to go with all the videos?(3 votes)
- If you multiplied f(x,y) by a number that was small enough, say 1/n as n->infinity, would the output approach the original input plane as it became 'flatter' ?(3 votes)
- It will which means that every output will approach to zero value.

As n -> infinity, 1/n -> zero. This means you are multiplying by more and more zeroish number.

Precisely, lim_n->infinity {(1/n)f(x)}=0(1 vote)

- Why do the squares in the 3D graph get deformed(some seem elongated,some compressed)in different parts of the graph?

What does it actually signify?(1 vote)- The squares are meant to give you an idea of how the graph is curving through space. The deformities you mention help your eye interpret what it is seeing into a "3D" shape. The squares also probably (although I am not sure) represent sections of input, where the vertices of the squares represent integer x,y coordinates.(4 votes)

- How would you visually represent f(x,y,z)=[x+y+z , x^2+y^2+z^2] or any other 3d-input-2d-output function?(2 votes)

## Video transcript

- [Voiceover] Hello everyone. So what I'd like to do here is to describe how we think about
three-dimensional graphs. Three-dimensional graphs
are a way that we represent certain kind of multi-variable function that kind of has two inputs, or rather a two-dimensional input, and then one-dimensional
of output of some kind. So the one that I have pictured here is f of (x, y) equals x
squared plus y squared. And before talking
exactly about this graph, I think it would be helpful, by analogy, we take a look at the
two-dimensional graphs and kinda remind ourselves how those work, what it is that we do,
because, it's pretty much the same thing in three-dimensions, but it takes a little bit
more of visualization. So the two-dimensional graphs, they have some kind of function, you know, let's see you have f of
x is equal to x squared, and anytime you visualizing
a function, you trying to understand the relationship between the inputs and the outputs. And here those are both just numbers, so you know you input a number like two, and it's gonna output four, you know you input negative
one it's gonna output one. And you're trying to
understand all the possible input-output pairs. And the fact that we can do this, that we can get a pretty
good intuitive feel for every possible input-output
pair is pretty incredible, the way we go about this
with graphs is you think we just plotting these
actual pairs, right? So you're gonna plot the
point, let's say we are gonna plot the point (2,4), so we
may kind of mark our graph, two here, one, two, three, four, so you wanna mark somewhere here (2,4), and that represents an input-output pair. And if you do that with,
you know, negative one, one, you go negative one, one. And when you do this for every
possible input-output pair, what you end up getting, I
might not draw this super well, is some kind of smooth curve. The implication for doing this
is that we typically think of what is on the x-axis as
being where the inputs live, you know, this would be, we
think of as the input one, and this is the input two, and so on, and then you think of the
output as being the height of the graph above each point. But this is kind of a
consequence of the fact where we just listing
all of the pairs here. Now if we go to the world
of multi-variable functions, you know, not gonna show
the graph right now, let's just think we've got
three-dimensional space at out disposal to do with what we will. We still want to understand
the relationship between inputs and outputs of
this guy, but this case, inputs are something that we
think of as pair of points, we might have a pair of points like (1,2), and the output there is gonna be one squared plus two squared,
and that equals is five. So how do we visualize that? Well if we wanna pair these
things together, the natural way to do that is to think of
a triplet of some kind. So in this case, you wanna
plug the triplet (1, 2, 5), and to do that in three-dimensions, we'll take a look over
here, we think of going one in the x direction, this
axis here is the x-axis, so we want to move distance one there, and we want to go two in the y direction, so we kinda think of
going distance two there, and then five up, and then that's gonna give us some
kind of point, right? So we think this point in space and that's a given input-output pair. But we could do this for a lot, right, a couple different
points that you might get if you start plotting
various different ones, look something like this,
and of course there is infinitely many that you can
do and it'll take forever if you try to just draw each
one in three-dimensions, but what's really nice here
is that you know get rid of those lines, if you imagine doing this for all of the infinite
many pairs of inputs that you could possibly have,
you end up drawing a surface. So in this case the surface
kind of looks like a three-dimensional parabola,
that's no coincidence, it has to do with the
fact that we are using x squared and y squared here. And now the inputs like (1,
2), we think of as being on the xy-plane, right? So you think of the inputs living here, and then what corresponds
to the output is that height of a giving point
above the graph, right? So it's very similar to
two-dimensions, you think, you know, we think of the
inputs as being on one axis, and the height gives the output there. So just to give an example of what the consequence of this
is, I want you to think about what might happen if we change
our multi-variable function a little bit, and we multiply
everything by half, right? So I'll draw in red here, let's
see that we have a function, but I'm gonna change it so
that it outputs one half of x squared plus y squared. What's gonna be the shape of
the graph for that function? And what it means is the
height of every point above this xy-plane is gonna
have to get cut in half. So it's actually just the modification of what we already have,
but everything kind of sloops on down to be
about half of what it was. So in this case instead
of that height being five, it'll be two-point-five. You could imagine, let's
say we did this, you know, is even more extreme,
instead of saying one-half, you cut it down by like one-twelfth, maybe I'll use the same
color, by one-twelfth, that would mean that everything, you know, sloops very flat, very flat
and close to the xy-plane. So the graph being very
close to xy-plane like this corresponds to very small outputs. And one thing that I'd like
to caution you against, it's very tempting to try to think of every multi-variable function as a graph, cause we are so used to
graphs in two-dimensions and we are so used to
trying to find analogies between two-dimensions and
three-dimensions directly, but the only reason that
this works is because if you take the number of
dimension in the input, two-dimensions, and then
the number of dimensions in the output, one-dimension,
it was reasonable to fit all of that into
three, which we could do. But imagine if you have
a multi-variable function with, you know, a three-dimensional input, and a two-dimensional
output, that would require a five-dimensional graph,
but we are not very good at visualizing things like that. So there's lots of other
methods, and I think it's very important to
kinda of open you mind to what those might be. In particular, another one
that I'm gonna go through soon, lets us think about 3-D graphs but kind of in a two-dimensional setting,
and we are just gonna look at the input space,
that's called a contour map. Couple of other ones,
like parametric functions, you just look in the output space; things like vector space, you kind of look at the input
space but get all the outputs. There's lots of different
ways, I'll go over those in the next few videos. And that's three-dimensional graphs.