Quarry School

Evaluate a formula

Subject: MathematicsLeans on: Signed arithmeticLeans on: Distributive propertyLeans on: Squaring a sumLeans on: Subtracting parenthesesLeans on: Nonzero factor cancellation
Level 2 · BuildingAbout 13 min read7 new terms
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Quick review (2 minutes)

    In plain words

    Think of a recipe with a blank for an ingredient amount.

    Rule

    To evaluate a formula, replace every input variable with the whole stated input in parentheses, then calculate or expand. The value or expression you obtain is the output.

    Step

    1. Say what the question asks. Evaluate f(2) means the input is 2; find its output. It does not ask which input produces 2.

    2. Copy the formula, replacing every input letter with the given input in parentheses.

    3. For a number, do powers first, then multiplication, then addition and subtraction. For an expression, multiply out parentheses before collecting like terms.

    4. Check by putting a numerical input into both the starting recipe and the expanded expression. Matching results can catch an expansion error.

    Question

    A function machine named g accepts any real number as its input x and produces the output
    g(x) = 3x2 - 8x + 6.
    In words, the recipe is: square the input and multiply by 3, subtract 8 times the input, then add 6.
    (a) Evaluate g(-2).
    (b) Evaluate g(k - 2), where k stands for any real number. Write the output as an expanded expression in k with like terms collected.

    Answer

    (a)g(-2)=34.(b)g(k-2)=3k2-20k+34.

    Trap

    Losing the middle term when squaring a sum. Write (a + h)(a + h) and keep all four products before combining the two ah terms.

    Strategy

    1. Say what the question asks. Evaluate f(2) means the input is 2; find its output. It does not ask which input produces 2.

    2. Copy the formula, replacing every input letter with the given input in parentheses.

    3. For a number, do powers first, then multiplication, then addition and subtraction. For an expression, multiply out parentheses before collecting like terms.

    4. Check by putting a numerical input into both the starting recipe and the expanded expression. Matching results can catch an expansion error.

    Term

    Set

    Definition

    A collection of distinct members. Braces list them, and repeating a member does not create a new member.

    Term

    Real number

    Definition

    A number on the number line, including integers, fractions and numbers such as 2.

    Term

    Variable

    Definition

    A letter that represents a number or another chosen value.

    Term

    Function

    Definition

    A relation assigning exactly one output to every input in its domain.

    Term

    Input

    Definition

    A value chosen for a function. The definition decides which values are allowed.

    Term

    Output

    Definition

    The result a function assigns to a particular input.

    Term

    Algebraic expression

    Definition

    A combination of values, letters and operations, without asserting an equality.

    Term

    Equation

    Definition

    A statement that two expressions are equal, shown with an equals sign.

    Term

    Formula

    Definition

    A mathematical instruction connecting quantities, often written as an equation.

    Term

    Evaluate

    Definition

    Find the output at a given input by applying the rule or reading its representation.

    Term

    Solve

    Definition

    Find every allowed input that satisfies a stated equation or produces a specified output.

    Term

    Constant

    Definition

    A value that stays fixed in the stated rule.

    Term

    Square root

    Definition

    The nonnegative number whose square equals the given nonnegative input.

    Term

    Distributive property

    Definition

    Multiplying a sum multiplies every term in it: a(b + c) = ab + ac.

    Term

    Factor

    Definition

    A quantity multiplied by another quantity in a product.

    Term

    Like terms

    Definition

    Terms with the same variable part and powers, so their coefficients can be combined.

    Term

    Power

    Definition

    A quantity written with a base and exponent. Positive whole-number exponents count multiplied copies; zero and negative exponents extend that pattern.

    Term

    Area

    Definition

    The amount of flat surface inside a shape, measured in square units.

    Term

    Nonnegative

    Definition

    Zero or positive; written x ≥ 0.

    Term

    ≠

    Definition

    A symbol saying two quantities are not equal.

    Term

    Term

    Definition

    One added or subtracted piece of an expression. Keep its sign with that piece.

    1 In plain words

    Think of a recipe with a blank for an ingredient amount. You choose a number and put that same number in every copy of the blank. A function formula works that way: evaluating means the input is known and you want the output. Parentheses are a seat belt around the whole input. They keep a negative sign or a sum attached while you square or multiply. If the input is a letter, you make a recipe for any value of that letter. If the input is a sum, put the entire sum in every blank, then multiply out and collect matching terms.

    2 Picture it

    −3x² + 3x − 4inputoutput−4
    −3 goes in, the rule is x2 + 3x − 4, and −4 comes out.

    Reminder

    Reminder: Signed arithmetic, Distributive property, Squaring a sum, Subtracting parentheses, Nonzero factor cancellation
    • Signed arithmetic. A negative squared is positive when enclosed: (−2)2 = 4, while 3(−2) = −6.
    • Distributive property. Multiply every term inside: 3(a + h) = 3a + 3h.
    • Squaring a sum. (a + h)2 = a2 + 2ah + h2 because it contains four products, not two.
    • Subtracting parentheses. −(a2 + 3a − 4) = −a2 − 3a + 4; each sign changes.
    • Nonzero factor cancellation. h(2a+h)h = 2a + h only for h ≠ 0.

    3 Why

    A formula tells how an output is built from its input. Replacing every occurrence of the input variable by the same value applies that definition consistently. Replacing only one occurrence changes the recipe. Parentheses preserve the input as a whole: (−3)2 squares −3, whereas −32 negates the square of 3. For sums, distribution rewrites the result without changing its value, because each term multiplies every relevant term in the other group.

    4 The rule

    To evaluate a formula, replace every input variable with the whole stated input in parentheses, then calculate or expand.

    The value or expression you obtain is the output.

    The same idea, five ways

    Say it

    f of negative three

    Write it

    The input is −3. Find the output of f at that input.

    In math
    • f(−3)
    • f(−3)=(−3)2+3(−3)−4=−4
    Like

    Fill every ingredient blank with the same amount.

    See it
    −3x² + 3x − 4inputoutput−4
    The same picture again: −3 goes in, the rule is x2 + 3x − 4, and −4 comes out.

    The same idea, other ways

    Follow a recipe

    For f(x) = x2 + 3x − 4, the recipe is square the input, add three times the input, then subtract 4. Input 2 gives 4 + 6 − 4 = 6. The name f stays on the machine; 2 is the input and 6 is the output.

    2x² + 3x − 4inputoutput6
    Every use of the input in this recipe receives the same number, 2.
    Fill every blank

    Read x2 + 3x − 4 as (blank)2 + 3(blank) − 4. If the input is a + h, write (a + h) in both blanks. This makes f(a + h) = (a + h)2 + 3(a + h) − 4 before any expansion. The parentheses act like a bag keeping all of the input together.

    (input)2 + 3(input) − 4

    input = a + h

    (a+h)2+3(a+h)−4

    See the four pieces of a square

    A square with side a + h splits into four rectangles: a2, ah, ha and h2. The two middle pieces add to 2ah. That is why (a + h)2 = a2 + 2ah + h2. The picture uses positive lengths, while multiplication gives the same identity for any real a and h.

    a²ahahah²hah
    There are two middle rectangles, so the expansion needs 2ah.

    Part 1: Numeric substitution

    Think of a recipe with two places asking for the same ingredient amount. A function such as f(x) = x2 + 3x − 4 uses the input twice, so you must place your number in both spots. A negative input belongs in parentheses. The square uses the whole negative number, while the separate multiplication by 3 keeps its negative sign. Follow the order of operations after replacing the input.

    • Evaluate means input is known and output is wanted.
    • f(−3) uses (−3)2, which is 9. Writing −32 without parentheses means −(32), which is −9.
    −3x² + 3x − 4inputoutput−4
    The same picture a third time: −3 goes in, the rule is x2 + 3x − 4, and −4 comes out.

    Reminder

    Reminder: Order of operations
    • Order of operations. Powers and products come before sums: 22 + 3 × 2 = 4 + 6 = 10.

    The same idea, five ways

    Say it

    f of negative three equals negative four.

    Write it

    Replace both input positions by the whole negative input, then compute the output.

    In math
    • f(x)=x2+3x−4
    • f(−3)=(−3)2+3(−3)−4=−4
    • (−3,−4)
    Like

    Put the same ingredient amount in every matching blank in a recipe.

    See it
    −3x² + 3x − 4inputoutput−4
    The same picture, shown 4 times now: −3 goes in, the rule is x2 + 3x − 4, and −4 comes out.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: f(−3)=−32−9−4=−22.
    −32 means negate the square of 3. The formula asks to square the entire input −3 instead.
    ✓ Instead: f(−3)=(−3)2+3(−3)−4=9−9−4=−4.

    Tips and tricks

    • Draw parentheses around every replacement before doing arithmetic.
    • Two blanks, one number: Write f(2) = (2)2 + 3(2) − 4. Both blanks receive 2, as both copies of your name on a form receive the same name.
    • Signed multiplication: For input −3, the square is (−3)(−3) = 9, while 3(−3) = −9. Compute these pieces separately so the two signs cannot get mixed together.

    Part 2: Symbolic substitution

    A letter can stand for an amount you have not chosen yet, like an empty measuring cup marked a. Replacing x with a gives a recipe for any value of a. Replacing x with a + h puts the entire sum into each input spot. You can leave a correct answer unexpanded, or use the distributive property, multiplying each piece, to rewrite it. Expansion changes the appearance of the output expression, not the value it will have when numbers are chosen.

    • An algebraic expression can be an input: f(a + h) means use the whole sum a + h.
    • (a + h)2 = (a + h)(a + h) = a2 + ah + ha + h2 = a2 + 2ah + h2.
    • 3(a + h) = 3a + 3h because 3 multiplies each term in the sum.
    a²aaa11a1
    An area model with sides a + 1 and a + 1.

    Reminder

    Reminder: Subtracting parentheses
    • Subtracting parentheses. A subtraction applies to every term: 7 − (a + 1) = 7 − a − 1.

    The same idea, five ways

    Say it

    q of the whole sum a plus one equals a squared plus a.

    Write it

    The complete expression a + 1 replaces each input variable before the result is expanded.

    In math
    • q(x)=x2−x
    • q(a+1)=(a+1)2−(a+1)
    • q(a+1)=a2+a
    Like

    Keep a sealed ingredient bag together when filling each recipe blank.

    See it
    a²aaa11a1
    The same picture again: An area model with sides a + 1 and a + 1.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: (a+h)2=a2+h2.
    This leaves out the products ah and ha. With a = 1 and h = 2, the left side is 9 while the proposed right side is 5.
    ✓ Instead: (a + h)2 = a2 + 2ah + h2, giving 1 + 4 + 4 = 9 in that check.

    Tips and tricks

    • Write the squared sum as two identical parentheses before expanding; the middle term becomes visible.
    • A sealed input bag: Place a + h inside parentheses before following the recipe. You are squaring the bag's whole contents, not squaring a and then adding h.
    • Multiply every pair: In (a + h)(a + h), the first a multiplies a and h, then the first h multiplies a and h. The four products are a2, ah, ha and h2. None can be skipped.

    5 How

    1. Say what the question asks. Evaluate f(2) means the input is 2; find its output. It does not ask which input produces 2.
    2. Copy the formula, replacing every input letter with the given input in parentheses.
    3. For a number, do powers first, then multiplication, then addition and subtraction. For an expression, multiply out parentheses before collecting like terms.
    4. Check by putting a numerical input into both the starting recipe and the expanded expression. Matching results can catch an expansion error.

    Evaluate the entire input

    1
    Is the input a number?
    YesKeep it in parentheses and follow the order of operations.
    NoKeep the whole letter expression in parentheses, then distribute and collect like terms.
    ↓
    2
    Does the input have a minus sign or more than one term?
    YesKeep its parentheses through every power and multiplication.
    NoStill replace every occurrence of the input variable.
    1. Say what the question asks. Evaluate f(2) means the input is 2; find its output. It does not ask which input produces 2.
    2. Copy the formula, replacing every input letter with the given input in parentheses.
    3. For a number, do powers first, then multiplication, then addition and subtraction. For an expression, multiply out parentheses before collecting like terms.
    4. Check by putting a numerical input into both the starting recipe and the expanded expression. Matching results can catch an expansion error.

    6 Worked example

    Worked example

    Evaluate g(-2) and g(k - 2) for a function machine

    A function machine named g accepts any real number as its input x and produces the output
    g(x) = 3x2 - 8x + 6.
    In words, the recipe is: square the input and multiply by 3, subtract 8 times the input, then add 6.
    (a) Evaluate g(-2).
    (b) Evaluate g(k - 2), where k stands for any real number. Write the output as an expanded expression in k with like terms collected.

    Show the steps and the answer
    1. Say what each part asks. In (a) the input is the number -2; find its output. In (b) the input is the whole expression k-2; find its output, which will be an expression in k.g(-2) names the output of the machine when -2 goes in. It does not ask which input produces an output of -2, so there is no equation to solve: we substitute and calculate.
    2. For (a), copy the recipe with (-2) in place of every x: g(-2)=3(-2)2-8(-2)+6.The input letter x appears twice, and each one must be replaced. Parentheses keep the negative sign attached to the input, so the square acts on the whole number -2, sign included.
    3. Do the power first: (-2)2=(-2)(-2)=4, so g(-2)=3(4)-8(-2)+6.Powers come before multiplication. A negative number times itself is positive, so the square is 4. Without the parentheses, -22 would mean -(22) = -4, which is not the square of the input.
    4. Multiply next: 3(4)=12 and 8(-2)=-16, so g(-2)=12-(-16)+6. Then add and subtract: 12+16+6=34.Multiplication comes before addition and subtraction, and subtracting -16 is the same as adding 16. The number 34 is the output for the input -2.
    5. For (b), copy the recipe with (k - 2) in place of every x: g(k-2)=3(k-2)2-8(k-2)+6.The whole input k - 2 replaces x, so it goes in parentheses in both places. This is not g(k) - 2: that would subtract 2 from the output, while here 2 is subtracted from the input before the machine works on it.
    6. Multiply out the square: (k-2)2=(k-2)(k-2)=k2-2k-2k+4=k2-4k+4.The power is still handled first, and for an expression that means multiplying out the parentheses. Squaring multiplies the binomial by itself, which produces the middle term -4k; (k - 2)2 is not k2 - 4 and not k2 + 4.
    7. Distribute the 3 and the -8: 3(k2-4k+4)=3k2-12k+12 and -8(k-2)=-8k+16. So g(k-2)=3k2-12k+12-8k+16+6.A number in front of parentheses multiplies every term inside. The -8 multiplies the -2 too, and a negative times a negative gives +16.
    8. Collect like terms: -12k-8k=-20k and 12+16+6=34, so g(k-2)=3k2-20k+34.Only terms with the same power of k can be combined. Nothing more can be simplified, so this expression is the output for the input k - 2.
    9. Check (b) with a number, say k=3. Starting recipe: the input is 3-2=1, and g(1)=3(1)2-8(1)+6=3-8+6=1. Expanded expression: 3(3)2-20(3)+34=27-60+34=1.The recipe and the expanded expression must give the same output for every value of k, so a numerical input can catch an expansion error. Here both give 1. A slip such as -8(k - 2) = -8k - 16 would have produced 3k2 - 20k + 2, which gives -31 at k = 3 and would not match.
    Answer
    (a)g(-2)=34.(b)g(k-2)=3k2-20k+34.
    Double-check Part (a) is a special case of part (b): when k = 0, the input k - 2 equals -2. The expanded expression gives 3(0)2 - 20(0) + 34 = 34, the same as g(-2) from part (a). One more input tests the terms that contain k: for k = 1 the input is -1; the recipe gives g(-1) = 3(-1)2 - 8(-1) + 6 = 3 + 8 + 6 = 17, and the expanded expression gives 3(1)2 - 20(1) + 34 = 3 - 20 + 34 = 17. The results match each time.

    Work to write

    1. g(-2)=3(-2)2-8(-2)+6
    2. g(-2) = 3(4) - 8(-2) + 6 = 12 + 16 + 6 = 34
    3. g(k-2)=3(k-2)2-8(k-2)+6
    4. (k-2)2=k2-4k+4
    5. g(k-2)=3k2-12k+12-8k+16+6
    6. g(k-2)=3k2-20k+34
    7. Check with k = 3: g(1) = 3 - 8 + 6 = 1 and 3(3)2 - 20(3) + 34 = 27 - 60 + 34 = 1

    Ladder: from easy to exam-hard

    Try each rung before you open its steps.

    Rung 1 of 3

    Evaluation rung 1: a constant and a line

    Let k(x) = 5 and L(x) = 4x − 3. Evaluate k(3) and L(4). Each question gives an input and asks for its output.

    What it asks. Use each stated input to find its output from the named formula.

    Show the steps and the answer

    The plan. Replace every input-variable slot with the whole input in parentheses. Work powers before multiplication, and multiplication before adding or subtracting. For a square root, compute its inside first and choose the nonnegative root. Check by following the original recipe again.

    4times 4, thensubtract 3inputoutput13
    Keep the recipe's operations in their stated order.
    1. Plan. Replace every input-variable slot with the whole input in parentheses. Work powers before multiplication, and multiplication before adding or subtracting. For a square root, compute its inside first and choose the nonnegative root. Check by following the original recipe again.
    2. Every input slot receives the complete input, including its sign.
    3. Square a negative input in parentheses: (−2)2 = 4. A constant recipe gives the same output for every input.
    4. Keep separate requested outputs on separate answer lines.
    1. k(3)=5.This formula always returns 5 and contains no input variable to replace.
    2. L(4)=4(4)−3.Replace the x in the second formula with 4.
    3. L(4)=16−3=13.Multiply before subtracting.
    Answer
    • k(3) = 5.
    • L(4) = 13.
    Double-check The first rule returns 5 for every input. The second gives 4 × 4 − 3 = 13; adding 3 to that output and dividing by 4 recovers the input 4.

    Rung 2 of 3

    Protect a negative input

    Let r(x) = 3x − 7. Evaluate r(−4). This means use −4 as the input and find the output.

    What it asks. Use each stated input to find its output from the named formula.

    Show the steps and the answer

    The plan. Replace every input-variable slot with the whole input in parentheses. Work powers before multiplication, and multiplication before adding or subtracting. For a square root, compute its inside first and choose the nonnegative root. Check by following the original recipe again.

    −18−12−60−7lands on −19
    Subtracting 7 from −12 lands at −19.
    1. Plan. Replace every input-variable slot with the whole input in parentheses. Work powers before multiplication, and multiplication before adding or subtracting. For a square root, compute its inside first and choose the nonnegative root. Check by following the original recipe again.
    2. Every input slot receives the complete input, including its sign.
    3. Square a negative input in parentheses: (−2)2 = 4. A constant recipe gives the same output for every input.
    4. Keep separate requested outputs on separate answer lines.
    1. r(−4)=3(−4)−7.The whole negative input replaces x.
    2. r(−4)=−12−7.A positive times a negative is negative.
    3. r(−4)=−19.Starting at −12 and subtracting 7 moves seven more places left.
    Answer
    r(−4)=−19
    Double-check Undo the recipe on the output: −19 + 7 = −12, then −12 ÷ 3 = −4, the given input.

    Rung 3 of 3

    A sum in both input spots

    For s(x) = x2, evaluate s(a + h). The input is the entire sum a + h; find its output expression.

    What it asks. Use the entire expression as input and find the simplified output expression.

    Show the steps and the answer

    The plan. Replace every input-variable slot with the whole input in parentheses. Expand a squared sum with all four products and distribute multiplication or subtraction through the entire group. Combine matching terms and check by assigning numbers to the input letters.

    a²ahahah²hah
    Every rectangle is one required product.
    1. Plan. Replace every input-variable slot with the whole input in parentheses. Expand a squared sum with all four products and distribute multiplication or subtraction through the entire group. Combine matching terms and check by assigning numbers to the input letters.
    2. Every input slot receives the complete input, including its sign.
    3. A square of a sum includes two middle products. A negative sign outside parentheses changes every enclosed sign.
    4. Keep separate requested outputs on separate answer lines.
    1. s(a+h)=(a+h)2=(a+h)(a+h).A square multiplies the whole input by itself.
    2. s(a+h)=a2+ ah + ha +h2.Multiply each term in the first parentheses by each term in the second.
    3. s(a+h)=a2+2ah +h2.ah and ha are equal, so together they are 2ah.
    Answer
    s(a + h) = a2 + 2ah + h2
    Double-check Set a = 2 and h = 3. The input is 5 and its square is 25. The expansion gives 4 + 12 + 9 = 25.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: f(a + h) = f(a) + h.
    The change happens to the input before the function recipe runs. The output generally changes by a different amount. Here f(3) = 14 while f(1) + 2 = 2.
    ✓ Instead: Replace every x by a + h: f(a + h) = (a + h)2 + 3(a + h) − 4.
    ✗ Not this: f(−3)=−32−9−4=−22.
    −32 means negate the square of 3. The formula asks to square the entire input −3 instead.
    ✓ Instead: f(−3)=(−3)2+3(−3)−4=9−9−4=−4.
    ✗ Not this: (a+h)2=a2+h2.
    This leaves out the products ah and ha. With a = 1 and h = 2, the left side is 9 while the proposed right side is 5.
    ✓ Instead: (a + h)2 = a2 + 2ah + h2, giving 1 + 4 + 4 = 9 in that check.

    Tips and tricks

    • Put a seat belt of parentheses around each whole input before doing arithmetic.
    • A numerical spot-check can expose a wrong expression. A derivation proves the expression for every allowed input.

    7 The trap

    Losing the middle term when squaring a sum. Write (a + h)(a + h) and keep all four products before combining the two ah terms.

    Comes back in