# Functions of Several Variables

So far, we have looked at *functions* of only a single variable. Recall that a function of one variable, $f$, is a rule that assigns every value $x \in D(f)$ to a unique value $f(x) \in R(f)$. We will now construct an analogous definition for a function of more than one variable.

Definition: A Real-Valued Function of Two Variables denoted $z = f(x, y)$ is a rule that assigns to each point $(x, y) \in D(f)$ a unique real number $f(x, y) \in R(f)$. The Domain of $f$ denoted $D(f)$ is the set of points $(x, y)$ for which $f$ is defined. The Range of $f$ denoted $R(f)$ is the set defined as $R(f) = \{ f(x, y) : (x, y) \in D(f) \}$. |

In general, a real-valued function of $2$ variables will produce a two-dimensional object in $\mathbb{R}^3$. For example, consider the function $f(x, y) = x + y$ which represents the plane $z = x + y$ in $\mathbb{R}^3$. The graph of $f(x, y)$ is shown below:

We did not specify any restrictions on $x$ or $y$, and so the domain is $D(f) = \{ (x, y) \in \mathbb{R}^2 : x, y \in \mathbb{R} \} = \mathbb{R}^2$. Furthermore, we know that the plane $z = x + y$ has a normal vector $\vec{n} = (1, 1, -1)$ and so this plane is not parallel to the $xy$-plane, and so $R(f) = \mathbb{R}^2$.

Of course, real-valued functions of two variables can be much more complex. For example, $f(x, y) = x^2y - y^2x$, $g(x, y)\sqrt{x} + y \cos (xy)$, and $h(x, y) = e^{xy} - \frac{2x}{y}$ are all real-valued functions of two variables.

We will now define a real-valued functions of three variables.

Definition: A Real-Valued Function of Three Variables denoted $w = f(x, y, z)$ is a rule that assigns to each point $(x, y, z) \in D(f)$ a unique real number $f(x, y, z) \in R(f)$. The Domain of $f$ denoted $D(f)$ is the set of points $(x, y, z)$ for which $f$ is defined. The Range of $f$ denoted $R(f)$ is the set defined as $R(f) = \{ f(x, y, z) : (x, y, z) \in D(f) \}$. |

In general, a function of $3$ variables will produce a three-dimensional object in $\mathbb{R}^4$. We will not attempt to produce most graphs of $3$ variables as their complexity is extremely difficult as four-dimensional space is difficult to visualize.

Some examples of real-valued functions of three variables are $f(x, y, z) = x^2y + 2y - z$, $g(x, y, z) = \cos x \sin y + 2z$, and $h(x, y, z) = e^{x + yz} - 2y \ln z$.

Of course, we can also define real-valued functions with more than $3$ variables in an analogous manner, however, most of the rest of the work we will do in the Calculus Section of Math Online will pertain to real-valued functions of $2$ or $3$ variables.