0.3. Functionsof several variables

$\newcommand{\R}{\mathbb R }$

How to visualize functions of several variables

How to visualize functions of $2$ variables

There are two main ways to picture a function $f:\R^2\to \R$:

  1. By its graph, that is, $$ \{ (x,y,z)\in \R^3 : z = f(x,y)\} $$ This is a two-dimensional surface in a $3$-dimensional space, whose ``height" $z$ over the the $xy$-plane at a point $(x,y)$ is the value $f(x,y)$ of the function at that point. Some examples can be found below.

  2. By its level curves. In general, a level curve (sometimes also called ``level set") of $f:\R^2\to \R$ is a set of the form $$ \{ (x,y)\in \R^2 : f(x,y) = c\} \qquad\mbox{ for some }c\in \R. $$ If we wish, we can plot level curves in the $xy$-plane corresponding to a large number of different valu/es of $c$. Normally these values of $c$ are chosen to be evenly spaced, for example $c = -1, -.5, 0, .5, 1, ..., 5$; then the distance between adjacent curves near a point provides useful information about how the rate of change of the function near that point. (curves close together $=$ function changes rapidly)

An advantage of level curves, compared to graphs, is that one often has to be a good artist to draw an accurate picture of the graph of a function, whereas drawing level curves requires no artistic talent.

drawing

above: graph of the function $f(x,y)= \frac 19 x^2 + \frac 14 y^2$

drawing

above: level curves of the same function

drawing

above: graph of the function $f(x,y) = \frac 19 x^2 - \frac 14 y^2$.

drawing

above: level curves of the same function.

We will probably never ask you to draw graphs of functions of two variables, and we will rarely if ever ask you to plot level curves. But you should be able to look at the pictures and understand what the function looks like. One way to practice this skill is to match graphs with level curves in the image below.

drawing

How to visualize functions of $3$ variables

For a function $f:\R^3\to \R$, we can still define the graph $$ \{ (x, y, z, w) \in \R^4 : w = f(x,y,z) \} $$ For most humans, however, it is very hard to form a mental picture of this object, which is a (typically curvy) $3$-dimensional thing sitting inside a $4$-dimensional space.

We can also still define the analog of level sets of a function $f:\R^3\to \R$. These are sets of the form $$ \{ (x,y,z)\in \R^3 : f(x,y,z) = c \} $$ for different choices of $c$. (They are also sometimes called ``level surfaces".) These are still possible to visualize, or to plot with a decent graphics program. Here are some examples:

drawing

drawing

drawing

Above: for $f(x,y,z)= \frac 19 x^2 - \frac 14 y^2 + \frac 19 z^2$, the level surfaces corresponding to $c=-2, 0, 2$ (from top to bottom).

drawing

Above: One can also assemble a number of level surfaces into a single image. Here are several level surfaces of $f(x,y,z)= \frac 19 x^2 - \frac 14 y^2 + \frac 19 z^2$.

drawing

One can picture the level surfaces of a function $f:\R^3\to \R$ as being like the layers of an onion.

How to visualize functions of $4$ or more variables

For functions $f:\R^n\to \R$, we can always define the graph $$ \{ (x_1,\ldots, x_{n+1}) \in \R^{n+1} : x_{n+1} = f(x_1,\ldots, x_n) \} $$ and the level sets $$ \{ (x_1,\ldots, x_{n}) \in \R^{n} :f(x_1,\ldots, x_n) = c \} $$ but it is very hard for most human beings to draw an accurate picture or to form a good mental image of either of these, when $n\ge 4$.

$\Leftarrow$  $\Uparrow$  $\Rightarrow$