Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 1

Lesson 1: Introduction to multivariable calculus# Multivariable functions

An introduction to multivariable functions, and a welcome to the multivariable calculus content as a whole. Created by Grant Sanderson.

## Want to join the conversation?

- Is learning ahead good? Because i am only in 8th grade.(30 votes)
- It is all about the prerequisite. If you have master the "single variable" calculus, then you can give it a go.(28 votes)

- Can Multivariable functions be the functions?

The definition of function is that "one input - function - one output". But Mutilvariable functions have multiple inputs and multiple outputs.

I can't understand why people call this function.(14 votes)- If your function has two real-valued variables, view the domain as a set of ordered pairs. If there are no restrictions on the domain you can think of every point on the x-y plane as a unique input. After all, couldn't f(1, 2) and f(1,3) be different?

If your function has three variables, view the domain as a set of ordered triplets. Then you might imagine points in space as being the domain.

Once you get more than 3 variables the idea is the same. So for a 5-variable function the members of the domain are ordered 5-tuples and look like this: [x1, x2, x3, x4, x5] It just becomes harder to imagine these "points" as a physical entity.(13 votes)

- How can I do animations like these? Any particular language/library?(13 votes)
- You might check the Github page for 3Blue1Brown, where he has a python library he uses for his videos called
`manim`

(he teaches this course as well). https://github.com/3b1b/manim(23 votes)

- What is the highest math you can do? Like when does it stop?(12 votes)
- Ultimavariable Calculus.(2 votes)

- what are the prerequisites for this course ?(7 votes)
- And of course an inquisitive (curious) mind, but you seem to have that already. It would be nice to hear if you ever finished the course.(6 votes)

- Beginning at around5:08as Grant alludes to multivariate functions as transformations of a given input space--is there a proper name for that sort of animated visualization? In other words, how would a user's manual for a piece of plotting software refer to that particular feature?(6 votes)
- Linear Algebra is the study of how functions (which are codified by matrices) transform R^n into R^m for some n and m. You can look into that for details.(2 votes)

- Hey, it is Grant Sanderson! Man is showing off their manim.(6 votes)
- Are there any missions/skills planned for multivariable calculus? Thanks.(6 votes)
- I have seen courses labeled as integral or differential calculus. What is the difference between integral/differential calculus and multivariable calculus?(4 votes)
- Integral and differential calculus are taken before multivariable calculus and deal with single inputs into functions. They introduce basic calc topics like derivatives and integrals, of course, as well as relations between position, velocity, and acceleration, series and sequences, parametrics, etc.(4 votes)

## Video transcript

- [Voiceover] Hello and welcome to multivariable calculus. So I think I should probably start off by addressing the elephant
in the living room here. I am, sadly, not Sal, but I'm still gonna teach you some math. My name is Grant. I'm pretty much a math enthusiast. I enjoy making animations
of things when applicable, and boy, is that applicable when it comes to multivariable calculus. So, the first thing we gotta get straight is what is this word multivariable that separates calculus, as we know it, from the new topic that
you're about to study? Well, I could say it's all
about multivariable functions, that doesn't really answer anything because what's a multivariable function? And basically, the kinds of functions that we're used to dealing with, in the old world, in the
ordinary calculus world, will have a single input,
some kind of number as their input, and then the output is
just a single number. And you would call this a
single variable function. Basically because that guy
there is the single variable. So then a multivariable function is something that handles
multiple variables. So, you know, it's common
to write it as x, y, it doesn't really matter
what letters to use, and it could be, you know, x, y, z, x one, x two, x three,
a whole bunch of things, but just to get started, we often think just two variables and this will output
something that depends on both of those. Commonly it will output just a number, so you might imagine a
number that depends on x and y in some way,
like, x squared plus y, but it could also output a vector, right? So you could also imagine something that's got multivariable input, f of x, y, and it outputs something that also has multiple variables, like, I mean I'm just making stuff up here, three x and, you know, two y. And, this isn't set in stone, but the convention is to usually think if there's multiple numbers
that go into the output, think of it as a vector, if there's multiple numbers
that go into the input, just kind of write them, write them more sideways like this, and think of them as a point in space. Because, I mean when you
look at something like this, and you've got an x and you've got a y, you could think about those
as two separate numbers. You know, here's your number line with the point x on it somewhere, maybe that's five, maybe that's three, it doesn't really matter. And then you've got another number line and it's y, and you could think of them as separate entities. But, it would probably be more accurate to call it multidimensional calculus, because, really, instead
of thinking of, you know, x and y as separate entities, whenever you see two things like that you're gonna be thinking
about the x y plane. And thinking about just a single point. And you'd think of this as a
function that takes a point to a number, or a point to a vector. And a lot of people, when they start teaching multivariable calculus, they just jump into the calculus, and there's lots of fun things, partial derivatives, gradients, good stuff that you'll learn. But I think first of all, I want to spend a couple videos just talking about the different ways we visualize the different types of multivariable functions. So, as a sneak peak, I'm just gonna go through a couple of them really quickly right now, just so you kind of whet your appetite and see what I'm getting at, but the next few videos are
going to go through them in much, much more detail. So, first of all, graphs. When you have multivariable functions, graphs become three dimensional. But these only really apply
to functions that have some kind of two-dimensional input, which you might think about as living on this x y plane, and a single number as their output and the height of the graph is gonna correspond with that output. Like I said, you'll be
able to learn much more about that in the dedicated video on it, but these functions also can be visualized just in two dimensions,
flattening things out. Where we visualize the entire input space in associated color, with each point. So this is the kind of
thing where you, you know, you have some function that's got a two-dimensional input, that would be f of x, y, and what we're looking
at is the x y plane, all of the input space, and this output's just some number, you know, maybe it's like x squared, this particular one is an x squared, but, you know that, and maybe some complicated thing, and the color tells you roughly the size of that output, and the lines here, called contour lines, tell you which inputs all
share a constant output value. And again, I'll go into
much more detail there. These are really nice,
much more convenient than three-dimensional graphs, to just sketch out. Moving right along, I'm also gonna talk about surfaces in three-dimensional space. They look like graphs, but they actually deal with
a much different animal, that you could think of it
as mapping two dimensions, and I like to sort of spoosh it about. And we've got kind of a
two-dimensional input, that somehow moves into three dimensions, and you're just looking at what the output of that looks like, not really caring about how it gets there. These are called parametric surfaces. Another fun one is a vector field, where every input point is associated with some kind of vector, which is the output of the function there. So this would be a function with a two-dimensional input and a two-dimensional output 'cause each of these are
two-dimensional vectors. And the fun part with these guys is that you can just kind of, imagine a fluid flowing, so here's a bunch of droplets, like water, and they kind of flow along that. And that actually turns
out to give insight about the underlying function. It's one of those beautiful aspects of multivariable calc. And we'll get lots of exposure to that. Again, I'm just sort of zipping through to whet your appetite. Don't worry if this doesn't
make sense immediately. And one of my all-time
favorite ways to think about multivariable functions is
to just take the input space, in this case, this is gonna
be a function that inputs points in two-dimensional space, and watch them move to their output, so, this is gonna be a
function that also outputs in two dimensions. And I'm just gonna
watch every single point move over to where it's supposed to go. These can be kind of
complicated to look at, or to think about at first, but as you gain a little bit of thought and exposure to them, they're actually very nice, and it provides a beautiful connection with linear algebra. A lot of you out there, if you're studying multivariable calculus, you either are about to
study linear algebra, or you just have, or maybe
you're doing it concurrently, but understanding functions
as transformations is gonna be a great way
to connect those two. So with that, I'll stop jabbering through
these topics really quickly and in the next few videos I'll actually go through them in detail and hopefully you can get a good feel for what multivariable functions
can actually feel like.