Tutorials › Calculus III › Evaluating Three-Variable Formulas at Points

Domains and Function Representations · Tutorial 204 of 999

Evaluating Three-Variable Formulas at Points

Practice matching each coordinate to its variable and evaluating three-variable formulas accurately, one operation at a time.

Beginner 9 min read

What You'll Learn

  • Match the first, second, and third coordinates of an ordered triple to the variables x, y, and z.
  • Substitute given values consistently wherever each variable occurs.
  • Evaluate powers and mixed products while keeping negative signs attached to their values.
  • Organize a formula into terms to reduce arithmetic errors.
  • Check an answer by evaluating the substituted expression another way.

From an Ordered Triple to a Number

A formula in three variables describes how an output depends on three inputs. To evaluate it at a specified point, replace the variables with the corresponding coordinates and carry out the arithmetic. The key is to preserve the order of the inputs: in \(f(x,y,z)\), the first coordinate supplies \(x\), the second supplies \(y\), and the third supplies \(z\).

This sounds straightforward, but several details can make the calculation easy to misread. A variable may appear more than once, a product may mix two or three variables, and a negative coordinate may affect the sign of a whole term. A careful substitution, followed by a deliberate arithmetic check, handles these issues reliably.

Definition: If \(f\) is a function of three variables and \((a,b,c)\) is an input in its domain, then \(f(a,b,c)\) is the value obtained by replacing every \(x\) with \(a\), every \(y\) with \(b\), and every \(z\) with \(c\) in the formula for \(f\), and then evaluating the resulting numerical expression.

The triple is ordered. For \(f(2,-1,3)\), the input means \(x=2\), \(y=-1\), and \(z=3\). It does not mean that the three numbers can be assigned to the variables in any order. Each occurrence of a variable receives the same coordinate. For instance, if \(x\) occurs as both \(x\) and \(x^2\), both appearances use the first coordinate.

A Reliable Substitution Procedure

Write the input-to-variable matches before calculating, especially when the triple contains negative numbers. Then replace each variable in the entire formula, using parentheses around substituted negative values. Keep the structure of the original expression visible until the substitutions are complete. Only then simplify, following the usual order of operations: powers first, then multiplication and division, then addition and subtraction.

1
Match the coordinates.
For an input \((a,b,c)\), record \(x=a\), \(y=b\), and \(z=c\).
2
Substitute throughout.
Replace every occurrence of each variable; use parentheses to keep negative values clear.
3
Calculate in order.
Evaluate powers, products, and then sums or differences.
4
Check the result.
Review the substituted expression, including the sign and value of each term.

This procedure is not a new operation that changes the function. It simply gives numerical values to the input symbols. The formula still has the same structure; its variables have been replaced by the specified numbers.

Worked Examples

Worked Example: A Mixed Product with a Negative Coordinate

Evaluate \(f(x,y,z)=2x^2-3yz+4z\) at \((1,-2,3)\).

First match the coordinates: \(x=1\), \(y=-2\), and \(z=3\). Substitute these values into every occurrence of the variables:

$$ \begin{aligned} f(1,-2,3) &=2(1)^2-3(-2)(3)+4(3)\\ &=2(1)-3(-6)+12\\ &=2+18+12\\ &=32. \end{aligned} $$

For a check, evaluate the three terms separately. The first is \(2(1)^2=2\). The mixed product is \(-3yz=-3(-2)(3)=18\). The last term is \(4z=4(3)=12\). Their sum is \(2+18+12=32\), confirming that \(f(1,-2,3)=32\).

Worked Example: A Square of a Difference

Evaluate \(g(x,y,z)=(x-y)^2+2xz-y^2+3z\) at \((-1,2,3)\).

Here \(x=-1\), \(y=2\), and \(z=3\). Substitute the values, keeping the negative value of \(x\) in parentheses:

$$ \begin{aligned} g(-1,2,3) &=\bigl((-1)-2\bigr)^2+2(-1)(3)-(2)^2+3(3)\\ &=(-3)^2-6-4+9\\ &=9-6-4+9\\ &=8. \end{aligned} $$

Check each contribution: \((x-y)^2=(-3)^2=9\); \(2xz=2(-1)(3)=-6\); \(-y^2=-(2)^2=-4\); and \(3z=9\). Adding them gives \(9-6-4+9=8\). Thus \(g(-1,2,3)=8\).

Worked Example: Powers, Mixed Terms, and a Constant

Evaluate \(h(x,y,z)=x^2z-2xy+3y^2-4\) at \((2,-1,2)\).

The ordered triple gives \(x=2\), \(y=-1\), and \(z=2\). Replace all variables, including both appearances of \(y\):

$$ \begin{aligned} h(2,-1,2) &=(2)^2(2)-2(2)(-1)+3(-1)^2-4\\ &=4(2)+4+3(1)-4\\ &=8+4+3-4\\ &=11. \end{aligned} $$

To check, compute the terms of the original formula separately: \(x^2z=2^2(2)=8\); \(-2xy=-2(2)(-1)=4\); \(3y^2=3(-1)^2=3\); and the constant contributes \(-4\). The total is \(8+4+3-4=11\), so \(h(2,-1,2)=11\).

Why Substitution Works

Every expression in these examples is built from variables, numbers, and arithmetic operations. Assigning a number to each variable turns each variable into a number; the same arithmetic operations can then be performed on those numbers. The reason an expression may be regrouped before or after substitution is that addition and multiplication obey the same arithmetic laws for numbers as they do in the formula.

Justification: Suppose \(P\) and \(Q\) are expressions in \(x,y,z\), and both are defined at \((a,b,c)\). After replacing \(x,y,z\) with \(a,b,c\), the value of \(P+Q\) is the value of \(P\) plus the value of \(Q\), and the value of \(PQ\) is the value of \(P\) multiplied by the value of \(Q\). This follows directly from what addition and multiplication of the substituted numerical expressions mean.

For example, the formula \(2x^2-3yz+4z\) can be regrouped as \(2x^2+z(4-3y)\), by distributing \(z\). At \((1,-2,3)\), evaluating the regrouped expression gives

$$ 2(1)^2+3\bigl(4-3(-2)\bigr) =2+3(10) =32. $$

This agrees with the first calculation. Regrouping is useful as a check, but it is not required: direct substitution into the given formula is usually the clearest starting point.

Common Pitfalls

A frequent error is losing a negative sign in a mixed product. In the first example, a mistaken calculation might treat \(-3(-2)(3)\) as \(-18\), perhaps by overlooking that the product \((-2)(3)\) is negative. The correct calculation is

$$ (-2)(3)=-6 \qquad\text{and}\qquad -3(-6)=18. $$

There are two negative factors in \(-3(-6)\), so the product is positive. Keeping parentheses around negative coordinates makes this sign change visible.

Another common mistake is confusing a squared negative value with a negative square. If \(y=-1\), then \(y^2=(-1)^2=1\), while \(-y^2=-((-1)^2)=-1\). The exponent applies to \(y\) first; a minus sign outside the power remains outside. Parentheses in the substituted expression help distinguish these meanings.

Finally, do not rearrange the coordinates. If the input is \((2,-1,2)\), then \(x=2\), \(y=-1\), and \(z=2\), even if another assignment might seem more convenient. The variable order is part of the function notation.

Why Accurate Evaluation Matters

Evaluating a three-variable formula is a basic way to find the output associated with one specified input. The value can then be used to compare outputs at different points or to check a formula in a concrete case. Even when the arithmetic is simple, writing the substitution clearly makes the result easier to verify and reduces the chance of confusing a variable, coordinate, or sign.

When checking your own work, make sure that every variable has been replaced, that repeated occurrences use the same value, and that powers and signs have been handled correctly. A second calculation using the terms of the formula is often enough to catch an error. If the input is required to lie in a particular domain, the formula must also be defined at that input; here, the examples use polynomial formulas, which are defined for all real triples.

Check Your Understanding

For each question, write the coordinate assignments before simplifying, and use parentheses when substituting negative values.

  1. Evaluate \(p(x,y,z)=x+2y-3z\) at \((2,-1,1)\).
  2. Evaluate \(q(x,y,z)=x^2+yz\) at \((-2,3,-1)\).
  3. For \(r(x,y,z)=2xy+z^2-5\), which coordinate supplies the value of \(y\) at the input \((4,0,-2)\)? Then find \(r(4,0,-2)\).
  4. Explain why the term \(-y^2\) is negative when \(y=-3\), even though \(y^2\) is positive.
  5. Evaluate \(s(x,y,z)=(x+z)y\) at \((1,-2,3)\), and check by calculating the product \((x+z)y\) after substituting.