GMAT Quant lesson · Functions & symbols
GMAT functions and custom symbols: evaluate, compose, work backward
Functions and defined symbols on GMAT Quant: plug expressions into f(x), compose functions in the right order, apply custom operations, and find the input.
The core idea
A function or a custom symbol is just a rule for what to do with the inputs. Substitute exactly, with parentheses around whatever you plug in, work from the inside out, and when you know the output, set up an equation and solve for the input.
Core ideas
Words used here
- Function: a rule that turns an input into an output. f(x) = 2x + 1 means "double the input, then add 1".
- f(3), read "f of 3": the output when the input is 3. Here f(3) = 2(3) + 1 = 7. It does not mean f times 3.
- Substitute: put a number or an expression in place of a letter.
- Composition f(g(x)): use g first, then use f on the result.
- Custom symbol: a symbol such as ★ or # that the question defines with its own rule, for example a ★ b = a² − 2b.
- Commutative: the order of the inputs doesn't change the result, as in a + b = b + a. Most custom symbols are not commutative.
- f(x) is a rule: replace every x in the rule with the input, and put the input in parentheses.
- Composition: f(g(x)) means find g(x) first, then put that result into f. Work from the inside out.
- Custom symbols (a ★ b, a # b) work the same way: each position in the rule gets its own number.
- Working backward: if you know the output, set the rule equal to it and solve for the input.
- Order matters: a ★ b may be different from b ★ a.
Try it. If f(x) = 3x² − x, what is f(−2)?
Show the answer
- Replace each x with (−2): f(−2) = 3(−2)² − (−2).
- (−2)² = 4, so 3(−2)² = 12. And −(−2) = +2.
- f(−2) = 12 + 2 = 14.
Evaluating f at a number
Replace every x in the rule with the number, and put the number in parentheses. This matters most for negative inputs: the parentheses make the square positive and turn "minus a negative" into a plus.
Why it works. f(x) = 2x² − 5x + 1 is a list of instructions: square the input, double it, subtract 5 times the input, add 1. The letter x only marks where the input goes. Parentheses keep the input in one piece, so its minus sign stays with it.
How to spot it: f(3), f(−2), g(0.5): the input is a single number.
Example. If f(x) = 2x² − 5x + 1, what is f(−3)?
- Put (−3) in place of each x: f(−3) = 2(−3)² − 5(−3) + 1.
- Square first: (−3)² = 9, so 2(9) = 18.
- Multiply: −5(−3) = +15.
- Add: 18 + 15 + 1 = 34.
- Check: without the parentheses, −3² reads as −9, and the result becomes 2(−9) + 15 + 1 = −2. The parentheses are what make the square positive.
Trap: writing −3² = −9. Only (−3)² = 9. A second trap is squaring the coefficient too: 2(−3)² is 2 × 9, not (2 × 3)².
Try it. If g(x) = x² + 4x − 7, what is g(−5)?
Show the answer
- g(−5) = (−5)² + 4(−5) − 7.
- (−5)² = 25 and 4(−5) = −20.
- 25 − 20 − 7 = −2.
Edge cases.
- Inputs that aren't allowed. f(x) = 1/(x − 2) has no value at x = 2, and √x has no real value for x < 0.
- Fraction inputs work the same way. If f(x) = 4x² − 2x, then f(1/2) = 4(1/4) − 2(1/2) = 1 − 1 = 0.
- f(0) is the constant term of a polynomial: for f(x) = 2x² − 5x + 1, f(0) = 1.
GMAT-level example. If f(x) = x² − kx + 6 and f(−2) = 20, what is f(3)?
- Use the fact you know to find k: f(−2) = (−2)² − k(−2) + 6 = 4 + 2k + 6 = 10 + 2k.
- Set it equal to 20: 10 + 2k = 20, so k = 5.
- Now f(x) = x² − 5x + 6, and f(3) = 9 − 15 + 6 = 0.
- Check: f(−2) = 4 + 10 + 6 = 20 ✓.
Check yourself. If f(x) = (x² − 1)/(x + 3), what is f(−1/2)?
Check your answer
Top: (−1/2)² − 1 = 1/4 − 1 = −3/4. Bottom: −1/2 + 3 = 5/2. So f(−1/2) = (−3/4) ÷ (5/2) = (−3/4) × (2/5) = −3/10.
Evaluating f at an expression
A function f is a rule that turns an input into an output. To find f(a + 2), put the whole expression a + 2 in place of every x, keep it in parentheses, then expand and simplify.
Why it works. The rule says what happens to whatever goes in. When the input is a + 2, every x becomes the block (a + 2), so the whole rule acts on the whole input. Dropping the parentheses applies the rule to only part of the input.
How to spot it: f(a + 2), f(2x), f(1/x) or f(x + h) − f(x).
Example. If f(x) = x² − 3x, what is f(a + 2)?
First see it with a number: f(5) = 5² − 3(5) = 25 − 15 = 10. Now do the same with a + 2 in place of 5:
- f(a + 2) = (a + 2)² − 3(a + 2).
- Expand each part: (a + 2)² = (a + 2)(a + 2) = a² + 4a + 4, and 3(a + 2) = 3a + 6.
- Subtract: a² + 4a + 4 − 3a − 6 = a² + a − 2.
- Check with a = 3 (so a + 2 = 5): 9 + 3 − 2 = 10, which matches f(5) ✓.
Trap: writing a² + 2 for (a + 2)². This drops the middle term 4a.
Edge cases.
- f(2x) is not 2f(x). With f(x) = x² − 3x: f(2x) = (2x)² − 3(2x) = 4x² − 6x, but 2f(x) = 2x² − 6x.
- f(−x) changes the sign of the odd powers only: if f(x) = x³ + x², then f(−x) = −x³ + x².
- f(x + h) − f(x): expand both, and most terms cancel.
GMAT-level example. If f(x) = x² − 3x, for what value of t is f(t + 1) = f(t)?
- f(t + 1) = (t + 1)² − 3(t + 1) = t² + 2t + 1 − 3t − 3 = t² − t − 2.
- f(t) = t² − 3t.
- Set them equal: t² − t − 2 = t² − 3t. The t² terms cancel: −t − 2 = −3t.
- Add 3t to both sides and add 2: 2t = 2, so t = 1.
- Check: f(2) = 4 − 6 = −2 and f(1) = 1 − 3 = −2 ✓.
Check yourself. If f(x) = 3x − 4, what is f(2x) − 2f(x)?
Check your answer
f(2x) = 6x − 4 and 2f(x) = 6x − 8. The difference is (6x − 4) − (6x − 8) = 4, for every x.
Composition f(g(x))
Composition means using one function on the output of another. In f(g(x)), find the inner function g first, then feed its output into the outer function f. Write the in-between value down.
Why it works. f(g(x)) is an assembly line: g works on x first, then f works on whatever g hands over. Swap the order and the machines do their jobs on different numbers, so the result is usually different.
How to spot it: f(g(3)), g(f(x)), or "f applied to g".
Example. If f(x) = 2x + 1 and g(x) = x² − 4, find f(g(3)) and g(f(3)).
- f(g(3)): inner first, g(3) = 3² − 4 = 9 − 4 = 5. Then f(5) = 2(5) + 1 = 11.
- g(f(3)): inner first, f(3) = 2(3) + 1 = 7. Then g(7) = 7² − 4 = 49 − 4 = 45.
Trap: using the outer function first, which swaps the two answers.
Try it. If f(x) = x + 3 and g(x) = 2x, find f(g(4)) and g(f(4)).
Show the answer
- f(g(4)): g(4) = 2(4) = 8, then f(8) = 8 + 3 = 11.
- g(f(4)): f(4) = 4 + 3 = 7, then g(7) = 2(7) = 14.
Edge cases.
- f(f(x)) means use f twice. With f(x) = 2x + 1: f(f(x)) = 2(2x + 1) + 1 = 4x + 3.
- Compose with letters, not only numbers. With f(x) = 2x + 1 and g(x) = x² − 4, f(g(x)) = 2(x² − 4) + 1 = 2x² − 7. Check with x = 3: 2(9) − 7 = 11, as in the example ✓.
- The inner output must be allowed in the outer function. If f(x) = √x and g(x) = x − 5, then f(g(3)) = √(−2) is not a real number.
GMAT-level example. If f(x) = x² and g(x) = x + 2, for what value of x is f(g(x)) = g(f(x))?
- f(g(x)): add 2 first, then square: (x + 2)² = x² + 4x + 4.
- g(f(x)): square first, then add 2: x² + 2.
- Set them equal: x² + 4x + 4 = x² + 2. The x² terms cancel: 4x + 4 = 2.
- So 4x = −2 and x = −1/2.
- Check: f(g(−1/2)) = (3/2)² = 9/4 and g(f(−1/2)) = 1/4 + 2 = 9/4 ✓.
Check yourself. With f(x) = 2x + 1 and g(x) = x² − 4, write g(f(x)) as one expression.
Check your answer
g(f(x)) = (2x + 1)² − 4 = 4x² + 4x + 1 − 4 = 4x² + 4x − 3. Check with x = 3: 36 + 12 − 3 = 45, as in the example ✓.
Custom symbols
A custom symbol (such as ★) is defined by the question with its own rule. Copy the rule, putting each number in its own position. With nested symbols, work out the innermost parentheses first and use the result as a new input.
Why it works. The definition is the only rule; the symbol means nothing outside the question. Treat a ★ b as a function with two inputs, f(a, b) = a² − 2b: the first number fills every a, the second fills every b.
How to spot it: "for all numbers a and b, a ★ b is defined as…".
Example. For all a and b, a ★ b = a² − 2b. What is (3 ★ 1) ★ 4?
- Inner: 3 ★ 1 has a = 3 and b = 1, so 3² − 2(1) = 9 − 2 = 7.
- Outer: 7 ★ 4 has a = 7 and b = 4, so 7² − 2(4) = 49 − 8 = 41.
Some symbols describe a process instead of a formula. Say x◇ is the largest multiple of 5 that is not more than x. The multiples of 5 are 5, 10, 15, 20, 25, … so 17◇ = 15 and 23◇ = 20. Then 17◇ + 23◇ = 15 + 20 = 35. Apply the rule to each number before you combine them: (17 + 23)◇ = 40◇ = 40 is a different number.
Trap: working out 1 ★ 4 first, which uses the wrong pair.
Try it. For all a and b, a # b = ab − a. Find 4 # 5 and 5 # 4.
Show the answer
- 4 # 5: a = 4, b = 5, so 4 × 5 − 4 = 20 − 4 = 16.
- 5 # 4: a = 5, b = 4, so 5 × 4 − 5 = 20 − 5 = 15.
- The answers differ, so # is not commutative: the order of the inputs matters.
Edge cases.
- Don't swap the inputs unless the rule allows it. a ★ b = a² − 2b gives 3 ★ 1 = 7 but 1 ★ 3 = −5.
- The inputs can be letters. x ★ 3 = x² − 6. If x ★ 3 = 10, then x² = 16 and x = 4 or x = −4.
- Rules with cases. If a rule says "if n is even…, if n is odd…", decide the case for each input before you calculate.
GMAT-level example. For all numbers a and b, a ⊕ b = ab + a + b. If x ⊕ 4 = 29, what is x?
- Copy the rule with a = x and b = 4: x ⊕ 4 = 4x + x + 4 = 5x + 4.
- Set it equal to 29: 5x + 4 = 29, so 5x = 25 and x = 5.
- Check: 5 ⊕ 4 = 20 + 5 + 4 = 29 ✓.
A hidden structure helps on harder versions: ab + a + b + 1 = (a + 1)(b + 1), so a ⊕ b = (a + 1)(b + 1) − 1. Check: (5 + 1)(4 + 1) − 1 = 29 ✓.
Check yourself. If a ∆ b = (a − b)/(a + b), what is (3 ∆ 1) ∆ 2?
Check your answer
Inner: 3 ∆ 1 = 2/4 = 1/2. Outer: (1/2) ∆ 2 = (1/2 − 2)/(1/2 + 2) = (−3/2)/(5/2) = −3/5.
Finding the input from the output
If you know a function's output, set the rule equal to that output and solve for the input. For nested functions such as h(h(k)), undo one layer at a time, starting from the outside.
Why it works. Setting the rule equal to the output turns "which input gives this?" into an ordinary equation. With layers, the outer function's input is the inner function's output, so you peel from the outside in.
How to spot it: "if f(k) = 27, what is k", or h(h(k)) = some value.
Example. If h(x) = (x + 5)/2 and h(h(k)) = 9, what is k?
- Call the inner output m, so m = h(k). The outer layer says h(m) = 9, which is (m + 5)/2 = 9.
- Multiply both sides by 2: m + 5 = 18. Subtract 5 from both sides: m = 13.
- Now h(k) = 13, which is (k + 5)/2 = 13. Multiply both sides by 2: k + 5 = 26. Subtract 5: k = 21.
- Check: h(21) = 26/2 = 13, and h(13) = 18/2 = 9 ✓.
Trap: solving h(k) = 9 and stopping at k = 13.
Edge cases.
- Several inputs can give one output. If f(x) = x², then f(k) = 9 gives k = 3 or k = −3.
- Some outputs are impossible. f(x) = x² + 1 never equals 0, so f(k) = 0 has no solution.
- "Could be" vs. "must be". With f(k) = 9 above, k could be 3, but k doesn't have to be 3.
GMAT-level example. If f(x) = x² − 4x and f(k) = 12, what is the sum of all possible values of k?
- Set the rule equal to the output: k² − 4k = 12.
- Move everything to one side: k² − 4k − 12 = 0.
- Factor: (k − 6)(k + 2) = 0, so k = 6 or k = −2.
- Sum: 6 + (−2) = 4. (The sum of the roots of k² − 4k − 12 = 0 is 4 directly.)
- Check: f(6) = 36 − 24 = 12 ✓ and f(−2) = 4 + 8 = 12 ✓.
Check yourself. If g(x) = 2x − 3 and g(g(k)) = 11, what is k?
Check your answer
Outer layer: g(m) = 11 means 2m − 3 = 11, so m = 7. Inner layer: g(k) = 7 means 2k − 3 = 7, so k = 5. Check: g(5) = 7 and g(7) = 11 ✓.
How hard questions disguise it
For harder questions (L4–L5)
L4 versions define a symbol in words ("the star of n is the product of its digits") or ask which property a rule has, such as a ★ b = b ★ a for all values. At L5, functions combine with sequences, where a rule like an = f(an−1) is applied again and again, and with quadratics, where f(x) = f(2) leads to an equation you must factor. Substitute carefully, keep parentheses, and write down in-between results.
Practice
Practice functions and custom operations in timed sets on the functions practice page.
Common traps
Grouping the wrong pair
In (a ★ b) ★ c, compute a ★ b first, then combine the result with c. Starting with b ★ c gives a different number.
Stopping after the inner step
Nested operations need the rule applied once per symbol, and f(g(x)) isn't finished until the result goes through f. Count the layers and make sure you used each one.
Swapping the inputs
Custom operations are often not symmetric: a ★ b = a² − 2b treats a and b differently. Put each number exactly where the rule says.
Substituting without parentheses
Wrap every input in parentheses: if f(x) = 2x² − 3x, then f(−4) = 2(−4)² − 3(−4) = 32 + 12. Only x is squared, a square is never negative, and (x + k)² keeps its middle term.
Composing in the wrong order, or adding instead
f(g(x)) means apply g first, then feed the result into f. It is not g(f(x)), and not f(x) + g(x) or f(x) × g(x).
Misreading the rule's operations
Copy the rule symbol by symbol: a minus stays a minus, kb means k times b, and a whole product like pq must be subtracted in full. Simplify only after substituting.
Misapplying a rule that describes a process
When a symbol means 'the largest multiple of 5 not exceeding x', apply it to each number separately, round down to a multiple of 5, and only then combine.
Treating a defined property like ordinary arithmetic
If f(ab) = f(a) + f(b), then f(2⁵) = 5f(2): every repeated factor adds its value again. Break the input into prime factors and count each one.
Undoing a repeated function wrong
To solve f(f(t)) = N, undo f twice, or expand f(f(t)) fully: for f(x) = 3x + 2 it is 9t + 8, since the inner constant gets multiplied too.
Miscounting the steps when building f(n) from f(1)
Going from f(1) to f(n) one step at a time takes n − 1 steps, and extra terms kx for x = 1 to n − 1 add k × n(n − 1)/2. Write out the first two steps to check the pattern before you add.
Undoing a repeated function in one step
To solve f(f(f(t))) = R, undo f from the outside in: add, then divide, once for each application. The early constants get multiplied again, so they don't simply add up.