Functions of Several Variables

Multivariate Functions

In one-dimensional calculus, we studied functions that take a single real number as input and produce a single real number as output, i.e., functions of the form:

f:DRR,xf(x)f : D \subseteq \mathbb{R} \to \mathbb{R}, \quad x \mapsto f(x)

where we have a function ff that maps elements from a domain DD (a subset of the real numbers) to the real numbers. The notation xf(x)x \mapsto f(x) indicates that the function takes an input xx and produces an output f(x)f(x). Here, xx is a real number from the domain DD, and f(x)f(x) is the output of the function for that input.

In multivariate/multi-dimensional calculus, we extend this concept to functions that can take multiple inputs and produce multiple outputs, called multivariate functions or vector-valued functions.

A multivariate function takes a vector of nn inputs and produces a vector of mm outputs:

f:DRnRm,x=(x1xn)f(x)=(f1(x1,,xn)fm(x1,,xn))f : D \subseteq \mathbb{R}^n \to \mathbb{R}^m, \quad \mathbf{x} = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} \mapsto f(\mathbf{x}) = \begin{pmatrix} f_1(x_1, \ldots, x_n) \\ \vdots \\ f_m(x_1, \ldots, x_n) \end{pmatrix}

where x\mathbf{x} is a vector in Rn\mathbb{R}^n (the domain), and f(x)f(\mathbf{x}) is a vector in Rm\mathbb{R}^m (the codomain — not to be confused with the image, which is the subset of Rm\mathbb{R}^m actually reached by ff). Each component function fif_i maps the input vector x\mathbf{x} to a single real number, and together they form the output vector in Rm\mathbb{R}^m. The notation xf(x)\mathbf{x} \mapsto f(\mathbf{x}) indicates that the function takes an input vector x\mathbf{x} and produces an output vector f(x)f(\mathbf{x}).

The one-dimensional case is a special case of this more general framework, where n=m=1n = m = 1.

To distinguish between scalars and vectors, we will use boldface letters (e.g., x\mathbf{x}) to denote vectors, while regular letters (e.g., xx) will denote scalars. In handwriting, we will denote vectors by underlining the letter (e.g., x\underline{x}) to differentiate them from scalars.

As can be seen above with x\mathbf{x}, when we say “vector,” we mean a column vector, which is a common convention in mathematics. A column vector is a matrix with a single column and multiple rows, representing a point in multi-dimensional space.

Common Types of Multivariate Functions

We can define various types of multivariate functions based on the dimensions of their domain and codomain:

Curves

A spaghetti/noodle shape in 2D or 3D space. The input is a single parameter (e.g., time) that traces out a path in space.

n=1n = 1 and mNm \in \mathbb{N}

The symbol N\mathbb{N} stands for the natural (counting) numbers {1,2,3,}\{1, 2, 3, \ldots\}. This notation specifies that a curve is traced over a single input dimension (n=1n=1, representing time), but the resulting path can exist in a 1D, 2D, 3D, or any higher integer-dimensional space because the output dimension mm must be a solid counting number.

Plane curves (curves in 2D)

A plane curve takes a single real parameter tDt \in D and produces a point in 2D space, tracing a path through the plane as tt varies:

γ:DRR2(n=1, m=2)\gamma : D \subseteq \mathbb{R} \to \mathbb{R}^2 \quad (n = 1,\ m = 2)

γ:[0,2π]R2,γ(t)=(2costsint)\gamma: [0, 2\pi] \to \mathbb{R}^2, \quad \gamma(t) = \begin{pmatrix} 2\cos t \\ \sin t \end{pmatrix}

In the example above, the function γ\gamma takes a real number tt (which can be thought of as time) and maps it to a point in 2D space. The xx-coordinate is given by 2cost2\cos t and the yy-coordinate by sint\sin t. As tt varies from 00 to 2π2\pi, the point traces out a curve in the plane, which in this case is an ellipse.

Space curves (curves in 3D)

A space curve takes a single real parameter tDt \in D and produces a point in 3D space, tracing a path through three-dimensional space as tt varies:

γ:DRR3(n=1, m=3)\gamma : D \subseteq \mathbb{R} \to \mathbb{R}^3 \quad (n = 1,\ m = 3)

γ:[0,8π]R3,γ(t)=(e0.1tcoste0.1tsintt)\gamma: [0, 8\pi] \to \mathbb{R}^3, \quad \gamma(t) = \begin{pmatrix} e^{-0.1t}\cos t \\ e^{-0.1t}\sin t \\ t \end{pmatrix}

In the example above, cost\cos t and sint\sin t create circular motion in the xx-yy plane, while the exponential term e0.1te^{-0.1t} causes the radius of that circle to shrink over time — the spiral gets tighter and tighter. The zz-coordinate increases linearly with tt, so the curve also climbs upward as it spirals.

Surfaces

Surfaces are intrinsically two-dimensional objects that can be embedded in three-dimensional space. For example, the surface of a ball is itself a 2D area embedded in a 3D volume.

A parametric surface is defined by a map (u,v)DR3(u, v) \in D \mapsto \mathbb{R}^3 that takes two free parameters and produces a point in 3D space. As (u,v)(u, v) varies continuously over the domain DD, the output traces out a 2D surface embedded in 3D. Unlike an explicit surface z=f(x,y)z = f(x, y) — where the surface is directly the graph of a function — a parametric surface uses two auxiliary parameters with no inherent geometric meaning, which makes it possible to describe shapes like spheres or tori that cannot be expressed as a single function of xx and yy.

ϕ:DR2R3(n=2, m=3)\phi : D \subseteq \mathbb{R}^2 \to \mathbb{R}^3 \quad (n = 2,\ m = 3)

The two input parameters act like coordinates on the surface itself — by varying them over the domain DD, we trace out every point on the surface.

ϕ:[0,2π]×[0,2]R3,ϕ(u,v)=(cosusinuv)\phi: [0, 2\pi] \times [0, 2] \to \mathbb{R}^3, \quad \phi(u,v) = \begin{pmatrix} \cos u \\ \sin u \\ v \end{pmatrix}

In the example above, the function ϕ\phi takes two parameters uu and vv and maps them to a point in 3D space. The domain is given by the Cartesian product of the intervals [0,2π][0, 2\pi] and [0,2][0, 2]. This notation indicates a combination of all possible inputs: uu can be any real number from 00 to 2π2\pi and vv can independently be any real number from 00 to 22. Rather than representing just four corner points, this domain forms a solid, filled-in 2D rectangular “piece of paper.” The function then rolls this rectangle into a 3D cylinder. The circular cross-section is mapped out by cosu\cos u and sinu\sin u, creating a default unit radius of 1, making uu the angle parameter while the height of the cylinder is directly mapped from vv.

The radius of the cylinder is constant (equal to 1) in this example because cosu\cos u and sinu\sin u are bounded by 1 and not multiplied by any expanding factor. However, we can create more complex surfaces by allowing the radius to vary with uu and vv. For instance, in the next example, we have a surface where the radius changes based on the cosine of uu, creating a wavy pattern around the cylinder.

ϕ:[0,2π]×[0,2π]R3,ϕ(u,v)=((2+cosu)cosv(2+cosu)sinvsinu)\phi: [0, 2\pi] \times [0, 2\pi] \to \mathbb{R}^3, \quad \phi(u,v) = \begin{pmatrix} (2+\cos u)\cos v \\ (2+\cos u)\sin v \\ \sin u \end{pmatrix}

Scalar Fields

Assigns a single real number to each point in space. Intuitively, imagine walking around a room with a thermometer or a light meter: at every specific coordinate (x,y,z)(x, y, z) in the room, there is exactly one temperature or brightness value. Every point is mapped to a single scalar.

A scalar field assigns a single real number to each point in an nn-dimensional space:

f:DRnR(nN, m=1)f : D \subseteq \mathbb{R}^n \to \mathbb{R} \quad (n \in \mathbb{N},\ m = 1)

f:[4,4]×[5,5]R,f(x,y)=2(x2+y2)f: [-4,4] \times [-5,5] \to \mathbb{R}, \quad f(x,y) = 2(x^2+y^2)

f:R2R,f(x,y)=xyexp(x2+y2)f: \mathbb{R}^2 \to \mathbb{R}, \quad f(x,y) = xy\exp^{-(x^2+y^2)}

Vector Fields

Assigns a vector to each point in space. Intuitively, imagine holding a small wind-vane at every coordinate in a room to measure airflow. A single number isn’t enough; you need multiple numbers to describe both the speed and the direction of the wind. The function effectively attaches a directional arrow to every single point in that space.

A vector field assigns a vector to each point in space:

v:DRnRn(n=m, nN)\mathbf{v} : D \subseteq \mathbb{R}^n \to \mathbb{R}^n \quad (n = m,\ n \in \mathbb{N})

The strict requirement for vector fields is that the output must live in the exact same dimensionality space as the input (n=mn = m), meaning every point in the domain gets an arrow pointing somewhere within that same geometric space.

v:R2R2,v(x,y)=(yx)\mathbf{v}: \mathbb{R}^2 \to \mathbb{R}^2, \quad \mathbf{v}(x,y) = \begin{pmatrix} -y \\ x \end{pmatrix}

v:R3R3,v(x,y,z)=(zyx)\mathbf{v}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \mathbf{v}(x,y,z) = \begin{pmatrix} z \\ y \\ -x \end{pmatrix}

Topology in Higher Dimensions

The familiar notions of open, closed, and half-open intervals from 1D calculus — (a,b)(a,b), (a,b](a,b], [a,b)[a,b), [a,b][a,b] — generalize naturally to higher-dimensional spaces.

Complement of a Set

Let DRnD \subseteq \mathbb{R}^n be some domain. Its complement in Rn\mathbb{R}^n is

Dc=RnD.D^c = \mathbb{R}^n \setminus D.

Euclidean Norm

To state the remaining definitions precisely, we need two building blocks: the Euclidean norm and the notion of an ε\varepsilon-ball.

The Euclidean norm \|\cdot\| is the standard “ruler distance” — it measures the straight-line length (magnitude) from the origin to a coordinate point x=(x1,,xn)Rn\mathbf{x} = (x_1, \ldots, x_n)^\top \in \mathbb{R}^n:

(x1,,xn)=x12++xn2\|(x_1, \ldots, x_n)^\top\| = \sqrt{x_1^2 + \cdots + x_n^2}

In R2\mathbb{R}^2 this is just the Pythagorean theorem: the distance from the origin to the point (x1,x2)(x_1, x_2) is x12+x22\sqrt{x_1^2 + x_2^2}.

The ε-Ball

The ε\varepsilon-ball of radius ε>0\varepsilon > 0 centered at x0\mathbf{x}_0 is the set of all points within distance ε\varepsilon of x0\mathbf{x}_0:

Bε(x0)={xRnxx0<ε}B_\varepsilon(\mathbf{x}_0) = \{\, \mathbf{x} \in \mathbb{R}^n \mid \|\mathbf{x} - \mathbf{x}_0\| < \varepsilon \,\}

Think of an ε\varepsilon-ball as a “bubble” or a “safety zone” drawn around a specific center point. It is the higher-dimensional analogue of an open interval: in R1\mathbb{R}^1 it reduces to the line segment (x0ε,x0+ε)(x_0 - \varepsilon,\, x_0 + \varepsilon), in R2\mathbb{R}^2 it is a flat, filled-in circular disk, and in R3\mathbb{R}^3 it is a solid 3D sphere. Crucially, because the formula uses a strict inequality (<ε< \varepsilon, not ε\leq \varepsilon), the boundary or the “peel” of the ball (enclosing surface) is explicitly excluded. This missing peel is exactly what makes it an open ball.

Inner Points

A point x0D\mathbf{x}_0 \in D is called an inner point of DD if there exists some ε>0\varepsilon > 0 such that Bε(x0)DB_\varepsilon(\mathbf{x}_0) \subseteq D — that is, we can place an open ball around x0\mathbf{x}_0 that fits entirely within DD, without touching or crossing its boundary.

Because real number spaces are perfectly continuous and not constructed from fixed pixels, there is no such thing as a “closest point” to a boundary. If you pick a point near an excluded boundary, there is always a microscopic gap between your point and the edge. Therefore, you can always choose an ε\varepsilon small enough so that your ε\varepsilon-ball squeezes perfectly into that gap without spilling outside the domain.

Interior

The set of all inner points of DD is called the interior of DD, denoted D˚\mathring{D}.

Open Sets

A set DRnD \subseteq \mathbb{R}^n is called open if it equals its own interior: D=D˚D = \mathring{D}

In plain terms: every point in DD is an inner point. There are no “edge” points that belong to DD — every point inside has some breathing room, meaning you can move a little in any direction and still stay inside DD.

Boundary Points

A point x0Rn\mathbf{x}_0 \in \mathbb{R}^n is called a boundary point of DD if every open ball around it, no matter how small, contains points both inside and outside DD:

Bε(x0)DandBε(x0)Dcfor all ε>0.B_\varepsilon(\mathbf{x}_0) \cap D \neq \emptyset \quad \text{and} \quad B_\varepsilon(\mathbf{x}_0) \cap D^c \neq \emptyset \qquad \text{for all } \varepsilon > 0.

In other words, no matter how small we make ε\varepsilon, the ball Bε(x0)B_\varepsilon(\mathbf{x}_0) will always be partially inside and partially outside DD — we can shrink it as much as we want, and it will still cross the edge. This is possible because we are working in Rn\mathbb{R}^n: we can always zoom in further, there is no limit to how small a ball we can draw. No matter how close we look, x0\mathbf{x}_0 is always right on the edge, and therefore can never be an inner point.

Note that a boundary point need not belong to DD itself — it is simply a point that straddles (has one foot inside and one foot outside) the edge of DD, and may lie either inside or outside it.

In R\mathbb{R}, the open interval D=(0,1)D = (0, 1) is an open set. Take any point x(0,1)x \in (0, 1) — it sits somewhere strictly between 00 and 11, so it has some breathing room on both sides. Setting

ε=min(x, 1x)\varepsilon = \min(x,\ 1 - x)

picks the smaller of the two distances to the endpoints, guaranteeing that the ball Bε(x)=(xε, x+ε)B_\varepsilon(x) = (x - \varepsilon,\ x + \varepsilon) stays fully inside (0,1)(0, 1) without poking out either side. Since we can do this for every xDx \in D, every point is an inner point, confirming that DD is open.

The endpoints 00 and 11 are boundary points: any ball around them, no matter how small, reaches into (0,1)(0, 1) on one side and outside it on the other — they sit right on the edge. Note that neither 00 nor 11 belongs to DD, which is consistent with DD being open.

Boundary

The set of all boundary points of DD is called the boundary of DD, denoted D\partial D.

The boundary represents the outer geometric shell of a shape. It is often intuitively referred to as the “peel” or the “hull” (frequently used by German mathematicians translating the word Hülle).

Closure

The closure of DD is the set Dˉ=DD\bar{D} = D \cup \partial D — that is, DD together with all of its boundary points.

Conceptually, taking the closure is the mathematical command to take a domain DD and forcefully glue its entire peel back onto it. It “seals off” DD by including every point that sits on its edge, regardless of whether those points were originally in DD or not. If DD is already a closed set, its peel is already there, meaning the closure operation does absolutely nothing to it. If DD is open, the closure plugs the holes at the boundary.

Closed Sets

A set DRnD \subseteq \mathbb{R}^n is called closed if it contains all of its boundary points: DD\partial D \subseteq D, or equivalently, Dˉ=D\bar{D} = D.

A closed set is the complement of an open set — and conversely, an open set is the complement of a closed set. Note that “open” and “closed” are not opposites — they are independent properties a set may or may not have. A set can be:

  • both open and closed: Rn\mathbb{R}^n itself (no boundary at all) and \emptyset (vacuously satisfies both definitions),
  • neither open nor closed: the half-open interval [0,1)[0, 1) in R\mathbb{R} — it contains one boundary point (00) but not the other (11), so it fails both definitions.

The closed interval D=[0,1]D = [0, 1] in R\mathbb{R} is a closed set. Its boundary points are 00 and 11, and both belong to DD. Compare this with the open interval (0,1)(0, 1): same boundary {0,1}\{0, 1\}, but neither endpoint belongs to the set — so (0,1)(0, 1) is open, not closed.

Bounded Sets

A set DRnD \subseteq \mathbb{R}^n is called bounded if there exists some KRK \in \mathbb{R} such that x<K\|\mathbf{x}\| < K for all xD\mathbf{x} \in D.

Recall that x\|\mathbf{x}\| is the Euclidean distance from the origin to the point x\mathbf{x}. So boundedness simply says: every point in DD lies within distance KK of the origin — equivalently, DD fits entirely inside some ε\varepsilon-ball BK(0)B_K(\mathbf{0}) of finite radius.

Intuitively, a shape is bounded if you can construct a giant, finite box or cage that completely encloses it. No vector in DD can be “infinitely long” or shoot off to infinity in any direction. A set is unbounded if it escapes any cage you try to build around it, stretching off infinitely like a laser beam, a standard parabola, or the entire real line R\mathbb{R}.

Compact Sets

A set DRnD \subseteq \mathbb{R}^n is called compact if it is both closed and bounded.

Convex Sets

A set DRnD \subseteq \mathbb{R}^n is called convex if for any two points x,yD\mathbf{x}, \mathbf{y} \in D, the entire line segment connecting them also lies in DD:

x,yD: αx+(1α)yDfor all 0α1.\forall\, \mathbf{x}, \mathbf{y} \in D :\ \alpha\mathbf{x} + (1 - \alpha)\mathbf{y} \in D \qquad \text{for all } 0 \leq \alpha \leq 1.

The expression αx+(1α)y\alpha\mathbf{x} + (1 - \alpha)\mathbf{y} is called a convex combination of x\mathbf{x} and y\mathbf{y}. As the scalar α\alpha varies continuously from 11 to 00, this mathematical formula traces the straight line segment connecting the two points: at α=1\alpha = 1 you are exactly at x\mathbf{x}, at α=0\alpha = 0 you are at y\mathbf{y}, and at α=12\alpha = \tfrac{1}{2} you are precisely at the midpoint.

Convexity mathematically dictates that for any two points chosen inside DD, this entire connecting line segment must remain completely within DD. Intuitively, this can be visualized as a “line-of-sight” test: if a domain is convex, you can stand at any coordinate inside it, and a friend can stand at any other coordinate, and you will always have a direct, unobstructed line of sight to each other that never crosses outside the boundary. Consequently, a convex shape has no “dents”, “holes”, or “concave bays.”

A filled disk {xR2xr}\{\mathbf{x} \in \mathbb{R}^2 \mid \|\mathbf{x}\| \leq r\} is convex: any straight line between two points inside the disk stays inside the disk. A crescent moon, a donut shape, or an “L-shaped” room, on the other hand, is not convex — one can easily find two points within the shape whose connecting line segment passes through the empty space outside of it.

Continuity

Continuity on multi-dimensional domains is defined via the convergence of vector sequences.

Convergence of Vector Sequences

In Rn\mathbb{R}^n, we work with vector sequences of the form (x(k))kN0\left(\mathbf{x}^{(k)}\right)_{k \in \mathbb{N}_0}, where each element is a vector:

x(k)=(x1(k),,xn(k))Rnfor all kN0\mathbf{x}^{(k)} = (x_1^{(k)}, \ldots, x_n^{(k)})^\top \in \mathbb{R}^n \quad \text{for all } k \in \mathbb{N}_0

Convergence of a Vector Sequence

A sequence of vectors (x(k))kN0\left(\mathbf{x}^{(k)}\right)_{k \in \mathbb{N}_0} converges to the limit vector x\mathbf{x} if the distance between x(k)\mathbf{x}^{(k)} and x\mathbf{x} vanishes as kk \to \infty:

limkx(k)x=0\lim_{k \to \infty} \| \mathbf{x}^{(k)} - \mathbf{x} \| = 0

In other words, a vector sequence (x(k))\left(\mathbf{x}^{(k)}\right) converges to x\mathbf{x} if and only if the real-valued sequence of distances x(k)x\| \mathbf{x}^{(k)} - \mathbf{x} \| converges to zero — reducing vector convergence to the familiar notion of scalar convergence.

We can express this convergence in several ways depending on how formal the context requires. The following are all equivalent ways to write the exact same limit behavior:

x(k)kxx(k)xlimkx(k)=x\mathbf{x}^{(k)} \xrightarrow{k \to \infty} \mathbf{x} \qquad \mathbf{x}^{(k)} \to \mathbf{x} \qquad \lim_{k \to \infty} \mathbf{x}^{(k)} = \mathbf{x}

The first notation is explicit, detailing precisely what variable is moving to infinity. The second is a common shorthand adopted when kk \to \infty is mathematically obvious from the context. The third is the classic, highly formal algebraic limit notation.

Convergence of a vector sequence is equivalent to convergence of all its components simultaneously — none of them can diverge. Formally:

x(k)=(x1(k)xn(k))x=(x1xn)    x1(k)x1,,xn(k)xn\mathbf{x}^{(k)} = \begin{pmatrix} x_1^{(k)} \\ \vdots \\ x_n^{(k)} \end{pmatrix} \to \mathbf{x} = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} \iff x_1^{(k)} \to x_1, \ldots, x_n^{(k)} \to x_n

Continuity of Vector Functions

Given a vector function f:DRnRmf : D \subseteq \mathbb{R}^n \to \mathbb{R}^m, we say that ff is:

  • continuous at aD\mathbf{a} \in D if, for every sequence (x(k))kN0\left(\mathbf{x}^{(k)}\right)_{k \in \mathbb{N}_0} in DD with x(k)a\mathbf{x}^{(k)} \to \mathbf{a}, the corresponding output sequence (f(x(k)))kN0\left(f\left(\mathbf{x}^{(k)}\right)\right)_{k \in \mathbb{N}_0} in Rm\mathbb{R}^m converges to f(a)f(\mathbf{a}). In short, there is no “teleporting” allowed. As the input smoothly approaches a specific destination a\mathbf{a}, the output must smoothly approach the actual output at that destination f(a)f(\mathbf{a}) without sudden jumps or glitches.

  • continuous on DD if it is continuous at every point aD\mathbf{a} \in D.

Continuity in multi-dimensional spaces is equivalent to componentwise continuity. A vector function

f:DRnRm,(x1xn)(f1(x1,,xn)fm(x1,,xn))f : D \subseteq \mathbb{R}^n \to \mathbb{R}^m, \quad \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} \mapsto \begin{pmatrix} f_1(x_1, \ldots, x_n) \\ \vdots \\ f_m(x_1, \ldots, x_n) \end{pmatrix}

is effectively a stack of scalar fields. ff is continuous at a\mathbf{a} or on DD if and only if each individual component scalar field

fi:DR,(x1,,xn)fi(x1,,xn),i{1,,m}f_i : D \to \mathbb{R}, \quad (x_1, \ldots, x_n)^\top \mapsto f_i(x_1, \ldots, x_n), \quad i \in \{1, \ldots, m\}

is properly continuous at a\mathbf{a} or on DD. Think of a drone flying through the air: for the drone’s overall 3D trajectory to be continuous, its left/right movement, its forward/backward movement, and its up/down movement must all be perfectly continuous. If even a single component teleports, the whole trajectory breaks.

The standard continuity-preservation rules from 1D carry over directly to multi-dimensional functions. If f(x)f(\mathbf{x}) and g(x)g(\mathbf{x}) are continuous on DD, so are all functions built from them via the usual operations.

Suppose f(x)f(\mathbf{x}) and g(x)g(\mathbf{x}) are continuous on DD. Then the following composite operations produce new functions that are also continuous on DD:

  • Linear combination: 5f(x)2g(x)5f(\mathbf{x}) - 2g(\mathbf{x})
  • Product: f(x)g(x)f(\mathbf{x})\, g(\mathbf{x})
  • Composition: f(g(x))f(g(\mathbf{x}))
  • Division: f(x)g(x)\dfrac{f(\mathbf{x})}{g(\mathbf{x})}

For division, there is one strict condition: the divisor function on the bottom must be non-zero (g(x)0g(\mathbf{x}) \neq 0) for all xD\mathbf{x} \in D. If the denominator hits exactly zero at any point, the fraction explodes to infinity, generating a mathematical hole or vertical jump that immediately destroys the function’s continuity.