Evaluating a Formula at an Ordered Pair
A formula in two variables describes how an output depends on two inputs. To find the output for a particular pair of inputs, replace each variable with its corresponding coordinate and then calculate.
The order of the coordinates matters. For an ordered pair \((a,b)\), the first coordinate supplies the value of \(x\), and the second supplies the value of \(y\). This follows the variable order in the notation \(f(x,y)\): the first input goes with \(x\), and the second goes with \(y\).
For example, if \(f(x,y)=x^2+3y\), then \(f(2,4)\) means substitute \(2\) for \(x\) and \(4\) for \(y\). The result is a number, not another formula in \(x\) and \(y\).
When substituting, use parentheses around the coordinates, especially when a coordinate is negative or appears in a power. Parentheses make clear that the entire coordinate replaces the variable.
A Reliable Substitution Process
A careful evaluation separates substitution from arithmetic. First write down the formula with the coordinates in place. Then simplify powers, products, and sums according to the usual order of operations. This makes it easier to notice whether a value was assigned to the wrong variable or whether a sign was lost.
In \(f(a,b)\), the first coordinate \(a\) is the input for \(x\), and the second coordinate \(b\) is the input for \(y\).
Replace every \(x\) with \(a\) and every \(y\) with \(b\). Use parentheses to show exactly what is being substituted.
Evaluate powers first, then products, and then sums and differences. Review the substitutions and arithmetic before recording the function value.
For polynomial formulas, substitution works because each variable represents its assigned number everywhere it appears. Addition, multiplication, and powers are then performed on those numbers just as they are in any numerical expression. For instance, if \(x\) is assigned \(a\), the term \(x^2\) becomes \(a^2\), while the term \(3x\) becomes \(3a\). The same assignment must be used for every occurrence of \(x\).
Worked Examples
Worked Example: A Sum of a Square and a Product
Let \(f(x,y)=x^2+2xy+y^2\). Find \(f(3,1)\).
The first coordinate is \(3\), so replace \(x\) with \(3\). The second coordinate is \(1\), so replace \(y\) with \(1\):
Thus \(f(3,1)=16\). To check, group the terms by their numerical contributions: the square term is \(9\), the product term is \(6\), and the final square term is \(1\). Their sum is \(9+6+1=16\), as found.
Worked Example: Negative Coordinates and a Product
Let \(g(x,y)=x^2y-3xy+2y\). Find \(g(-2,3)\).
The ordered pair \((-2,3)\) assigns \(x=-2\) and \(y=3\). Substitute both values everywhere they occur:
The middle term is positive because \((-2)(3)=-6\), so \(-3(-6)=18\). The first term is \(4(3)=12\), and the last is \(2(3)=6\). Adding gives \(12+18+6=36\). As a check on the signs, the original expression has a negative coefficient on \(xy\), while the substituted product \(xy=(-2)(3)\) is negative; their product is positive.
Worked Example: A Sum of Separate Terms
Let \(h(x,y)=4x+5y^2-xy\). Find \(h(2,-1)\).
The first coordinate \(2\) replaces \(x\), and the second coordinate \(-1\) replaces \(y\). Keep the negative coordinate in parentheses:
Here \((-1)^2=1\), and \((2)(-1)=-2\), so subtracting that product adds \(2\). The terms contribute \(8\), \(5\), and \(2\), which total \(15\). Checking the substitution against the formula confirms that the term \(-xy\) becomes \(-(2)(-1)\), not \(-2(-1)\) with any extra sign change.
Worked Example: The Same Formula at Two Ordered Pairs
Let \(p(x,y)=x^2+xy+2y\). Evaluate \(p(1,4)\) and \(p(4,1)\).
For the first pair, \(x=1\) and \(y=4\):
For the second pair, \(x=4\) and \(y=1\):
The results differ: \(p(1,4)=13\), whereas \(p(4,1)=22\). The coordinates were exchanged, so the values assigned to \(x\) and \(y\) changed. The term \(x^2\), in particular, contributes \(1\) in the first evaluation and \(16\) in the second. This direct check shows why an ordered pair cannot be treated as an unordered collection of two numbers.
Why the Order and Parentheses Matter
The notation \(f(a,b)\) records an ordered input. It does not merely say that \(a\) and \(b\) are both involved; it specifies which value is assigned to each variable. A formula need not give the same result when its inputs are exchanged. In the preceding example, exchanging \(1\) and \(4\) changed the value from \(13\) to \(22\).
Parentheses are equally important. If a coordinate is negative, it must be substituted as a whole. For example, substituting \(-2\) into \(x^2\) gives \((-2)^2=4\), because the square applies to the value \(-2\). Writing \(-2^2\) is commonly interpreted as \(-(2^2)=-4\), which is a different expression.
Common Mistake: Reversing the Coordinates
Suppose \(q(x,y)=2x+y^2\), and we want \(q(1,3)\). A common error is to use \(x=3\) and \(y=1\), as if the pair could be read in either order. That produces the wrong calculation:
The first coordinate of \((1,3)\) is \(1\), so it must replace \(x\); the second coordinate is \(3\), so it must replace \(y\). The correct calculation is:
To check, evaluate the two terms in the original formula separately: \(2x\) contributes \(2(1)=2\), and \(y^2\) contributes \(3^2=9\). Their sum is \(11\). The incorrect answer \(7\) came from reversing the assignments, not from a difficult arithmetic step.
Why Careful Evaluation Is Useful
Evaluating a formula at a point turns a general rule into a specific output. The same habit applies whether the formula contains one term or several: read the input order, substitute consistently, and simplify carefully. These steps are also useful when comparing outputs at different ordered pairs, as the example with \(p(x,y)\) illustrated.
The most reliable work shows the substitution line before the arithmetic. If an answer seems unexpected, that line helps locate the source of the error: a coordinate may have been assigned to the wrong variable, a negative sign may have been lost, or a power may have been applied without parentheses. Keeping these stages visible makes the result easier to verify.
Check Your Understanding
For each question, write the substitution before simplifying. Keep the coordinates in their stated order.
- If \(r(x,y)=x^2+3y\), what is \(r(2,-1)\)?
- If \(s(x,y)=2xy+y^2\), what is \(s(-1,3)\)?
- If \(t(x,y)=5x-y^2\), evaluate \(t(1,2)\) and \(t(2,1)\). Are the results equal?
- For \(u(x,y)=x^2-xy+4y\), identify the coordinate assigned to each variable in \(u(3,-2)\), then evaluate the function.
- A student evaluates \(v(1,4)\), where \(v(x,y)=x+2y^2\), by calculating \(4+2(1)^2\). Explain the error and find the correct value.