1. What Is a Function of Several Variables?
A function of two variables $z = f(x,y)$ is a rule that assigns each ordered pair $(x,y)$ in a subset $D \subseteq \mathbb{R}^2$ to a unique real number $z$.
$$ f : D \subseteq \mathbb{R}^2 \longrightarrow \mathbb{R}, \qquad (x,y) \mapsto z = f(x,y) $$The set $D$ is the domain; the set of all outputs $\{f(x,y) : (x,y) \in D\}$ is the range.
A function of three variables $w = f(x,y,z)$ assigns each ordered triple $(x,y,z)$ in $D \subseteq \mathbb{R}^3$ to a unique real number $w$.
$$ f : D \subseteq \mathbb{R}^3 \longrightarrow \mathbb{R}, \qquad (x,y,z) \mapsto w = f(x,y,z) $$More generally, a function of $n$ variables takes an $n$-tuple $(x_1, x_2, \ldots, x_n)$ as input. The same three demands apply every time: domain (where is the function defined?), rule (how is the output computed?), uniqueness (each input gives exactly one output).
Notation and Evaluation
| Variables | Notation | Example | Evaluation at a point |
|---|---|---|---|
| Two | $z = f(x,y)$ | $f(x,y) = x^2 + 3xy - y^2$ | $f(1,2) = 1 + 6 - 4 = 3$ |
| Three | $w = g(x,y,z)$ | $g(x,y,z) = x^2 + y^2 + z^2$ | $g(1,2,3) = 1+4+9 = 14$ |
| $n$ | $u = h(x_1,\ldots,x_n)$ | $h(x_1,x_2,x_3,x_4) = x_1 x_2 + x_3 x_4$ | $h(1,2,3,4) = 2+12 = 14$ |
Where Do Such Functions Come From?
🌡️ Temperature
$T(x,y)$ = temperature at position $(x,y)$ on a metal plate. Each point on the plate has exactly one temperature — a function of two variables.
💰 Cost
$C(x,y) = 40x + 25y + 500$, where $x$ = hours of labor and $y$ = units of material. Two inputs, one cost output.
📏 Distance
$d(x,y,z) = \sqrt{x^2 + y^2 + z^2}$, the distance from the origin to the point $(x,y,z)$. Three inputs, one output.