Quarry School

A function gives one answer to each input

Subject: MathematicsLeans on: Ordered pairs and sets
Level 1 · FoundationsAbout 9 min read14 new termsKeystone idea. Later lessons build on this one.
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

    Picture a vending machine with a fixed menu.

    Rule

    A relation is a set of ordered pairs (input, output). It is a function when every input in its domain has exactly one output. The range is the set of outputs it produces.

    Step

    1. Name what you are starting with; that quantity is the input.

    2. Name what you want to find; that quantity is the output.

    3. Inspect every input and its assigned outputs.

    4. Accept shared outputs. Reject an input with two different outputs.

    5. List distinct inputs as the domain and distinct outputs as the range.

    Question

    Decide whether each relation gives one output per input.
    (a) {(1, 2), (2, 4), (3, 6), (4, 8), (5, 10)}
    (b) {(1, 3), (2, 5), (1, 7)}

    Answer

    (a) function.
    Domain: {1, 2, 3, 4, 5}.
    Range: {2, 4, 6, 8, 10}.
    (b) Not a function. Input 1 has outputs 3 and 7.

    Trap

    Checking for repeated outputs instead of conflicting inputs. Two arrows arriving together are allowed; two arrows leaving one input for different answers are not.

    Strategy

    1. Name what you are starting with; that quantity is the input.

    2. Name what you want to find; that quantity is the output.

    3. Inspect every input and its assigned outputs.

    4. Accept shared outputs. Reject an input with two different outputs.

    5. List distinct inputs as the domain and distinct outputs as the range.

    Term

    Relation

    Definition

    A set of ordered pairs that connects inputs with outputs. It can have conflicting outputs and need not be a function.

    Term

    Set

    Definition

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

    Term

    Natural numbers

    Definition

    The counting numbers 1, 2, 3 and so on, using this convention.

    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

    Independent variable

    Definition

    The input variable. You choose its value from the domain before the rule gives a result.

    Term

    Dependent variable

    Definition

    The output variable. Its value is determined by the chosen input and the rule.

    Term

    Domain

    Definition

    The set of all inputs accepted by the defined relation or function.

    Term

    Range

    Definition

    The set of all outputs actually produced by the defined relation or function.

    Term

    Equation

    Definition

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

    Term

    Solve

    Definition

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

    Term

    Graph

    Definition

    A picture of ordered pairs at their coordinate locations. A graph of a function contains every pair (x, f(x)) for its allowed inputs.

    Term

    Coordinate

    Definition

    One number in a point's ordered address.

    Term

    Odd

    Definition

    An integer that is not divisible by 2 into an integer result.

    Term

    Even

    Definition

    An integer divisible by 2 into an integer result.

    Term

    →

    Definition

    An arrow showing which output is paired with an input. Read it goes to.

    1 In plain words

    Picture a vending machine with a fixed menu. You choose a button. That choice is the input. The snack it gives you is the output. Any collection of these matched choices and results is a relation, like a list of (button, snack) pairs. A function is a relation that gives exactly one answer for each allowed choice.

    Two buttons may both give crackers. Each button still has one answer. Trouble begins if one button is assigned both crackers and pretzels, with no instruction choosing between them.

    The domain lists the allowed inputs. The range lists only outputs that actually appear. You will read the same matched pairs in lists, tables, pictures, and formulas.

    2 Picture it

    Button AFixed menuinputoutputCrackers
    An allowed button determines one snack.

    Reminder

    Reminder: Ordered pairs and sets
    • Ordered pairs and sets. (1, 2) records input 1 followed by output 2. A set such as {2, 4} lists distinct values.

    3 Why

    A relationship is useful as a function because knowing an input settles the output. If one input had two different assigned outputs, a request for its value would have no definite answer. Repeated outputs do not cause that problem: you still know what happens at each input. You must choose the direction first. A menu can identify a price from an item even when a price cannot identify a unique item.

    4 The rule

    A relation is a set of ordered pairs (input, output).

    It is a function when every input in its domain has exactly one output. The range is the set of outputs it produces.

    The same idea, five ways

    Say it

    y is a function of x.

    Write it

    Each allowed input has exactly one output. In f(x) = 2x, f names the doubling rule, x is the input, and f(x), read f of x, is its output.

    In math
    • {(1, 2), (2, 4), (3, 6)}
    • y = 2x
    • f(x) = 2x
    • On a graph, each allowed horizontal input has one height.
    Like

    One accepted vending-machine button selects one snack.

    See it
    123246function
    Each input sends one arrow to its output.

    The same idea, other ways

    As a machine

    One allowed button must settle which snack the rule gives. A missing choice is outside the domain.

    AMenuinputoutputCrackers
    A gives a definite output.
    As arrows

    Many arrows may arrive at the same output. Each input must send exactly one arrow.

    ABCCrackersPretzelsfunction
    Different inputs may share crackers.
    As a question

    Start with an item and ask its price. If the menu has one price per item, your question has a definite answer.

    With numbers

    The rule x2 gives 4 at both 2 and −2. Each individual input still has only one square.

    Given asHow to check
    Ordered pairsNo input has two different paired outputs.
    A tableCompare all columns sharing the same input.
    A graphSlide an upright ruler across the graph. Two contacts at the same horizontal position mean one input has two outputs. The line-test lesson explains this picture.
    An equationChoose an input and find every permitted output. For x2 + y2 = 1 at x = 0, y = 1 and y = −1 both work, so this relation fails.

    Part 1: Domain and range

    The domain is the menu of accepted inputs. The range is the collection of answers actually reached. A relation has a domain and range even if it fails to be a function. Read each pair as input first, output second. The range lists only outputs that actually appear.

    • Domain: first coordinates of the ordered pairs.
    • Range: second coordinates of the ordered pairs, without duplicate set members.
    • Inputs may be numbers or labels. Natural numbers are 1, 2, 3 and so on.
    -20240function
    -2 → 4, 0 → 0 and 2 → 4: a function.

    The same idea, five ways

    Say it

    Domain means what may go in. Range means what comes out.

    Write it

    List each distinct input once for domain and each distinct output once for range.

    In math
    • {(−2,4),(0,0),(2,4)}
    • Domain: {−2, 0, 2}
    • Range: {0, 4}
    Like

    The available buttons and the available snacks are different lists.

    See it
    -20240function
    The same picture again: -2 → 4, 0 → 0 and 2 → 4: a function.

    Worked example

    Shared outputs do not add extra range members

    For the relation {(−2, 4), (0, 0), (2, 4)}, decide function status and list its domain and range.

    What it asks. Decide whether the three listed inputs each have one output, then list domain and range.

    Show the steps and the answer

    The plan. Read every first coordinate, then every second coordinate. Remove repeated set members, then check the input arrows.

    -20240function
    The same picture a third time: -2 → 4, 0 → 0 and 2 → 4: a function.
    1. Plan. Read every first coordinate, then every second coordinate. Remove repeated set members, then check the input arrows.
    2. The first numbers are −2, 0, and 2.
    3. The output 4 appears twice, but it is one range member.
    1. Read the three first coordinates: −2, 0 and 2.These are the accepted inputs.
    2. Read the second coordinates: 4, 0 and 4, then list the distinct values 0 and 4.Range is a set, so a repeated output is listed once.
    3. Check each input's arrows. Each input points to only one output.Different inputs may share the output 4 without creating ambiguity at either input.
    Answer
    • Function.
    • Domain: {−2, 0, 2}.
    • Range: {0, 4}.
    Double-check This is the rule 'square the input' restricted to the three listed inputs, and each square matches its pair.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: The range of {(1, 2), (3, 2)} has two distinct members because the output 2 appears twice.
    Two occurrences of the same value do not make two different set members.
    ✓ Instead: The range has one member: {2}.

    Tips and tricks

    • Read first coordinates for domain and second coordinates for range.
    • As a guest list: The domain names who may enter; the range names results that actually occur.
    • As two collections: In {(1, 2), (3, 2)}, the domain has two members and the range has one.

    Part 2: Odd and even labels

    Odd and even sort whole counting numbers into two labels. Even numbers split into pairs with nothing left over; odd numbers leave one unpaired object. A label can describe many numbers, so starting with the label does not choose one particular number.

    • 2 and 4 are even because 2 = 2 × 1 and 4 = 2 × 2.
    • 1, 3 and 5 are odd because each leaves one after pairing.
    • Number to label, odd or even, is a function for these inputs. Label to number is not, because one label names several numbers.
    OddEven12345not a function
    Odd → 1, Even → 2, Odd → 3, Even → 4 and Odd → 5: not a function.

    The same idea, five ways

    Say it

    An even number makes complete pairs. An odd number leaves one over.

    Write it

    Starting with a number tells you its label; starting with the label does not identify one number.

    In math
    • 2 → even
    • 4 → even
    • 1 → Odd
    • 3 → Odd
    • Odd → 1 and Odd → 3
    Like

    Four chairs form two pairs. Three chairs leave one chair unpaired.

    See it
    OddEven12345not a function
    The same picture again: Odd → 1, Even → 2, Odd → 3, Even → 4 and Odd → 5: not a function.

    Worked example

    Odd and even labels do not determine a unique number

    OpenStax problem

    In the pictured relation, each label points to natural numbers of that type. Does the label determine a number as a function?

    What it asks. Starting with Odd or even, can you recover one number?

    Show the steps and the answer

    The plan. Read every arrow leaving each label. If a label has several different destinations, label to number is not a function.

    OddEven12345not a function
    The same picture a third time: Odd → 1, Even → 2, Odd → 3, Even → 4 and Odd → 5: not a function.
    1. Plan. Read every arrow leaving each label. If a label has several different destinations, label to number is not a function.
    2. Odd is the starting label in three of the arrows.
    3. A label input must obey the same one-output condition as a number input.
    1. Odd means a counting number not divisible into whole-number pairs; even means one divisible into such pairs.The input labels need meanings before their outputs can be interpreted.
    2. Input Odd points to 1, 3 and 5.Each of those listed natural numbers is odd.
    3. Input even points to 2 and 4.Each of those listed natural numbers is even.
    4. Reject function status for the direction label to number.Each input label is assigned several different outputs.
    Answer
    Not a function from label to number.
    Double-check Reverse the listed pairs. Every number from 1 through 5 has one label, so number to label is a function. Changing direction changes the question.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: Odd identifies one number because it is one word.
    One input word can still have several assigned outputs.
    ✓ Instead: Odd maps to 1, 3 and 5 in this relation, so it does not determine a unique output.

    Tips and tricks

    • Labels can be inputs; test their assigned outputs the same way you test numeric inputs.
    • As pairing: Four chairs form two pairs. Five chairs form two pairs and one leftover chair.
    • As grouped labels: The word Odd describes several choices, so it cannot tell you which number was chosen.

    Part 3: Choose the direction

    You decide which row is the starting row. A price list can answer 'What does tea cost?' even when it cannot answer 'What item costs three dollars?' Directions are part of the question, not a feature you can ignore.

    • The independent variable is the input you choose from the domain.
    • The dependent variable is the output determined by that input.
    input itemoutput dollarsTea3Cocoa4Juice3
    item: Tea, Cocoa, Juice; dollars: 3, 4, 3.

    The same idea, five ways

    Say it

    Price is a function of item.

    Write it

    Start with the item to find its price. Reversing the direction asks a different question.

    In math
    • Tea → 3
    • Juice → 3
    • 3 → Tea and 3 → Juice
    Like

    Two snacks can have the same price, so the receipt alone may not name the snack.

    See it
    input itemoutput dollarsTea3Cocoa4Juice3
    The same picture again: item: Tea, Cocoa, Juice; dollars: 3, 4, 3.

    Worked example

    Read a menu in both directions

    The pictured menu assigns a price to each item. Is price a function of item? Is item a function of price?

    What it asks. Check item to price, then check price to item.

    input itemoutput dollarsTea3Cocoa4Juice3
    The same picture a third time: item: Tea, Cocoa, Juice; dollars: 3, 4, 3.
    Show the steps and the answer

    The plan. Choose the input row first. Follow each column to its partner. Reverse the rows and check again.

    input itemoutput dollarsTea3Cocoa4Juice3
    The same picture, shown 4 times now: item: Tea, Cocoa, Juice; dollars: 3, 4, 3.
    1. Plan. Choose the input row first. Follow each column to its partner. Reverse the rows and check again.
    2. Tea and Juice both give 3 dollars.
    3. When 3 dollars becomes the input, count all the item outputs.
    1. Read the columns from item to price: tea gives 3, cocoa gives 4, and juice gives 3.Each item has a single listed price.
    2. Reverse the direction. Input price 3 gives both tea and juice.The reversed relationship has one input with two different outputs.
    3. Conclude that item-to-price is a function and price-to-item is not.Function status depends on which quantity you chose as input.
    Answer
    • Price is a function of item.
    • Item is not a function of price.
    Double-check Two items sharing a price causes no uncertainty when you start with an item. It creates uncertainty when you start with price 3.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: A menu is a function in both directions because every item has a price.
    Shared prices create several outputs if price becomes the input.
    ✓ Instead: Check each chosen direction separately.

    Tips and tricks

    • Write 'input → output' in words before deciding function status.
    • As a menu: An item selects one price, while one price can name several items.
    • As a reversed lookup: Start with Tea and the answer is 3. Start with 3 and both Tea and Juice match.

    5 How

    1. Name what you are starting with; that quantity is the input.
    2. Name what you want to find; that quantity is the output.
    3. Inspect every input and its assigned outputs.
    4. Accept shared outputs. Reject an input with two different outputs.
    5. List distinct inputs as the domain and distinct outputs as the range.

    Check one output for each input

    1
    Are the pairs listed or arranged in a table?
    YesFind repeated inputs and compare the outputs assigned to each. A matching repeated pair causes no conflict.
    NoUse the graph or equation branch.
    ↓
    2
    Is one input assigned two different outputs?
    YesWrite not a function, followed by that input and both outputs.
    NoEvery listed input has one output, so the listed relation is a function.
    ↓
    3
    Are you given a graph?
    YesSlide an upright ruler across it. If one horizontal input position has two graph heights, the relation is not a function.
    NoFor an equation, choose an input and solve for every possible output. Two different outputs at one input disprove a function.
    1. Name what you are starting with; that quantity is the input.
    2. Name what you want to find; that quantity is the output.
    3. Inspect every input and its assigned outputs.
    4. Accept shared outputs. Reject an input with two different outputs.
    5. List distinct inputs as the domain and distinct outputs as the range.

    6 Worked example

    Worked example

    Function or not from ordered pairs

    OpenStax problem

    Decide whether each relation gives one output per input.
    (a) {(1, 2), (2, 4), (3, 6), (4, 8), (5, 10)}
    (b) {(1, 3), (2, 5), (1, 7)}

    What it asks. For each list, does one input have two different outputs? Also list the first relation’s allowed inputs and actual outputs.

    Show the steps and the answer

    The plan. Read the first number in each pair as input. Compare pairs with the same input, then collect distinct first and second numbers.

    12345246810function
    In (a), each input sends one arrow.
    12357not a function
    Two arrows leave input 1 for different outputs.
    1. Plan. Read the first number in each pair as input. Compare pairs with the same input, then collect distinct first and second numbers.
    2. In (1, 3), 1 is the input and 3 is its output.
    3. In list (b), find both pairs whose first number is 1.
    1. For (a), each of the inputs 1, 2, 3, 4 and 5 has one paired output.The first coordinate is the input, and none has conflicting outputs.
    2. Collect the domain {1, 2, 3, 4, 5} and the range {2, 4, 6, 8, 10}.Domain lists accepted inputs; range lists produced outputs.
    3. For (b), input 1 pairs with both 3 and 7.A function cannot give two different answers for the same input.
    Answer
    • (a) function.
    • Domain: {1, 2, 3, 4, 5}.
    • Range: {2, 4, 6, 8, 10}.
    • (b) Not a function. Input 1 has outputs 3 and 7.
    Double-check In (a), the instruction 'double the input' gives the listed output every time. In (b), asking for the output at 1 leaves two competing answers.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: Input 1 has output 3 and output 7, so choose whichever you prefer.
    The relation itself must assign a definite answer; choosing later changes the problem.
    ✓ Instead: This relation is not a function.
    ✗ Not this: Two inputs share output 4, so it is not a function.
    Neither input has conflicting outputs.
    ✓ Instead: It can be a function; shared outputs are allowed.
    ✗ Not this: Write the range of {(−2, 4), (0, 0), (2, 4)} as [0, 4].
    That interval includes every number between 0 and 4, but the relation produces only 0 and 4.
    ✓ Instead: Write the separate outputs in braces: {0, 4}.

    Tips and tricks

    • First identify the input. The phrase 'B is a function of A' means start with A and find B.
    • Memory cue: one arrow OUT of each input. Many arrows IN to one output are allowed.
    • On the exam, give the evidence: not a function, because input 1 has outputs 3 and 7.
    • A few separate values go in braces, such as {0, 4}. An interval means a whole stretch, such as [0, 4], which also contains 1 and 2.5.

    7 The trap

    Checking for repeated outputs instead of conflicting inputs. Two arrows arriving together are allowed; two arrows leaving one input for different answers are not.

    Comes back in

    Problems marked OpenStax come from Precalculus 2e by Jay Abramson, published by OpenStax, under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions.