The Central Idea
A single-variable function takes one input and returns one output:
\[ y=f(x). \]A function of several variables takes several inputs together and returns an output. For two inputs, we often write
\[ \boxed{z=f(x,y)}. \]The ordered pair \((x,y)\) acts as one complete input to the function, and \(z\) is the resulting output.
From One Input to Several Inputs
In elementary algebra, a function such as
\[ f(x)=x^2+1 \]receives one number at a time. For example,
\[ f(3)=3^2+1=10. \]A two-variable function might be
\[ f(x,y)=x^2+y^2. \]Now both coordinates must be supplied before the output can be determined.
Evaluating a Function of Two Variables
Suppose
\[ f(x,y)=x^2+3y. \]To evaluate \(f(2,5)\), substitute \(x=2\) and \(y=5\):
\[ f(2,5)=2^2+3(5)=4+15=19. \]Therefore,
\[ \boxed{f(2,5)=19}. \]The Order of the Inputs Matters
The notation \(f(x,y)\) uses an ordered pair. The first coordinate replaces \(x\), and the second replaces \(y\).
For
\[ f(x,y)=x-2y, \]we have
\[ f(3,1)=3-2(1)=1, \]while
\[ f(1,3)=1-2(3)=-5. \]In general,
\[ \boxed{f(x,y)\neq f(y,x)}. \]Equality occurs only when the particular function has enough symmetry to make the interchange irrelevant.
Several Inputs Still Form One Function Input
It is useful to think of the entire ordered tuple as the input object.
For a two-variable function,
\[ (x,y)\longmapsto f(x,y). \]For a three-variable function,
\[ (x,y,z)\longmapsto f(x,y,z). \]The number of coordinates increases, but the function rule still assigns each allowed input object exactly one output.
A Function Is Still a Mapping
The fundamental definition of a function does not change. A function assigns each allowed input exactly one output.
In multivariable notation, we may write
\[ f:D\to \mathbb{R}, \]where \(D\) is a set of allowed ordered pairs, triples, or higher-dimensional input vectors.
If \(D\subseteq\mathbb{R}^2\), then \(f\) is a real-valued function of two real variables.
Common Notation
Functions of several variables appear in several equivalent forms.
- \(z=f(x,y)\)
- \(w=g(x,y,z)\)
- \(T=T(x,y,z)\)
- \(P=P(q,p)\)
- \(f(\mathbf{x})\), where \(\mathbf{x}\) is an input vector
The letters themselves are not important. What matters is which symbols are treated as inputs and which quantity is produced as the output.
Example: A Three-Variable Function
Let
\[ g(x,y,z)=2x-y+z^2. \]Evaluate \(g(1,4,3)\):
\[ g(1,4,3)=2(1)-4+3^2. \] \[ =2-4+9=7. \]Therefore,
\[ \boxed{g(1,4,3)=7}. \]Independent and Dependent Quantities
In a model such as
\[ z=f(x,y), \]the variables \(x\) and \(y\) are typically treated as independent inputs, while \(z\) is the dependent output.
This language describes the structure of the model. It does not necessarily mean that the real-world quantities represented by \(x\) and \(y\) are statistically independent or physically unrelated.
Example: Area as a Function of Two Variables
The area of a rectangle depends on its length and width.
\[ A(\ell,w)=\ell w. \]If \(\ell=8\) and \(w=3\), then
\[ A(8,3)=8\cdot3=24. \]Here the area is one output generated by two geometric inputs.
Example: Volume as a Function of Three Variables
The volume of a rectangular box depends on length, width, and height:
\[ V(\ell,w,h)=\ell wh. \]For a box with dimensions \(5\), \(4\), and \(3\),
\[ V(5,4,3)=5\cdot4\cdot3=60. \]This is a simple example of a function on three-dimensional input space.
Example: Temperature in Space
Temperature can vary from point to point in a room. A model might write
\[ T=T(x,y,z). \]Each spatial location \((x,y,z)\) is assigned one temperature value.
If temperature also changes over time, then the model may use four inputs:
\[ T=T(x,y,z,t). \]Multivariable notation allows additional dependencies to be represented without changing the basic input-output idea.
Example: Profit with Several Inputs
A firm's profit may depend on several operational quantities. In a simple two-input model, suppose profit depends on unit price \(p\) and quantity sold \(q\):
\[ \Pi(p,q)=pq-C(q), \]where \(C(q)\) is the cost of producing and selling \(q\) units.
More elaborate models may include labor, advertising, material prices, capacity, taxes, or other variables as additional inputs.
Input Space
For a function of one real variable, inputs lie on a number line.
For a function of two real variables, inputs are points in a plane:
\[ (x,y)\in\mathbb{R}^2. \]For three real variables, inputs are points in space:
\[ (x,y,z)\in\mathbb{R}^3. \]With \(n\) real inputs, the natural input space is \(\mathbb{R}^n\).
Why Higher Dimensions Are Not a New Kind of Arithmetic
A formula such as
\[ f(x_1,x_2,x_3,x_4)=x_1+2x_2-x_3x_4 \]may look more complicated because it has four inputs, but evaluation still uses ordinary arithmetic and substitution.
At \((1,3,2,5)\),
\[ f(1,3,2,5)=1+2(3)-2(5)=1+6-10=-3. \]The conceptual change is dimensional, not arithmetical.
Tables of Multivariable Values
A two-variable function can be represented by a table whose rows correspond to values of one input and whose columns correspond to values of the other.
For
\[ f(x,y)=x+y, \]selected values are
| \(x\backslash y\) | 0 | 1 | 2 |
|---|---|---|---|
| 0 | 0 | 1 | 2 |
| 1 | 1 | 2 | 3 |
| 2 | 2 | 3 | 4 |
Every cell corresponds to one ordered-pair input.
The Graph of a Two-Variable Function
For a single-variable function \(y=f(x)\), the graph usually lies in the \(xy\)-plane.
For a two-variable function
\[ z=f(x,y), \]the graph consists of points
\[ \boxed{(x,y,f(x,y))}. \]Because two coordinates are needed for the input and a third coordinate is needed for the output, the graph naturally lives in three-dimensional space.
Example: A Plane
Consider
\[ f(x,y)=2x-y+3. \]Its graph is
\[ z=2x-y+3. \]This graph is a plane. For example, when \((x,y)=(1,2)\),
\[ z=2(1)-2+3=3, \]so the point \((1,2,3)\) lies on the graph.
Example: A Curved Surface
Consider
\[ f(x,y)=x^2+y^2. \]Its graph is
\[ z=x^2+y^2. \]The output is smallest at \((0,0)\) and increases as the input point moves farther from the origin. The graph is a bowl-shaped surface called a paraboloid.
A Graph Is Not the Same Thing as the Domain
For \(z=f(x,y)\), the domain consists of allowable input points \((x,y)\). The graph consists of three-dimensional points \((x,y,z)\) satisfying
\[ z=f(x,y). \]Keeping input space and graph space separate prevents a common source of confusion in multivariable work.
Fixing One Variable
One of the most useful ways to understand a multivariable function is to hold one input constant and let another vary.
For
\[ f(x,y)=x^2+y^2, \]fixing \(y=2\) gives
\[ f(x,2)=x^2+4. \]This is now an ordinary single-variable function of \(x\).
Slices Through a Surface
Fixing one variable produces a cross-section, or slice, of the surface.
For
\[ z=x^2+y^2, \]the slice \(y=c\) becomes
\[ z=x^2+c^2. \]Different constants \(c\) produce different parabolic slices. Slicing turns a higher-dimensional object into a family of familiar lower-dimensional objects.
Fixing the Output
We can also hold the output constant. For
\[ f(x,y)=x^2+y^2, \]requiring the output to equal \(c\) gives
\[ x^2+y^2=c. \]These sets of input points are called level sets. They will be developed systematically in the next lesson.
Formula, Table, Graph, and Verbal Description
Just as in single-variable mathematics, a multivariable function may be represented in several ways:
- a formula;
- a table or data array;
- a graph or surface;
- level sets or contour maps;
- a verbal rule;
- a computer algorithm or simulation.
The representation changes, but the underlying function remains an input-output relationship.
Not Every Function Has a Simple Formula
A function of several variables may be defined by measured data, a lookup table, a simulation, a numerical procedure, or a piecewise rule rather than by a single symbolic expression.
For example, an engineering program may accept pressure, temperature, and composition as inputs and return a computed material property. That process can define a function even when no short closed-form formula is available.
Parameters Versus Variables
Consider the family
\[ f(x,y)=ax+by+c. \]If \(a\), \(b\), and \(c\) are fixed for the current problem, they are parameters, while \(x\) and \(y\) are the varying inputs.
A symbol's role depends on the model. A parameter in one analysis can become a variable in another.
Composite Dependence
Sometimes the inputs of one function are themselves functions of another variable. Suppose
\[ z=f(x,y), \]while
\[ x=x(t),\qquad y=y(t). \]Then the output can be viewed as
\[ z(t)=f(x(t),y(t)). \]This nested dependence becomes important later when studying rates of change along paths through multivariable input space.
Vector Notation for Many Inputs
When the number of inputs becomes large, writing every variable separately can become cumbersome. We may collect them into a vector
\[ \mathbf{x}=(x_1,x_2,\ldots,x_n) \]and write
\[ \boxed{f(\mathbf{x})=f(x_1,x_2,\ldots,x_n)}. \]This notation is standard in optimization, statistics, machine learning, engineering, economics, and higher-dimensional modeling.
Scalar-Valued and Vector-Valued Outputs
This lesson focuses mainly on functions that return one numerical output, such as
\[ f:\mathbb{R}^n\to\mathbb{R}. \]Functions can also return several outputs at once:
\[ \mathbf{F}:\mathbb{R}^n\to\mathbb{R}^m. \]Those vector-valued relationships will receive dedicated treatment later in this section.
Multivariable Functions and Modeling
Real systems rarely respond to only one factor. A useful model often asks how an output changes when several inputs vary simultaneously.
Examples include:
- crop yield as a function of rainfall, temperature, and fertilizer;
- travel time as a function of distance, speed, and congestion;
- energy use as a function of building size, weather, and occupancy;
- portfolio value as a function of several asset prices;
- manufacturing output as a function of labor and capital.
Multivariable mathematics provides the language needed to separate, compare, and combine these effects.
Changing One Input at a Time
Suppose
\[ f(x,y)=3x+2y. \]Starting at \((1,4)\), the output is
\[ f(1,4)=3+8=11. \]If \(x\) changes to \(2\) while \(y\) remains \(4\), then
\[ f(2,4)=6+8=14. \]If instead \(y\) changes to \(5\) while \(x\) remains \(1\), then
\[ f(1,5)=3+10=13. \]Later, partial derivatives formalize this idea of varying one input while temporarily holding the others fixed.
Changing Several Inputs Together
Multivariable systems also allow several inputs to change at the same time. For
\[ f(x,y)=3x+2y, \]moving from \((1,4)\) to \((2,5)\) changes the output from
\[ 11 \]to
\[ 16. \]The total change reflects contributions from both input directions. Later lessons will develop directional derivatives, gradients, and linear approximation to analyze such changes efficiently.
Common Error: Supplying Too Few Inputs
If
\[ f(x,y)=x^2+y, \]then writing \(f(3)\) does not provide enough information unless some separate convention has already fixed the value of \(y\).
A two-variable function normally requires an ordered pair as its input.
Common Error: Forgetting Which Coordinate Is Which
Suppose
\[ f(x,y)=x+4y. \]Then
\[ f(2,3)=2+4(3)=14, \]not \(3+4(2)=11\). The coordinates must be substituted in the order in which the variables are written.
Common Error: Treating the Comma as Multiplication
The notation
\[ f(2,5) \]does not mean \(f(10)\). The comma separates coordinates of the input tuple. It is not a multiplication symbol.
Common Error: Confusing Inputs with the Graph Coordinates
For
\[ z=f(x,y), \]the input is \((x,y)\), but a point on the graph is
\[ (x,y,f(x,y)). \]The graph adds the function value as an additional coordinate.
Common Error: Assuming Every Pair of Real Numbers Is Allowed
A formula may impose restrictions. For example,
\[ f(x,y)=\sqrt{9-x^2-y^2} \]is real-valued only when the expression under the radical is nonnegative.
Determining all allowable inputs is a domain problem. The next lesson will treat domains, ranges, and level sets systematically.
A Reliable Evaluation Procedure
- Identify the input variables and their order.
- Write the requested input tuple clearly.
- Substitute each coordinate into its matching variable.
- Use parentheses around substituted values when signs or powers matter.
- Evaluate using the ordinary order of operations.
- Check whether the input satisfies any restrictions in the formula.
- State the resulting function value.
Example: Full Evaluation Workflow
Let
\[ F(x,y,z)=x^2-2yz+3z. \]Evaluate \(F(-2,4,-1)\).
Substitute carefully:
\[ F(-2,4,-1)=(-2)^2-2(4)(-1)+3(-1). \]Compute each contribution:
\[ 4+8-3=9. \]Therefore,
\[ \boxed{F(-2,4,-1)=9}. \]Example: A Model with Units
Suppose the cost of shipping a rectangular package is modeled by
\[ C(\ell,w,h)=0.02\ell wh+5, \]where \(\ell\), \(w\), and \(h\) are measured in centimeters and \(C\) is measured in dollars.
For \((\ell,w,h)=(20,10,5)\),
\[ C(20,10,5)=0.02(20)(10)(5)+5. \] \[ =20+5=25. \]The function notation records both the mathematical dependency and the role of each measured quantity.
Practice 1: Evaluate a Two-Variable Function
Let
\[ f(x,y)=2x^2-3y. \]Find \(f(3,4)\).
Practice 2: Input Order
Let
\[ g(x,y)=5x-y. \]Find both \(g(2,7)\) and \(g(7,2)\).
Practice 3: Three Variables
Let
\[ h(x,y,z)=xy+z^2. \]Find \(h(-2,3,4)\).
Practice 4: Fix One Variable
Let
\[ f(x,y)=x^2+2xy+y^2. \]Set \(y=3\) and rewrite the result as a function of \(x\) alone.
Practice 5: Identify the Input Space
A model is written
\[ P(a,b,c,d)=a+bc-d^2. \]If all four inputs are real numbers, what standard real coordinate space contains its inputs?
Practice 6: Point on a Graph
Let
\[ z=f(x,y)=x^2-y. \]Find the point on the graph corresponding to the input \((2,1)\).
Practice 7: Applied Function
The volume of a box is
\[ V(\ell,w,h)=\ell wh. \]Find \(V(6,2.5,4)\).
Practice 8: Read the Dependence
A temperature model is written
\[ T(x,y,t). \]State what the notation says about the inputs on which temperature depends.
Practice 9: Vector Notation
Let
\[ \mathbf{x}=(x_1,x_2,x_3) \]and
\[ f(\mathbf{x})=x_1^2+x_2^2+x_3^2. \]Find \(f(1,-2,2)\).
Practice 10: Explain the Error
A student sees
\[ f(x,y)=x+2y \]and writes
\[ f(3,4)=f(12)=12+24=36. \]Explain the mistake and evaluate \(f(3,4)\) correctly.
Practice Answers
Practice 1
\[ f(3,4)=2(3)^2-3(4)=18-12=\boxed{6}. \]Practice 2
\[ g(2,7)=5(2)-7=\boxed{3}, \]while
\[ g(7,2)=5(7)-2=\boxed{33}. \]The unequal results show why coordinate order matters.
Practice 3
\[ h(-2,3,4)=(-2)(3)+4^2=-6+16=\boxed{10}. \]Practice 4
Substitute \(y=3\):
\[ f(x,3)=x^2+2x(3)+3^2. \] \[ \boxed{f(x,3)=x^2+6x+9}. \]Practice 5
Four real inputs form an ordered quadruple, so the input space is
\[ \boxed{\mathbb{R}^4}. \]Practice 6
\[ f(2,1)=2^2-1=3. \]Therefore the graph contains the point
\[ \boxed{(2,1,3)}. \]Practice 7
\[ V(6,2.5,4)=6(2.5)(4)=\boxed{60}. \]Practice 8
The notation \(T(x,y,t)\) says that temperature is being modeled as a function of two spatial coordinates, \(x\) and \(y\), together with time \(t\).
Practice 9
\[ f(1,-2,2)=1^2+(-2)^2+2^2=1+4+4=\boxed{9}. \]Practice 10
The comma separates the two coordinates; it does not mean multiplication. Substitute \(x=3\) and \(y=4\) directly:
\[ f(3,4)=3+2(4)=\boxed{11}. \]What to Remember
A function of several variables extends the ordinary function concept to inputs with several coordinates.
\[ \boxed{(x_1,x_2,\ldots,x_n)\longmapsto f(x_1,x_2,\ldots,x_n)}. \]- the complete ordered tuple is the function input;
- coordinate order matters;
- a real-valued function of two variables often has the form \(z=f(x,y)\);
- the graph of \(z=f(x,y)\) lies in three-dimensional space;
- holding one input fixed produces a lower-dimensional slice;
- holding the output fixed produces a level set;
- the same framework extends naturally to \(n\) inputs.
The most important habit is to keep the roles clear: identify the full input first, then determine the output assigned to that input.
Where We Go Next
Before analyzing how a multivariable function changes, we need to know where the function is defined, what outputs it can produce, and how equal-output sets organize the input space.
The next lesson, Domains, Ranges, and Level Sets, develops these ideas and establishes the geometric language used throughout multivariable analysis.