Introduction
A function of several variables is a rule for assigning an output to an input that contains more than one number. For a scalar function, the output is a single real number. The input might be an ordered pair, such as a point in the plane, or an ordered triple, such as a point in space.
To describe such a function precisely, it is important to separate four ideas: the allowed inputs, the rule, the real numbers the rule can produce, and the set in which outputs are declared to lie. These ideas are related, but they are not interchangeable.
Definition: A Scalar Function on Ordered Inputs
An ordered pair \((x,y)\) is an input with two coordinates; an ordered triple \((x,y,z)\) has three. A set of such pairs is a subset of \(\mathbb{R}^2\), and a set of such triples is a subset of \(\mathbb{R}^3\). The word “ordered” means that an input is specified by its coordinates in their given positions.
For a two-variable function, the domain is a set of ordered pairs. For a three-variable function, it is a set of ordered triples. The domain need not be the whole plane or all of three-dimensional space: it is the set of inputs for which the function is defined.
A function may be specified by a formula, a table of assignments, or a verbal rule. Whatever form is used, the essential requirement is the same: every input in the domain must receive one and only one real output.
Domain, Codomain, and Range
When describing a function, one may specify not only its domain but also a codomain: a set in which the outputs are declared to lie. For a real-valued function, the codomain is often \(\mathbb{R}\). The range, also called the image, consists of the outputs the rule actually produces from the domain.
Here, \(\mathbf{u}\) stands for an allowed ordered input: either a pair or a triple. The notation \(f:D\to\mathbb{R}\) says that the domain is \(D\) and that outputs lie in the codomain \(\mathbb{R}\). The range is the subset of real numbers that are actually attained. Thus, the range is always contained in the codomain, but it need not equal it.
Why the “Exactly One” Requirement Matters
The defining condition can be stated as a test: for every input in the domain, there must be an output, and there must not be two different outputs assigned to that same input. This is what makes the rule a function rather than an incomplete or ambiguous assignment.
This criterion follows directly from the definition. If an assignment is a function, every domain element must have exactly one output, so neither a missing value nor conflicting values are allowed. Conversely, if every domain element has exactly one assigned real number, the assignment gives precisely the rule required by the definition. No condition requires distinct inputs to have distinct outputs.
Worked Examples
Worked Example: A Function Given by a Finite Table
Let the domain be \(D=\{(0,0),(1,0),(0,1),(1,1)\}\). Define a rule by assigning the following outputs:
The domain is exactly the four listed ordered pairs. Each pair appears once and receives one real output, so the assignment defines a scalar function \(f:D\to\mathbb{R}\).
Reading the assigned values, the outputs are \(2,4,4,7\). The range is the set of distinct outputs, so the repeated value \(4\) is listed only once:
Check: There are four inputs, and each has exactly one listed real output. Both \((1,0)\) and \((0,1)\) produce \(4\), which is permitted: a function does not have to give different outputs for different inputs.
Worked Example: A Constant Function on a Rectangle
Let \(D=[-1,1]\times[0,2]\), the set of ordered pairs \((x,y)\) with \(-1\leq x\leq 1\) and \(0\leq y\leq 2\). Define \(c:D\to\mathbb{R}\) by the rule that every input is assigned the number \(6\).
The domain is the entire specified rectangle, including its boundary. For any \((x,y)\in D\), the rule assigns \(c(x,y)=6\). Since \(6\) is a real number, every allowed input receives a real output, and the same rule gives exactly one output for each input.
To determine the range, note first that every output is \(6\), so no other real number can belong to the range. The domain is nonempty; for example, \((0,0)\in D\), and its assigned output is \(6\). Therefore \(6\) is attained. Together these facts give:
Check: The domain contains many ordered pairs, but the range contains only one real number. The example confirms that the domain and range describe different kinds of sets and need not have the same size.
Worked Example: A Three-Variable Function on Four Inputs
Let \(E=\{(0,0,0),(1,0,0),(0,1,0),(0,0,1)\}\), and define \(s:E\to\mathbb{R}\) by the rule \(s(x,y,z)=x+y+z\). The domain is the four listed ordered triples. Apply the rule to each input:
Each input is assigned one real number, so this is a scalar function on \(E\). The outputs are \(0,1,1,1\); removing repetitions gives the range:
Check: The domain has four triples, while the range has two numbers. Every output shown is a real number, and every triple in the declared domain has been assigned exactly one output.
Rules Need Not Be Formulas
A formula is one way to state a function, but it is not part of the definition. In the first example, a table gave the assignments directly. In the constant-function example, a verbal rule specified the output. In the three-variable example, a formula described the rule on a stated domain.
Whatever the description, the domain must be clear enough to identify which inputs are covered. A table defines a function on its listed inputs; a formula paired with a declared domain defines a function on the inputs in that domain, provided the rule assigns exactly one real output to each of them. The formula alone does not replace the domain specification.
For instance, saying “the rule assigns \(6\)” without saying which inputs are under consideration leaves the domain unspecified. Once a domain is declared, the function is a complete assignment from that set of inputs to real numbers.
A Common Mistake: Confusing the Domain and Range
For the finite-table function above, the domain is \(\{(0,0),(1,0),(0,1),(1,1)\}\), while the range is \(\{2,4,7\}\). A common wrong statement is, “The range is the four ordered pairs in the table.” That set consists of inputs, so it is the domain, not the range.
The correction is to collect the outputs, not the inputs. The table assigns \(2,4,4,7\); as a set, these values give the range \(\{2,4,7\}\). Repeated outputs count once when writing a range as a set.
A second mistake is to assume that two inputs cannot share an output. The table assigns \(4\) to both \((1,0)\) and \((0,1)\), yet it still defines a function: each input separately has exactly one assigned value. The condition concerns the number of outputs per input, not the number of inputs per output.
Why Scalar Functions Matter
A scalar function associates one measurable or calculated quantity with each allowed point. For example, a temperature model can assign one real-valued temperature to each location in a region, and a pressure model can assign one real-valued pressure to each point in a volume. The locations are inputs; the quantities are outputs.
This way of describing a function is the foundation for later work with multivariable formulas and geometric surfaces. Before asking what a rule does at a particular input or how its outputs change, one must know what counts as an input and what kind of output the rule assigns. Keeping domain, output, codomain, and range distinct makes those later questions precise.
Check Your Understanding
Answer these questions using the definitions and examples above.
- What must a rule assign to every element of its domain in order to define a scalar function?
- In the finite-table example, which set is the domain, and which set is the range?
- Can two different ordered inputs have the same output? Explain using one example from this tutorial.
- How does the codomain differ from the range?
- A proposed assignment gives one input two different real outputs. Does it define a function on the stated domain? Why or why not?