Skip to main content

Section 8.4 Multivariable Functions

Subsection 8.4.1 Definitions

First year calculus dealt with functions \(\RR \rightarrow \RR\text{.}\) Parametric curves dealt with functions \(\RR \rightarrow \RR^n\text{.}\) Multivariable functions are functions \(\RR^n \rightarrow \RR^m\text{.}\) They having an arbitrary number of inputs and outputs. We can distinguish between two main categories, classified by output.

Definition 8.4.1.

A scalar function of scalar field is a function \(f: \RR^n \rightarrow \RR\text{.}\)

Definition 8.4.2.

A vector function or vector field is a function \(f: \RR^n \rightarrow \RR^m\) for \(m > 1\text{.}\)

Vector functions are the most difficult and complicated, since they have both multiple inputs and multiple outputs. The study of vector functions is the major topic of Calculus IV. For the remainder of these notes, we will restrict our attention to scalar functions.

There are many familiar scalar functions. The potential energy due to gravity on an object with mass \(m\) and height \(h\) above the surface of the earth is \(PE = mgh\) is a two variable function. In a circuit, voltage in terms of current and reisistance is \(V = IR\) is another two variable function. The force of gravity between two celestial object \(F = -MmG/r^2\) is a three-variable functions which depends on both masses, \(M\) and \(m\text{,}\) as well as the distance between them \(r\text{.}\) Any quantity which can vary in three dimensional space, such a pressure, temperature, humidity, is a functions of the three variables of location \((x,y,z)\text{.}\)

Here are some explicit functions \(\RR^2 \rightarrow \RR\text{.}\)

\begin{align*} f_1(x,y) \amp = x-y\\ f_2(x,y) \amp = \sin (xy)\\ f_3(x,y) \amp = \frac{1}{2} x^y\\ f_4(x,y) \amp = x^2 + y^2 - xy\\ f_5(x,y) \amp = \sqrt{x} + \sqrt{y}\\ f_6(x,y) \amp = \sqrt{4 - x^2 -y^2} \end{align*}

Any other algebraic expression in \(x\) and \(y\) would also define a function \(\RR^2 \rightarrow \RR\text{.}\)

Definition 8.4.5.

The domain of a scalar function \(f: \RR^n \rightarrow \RR\) is the subset of \(\RR^n\) where the function can be defined.

Domain has the same kind of restrictions as for single-variable functions: no division by zero, no negative even roots, no negative logarithms, etc. However, now that the domain restrictions may apply to any of the input variables. The domains themselves may be very complicated subsets of \(\RR^n\text{.}\)

Let's look at the domains of the five explicitly stated functions in the Example 8.4.4

  • \(f_1\) and \(f_4\) are polynomials (in two variables), so there are no restrictions. Their domain is \(\RR^2\text{.}\)

  • \(f_2\) is a sine function, which again imposes no restrictions, so it also has domain \(\RR^2\text{.}\)

  • \(f_5\) has two square roots, one involving \(x\) and one involving \(y\text{.}\) Therefore, we need \(x\geq 0\) and \(y \geq 0\) to defined \(f_5\text{.}\) That domain is the positive \(x\) and \(y\) quadrant, including the origin and the positive pieces of both axes.

  • \(f_6\) also has a square root. To ensure that the square root has a positive argument, we need \(4 - x^2 - y^2 \geq 0\text{,}\) or \(x^2 + y^2 \leq 4\text{.}\) This domain is a a circular disc of radius \(2\text{,}\) including its boundary.

  • Lastly, \(f_3\text{,}\) has an strange exponential. This leads to very strange domain behaviour. If \(y\) is an integer, \(x\) can be any non-zero real number. If \(y\) is a fraction, \(x\) must be positive is the denominator of \(y\) is even, to avoid square roots of negative numbers. If \(y\) is irrational, \(x\) must be positive. This all leads to a very complicated domain in \(\RR^2\text{.}\)

Subsection 8.4.2 Geometry and Graphs of Functions

The graph of a single variable \(f: \RR \rightarrow \RR\) was a curve in \(\RR^2\) where one axis was input and one axis was output. The idea generalizes, so a graph has to show both the inputs and output.

Definition 8.4.7.

Let \(A \subset \RR^n\) be the domain of a scalar function \(f: A \rightarrow \RR\text{.}\) The graph of the scalar function is the subset of \(\RR^{n+1}\) consisting of all point \((x_1, x_2, \ldots, x_n, f(x_1, x_2, \ldots, x_n))\) for \((x_1, x_2, \ldots x_n) \in A\text{.}\)

Since we have to show input and outputs, the graph need many dimensions. If \(n \geq 3\text{,}\) then the graph is in \(\RR^4\) or a higher dimensional space. We can only actually see graphs of scalar function on \(\RR^2\text{.}\)

The \(\RR^2\) case is useful to understand the general situation. In this case, \(x\) and \(y\) are in input (domain) and \(z\) is the output (range). We can think of the graph as a height function: over some point \((x,y)\) in the domain of \(f\text{,}\) the graph sits at some height \(z = f(x,y)\text{.}\)

Figure 8.4.8. The graph of \(f(x,y) = \frac{5}{x^2 + y^2 + 1}\)

We used graphs extensively in single-variable calculus to understand derivatives and integrals: derivative were slopes of tangent lines and integrals were area under curves. We want to generalize this to the new higher-dimensional graphs. For functions \(f:\RR^2 \rightarrow \RR\text{,}\) it's not too difficult to extend the notions. Instead of tangent line, we now have tangent planes. Instead of area under the curve, we have volume under the surface. For \(f: \RR^n \rightarrow \RR\text{,}\) we have tangent n-spaces and (n+1)-hyper-volume under the n-dimensions graph surface.

Subsection 8.4.3 Contour Plots

As an alternative to conventional graphs of function, a nice way to visualize height functions is as topological maps. We refer to these visualizations as contour plots.

Definition 8.4.9.

Let \(f: A \rightarrow \RR\) be a scalar function for a domain \(A \subset \RR^2\text{.}\) A contour plot for \(f\) is a plot of curves in \(\RR^2\) where each curve is a locus of the form \(f(x,y) = c\) for some constant \(c\text{.}\)

A contour plot has a series of implicit curves at constant elevation; the constants \(c\) are the elevation. It shows curves where the function takes a specific value. By looking at the relationships of the curves, we can intuit how the function behaves.

Consider \(f(x,y) = \frac{5}{x^2+y^2+1}\text{.}\) It's graph is Figure 8.4.8. This function has a simple hill at the origin and slopes down in all direction. The contours are loci of the form \(\frac{5}{x^2 + y^2 + 1} = c\text{,}\) which can be rearranged as \(\frac{5}{c} - 1 = x^2 + y^2\text{.}\) These contours are all circles, and are shown in Figure 8.4.11.

Figure 8.4.11. The circular contours of \(f(x,y) = \frac{5}{x^2 + y^2 + 1}\)
Figure 8.4.13. The contours of a saddle point

These contour plots lead us to a general definition.

Definition 8.4.14.

Let \(f: \RR^n \rightarrow \RR\) be a scalar function. A level set for \(f\) is a subset of \(\RR^n\) given by the equation \(f(x_1, x_2, \ldots, x_n) = c\) for some \(c \in \RR\text{.}\)

Then a contour plot is just a drawing of a variety of level sets of a function \(\RR^2 \rightarrow \RR\text{.}\) It is useful to see where a function is constant. The resulting shapes tell us a great deal about the behaviour of the function. Level sets for \(f: \RR^3 \rightarrow \RR\) are called level surfaces.