Skip to content
Family Table Math

Relations and Functions

A relation is any rule or set of ordered pairs that connects inputs to outputs. A function is a special relation where every input has exactly one output. Almost everything you’ll study this year is a function, so learning to recognize one is the first step.

A relation pairs each input xx with an output yy, written as ordered pairs (x,y)(x, y). You can show the same relation in several ways:

  • a list of ordered pairs, like {(1,4),(2,5),(3,4)}\{(1, 4), (2, 5), (3, 4)\}
  • a table of values
  • a mapping diagram, with arrows from each input to its output(s), like 1↦41 \mapsto 4
  • a graph
  • an equation, like y=x2y = x^2

A relation is a function if each input has exactly one output.

  • Two different inputs can share the same output. That’s fine.
  • One input with two different outputs is not allowed.

Think of a vending machine: press B4 and you should get the same snack every time. If B4 sometimes gave chips and sometimes gave a granola bar, the machine wouldn’t be a function.

  • One-to-one function: every output comes from just one input. Example: y=2xy = 2x.
  • Many-to-one function: some output comes from more than one input. Example: y=x2y = x^2, where both x=2x = 2 and x=−2x = -2 give y=4y = 4.
  • One-to-many (one input, several outputs) is not a function.

On a graph, an input is an xx-value, so all the points with that input lie on one vertical line.

A graph is a function if no vertical line crosses it more than once.

Vertical line test on two graphs −2 2 −2 2 Function y = x² − 2 −2 2 −2 2 Not a function x = y² − 2
The line x=1x = 1 crosses y=x2−2y = x^2 - 2 once, but crosses x=y2−2x = y^2 - 2 twice.

To check an equation, ask: can one xx-value give two different yy-values? A quick way is to try a value of xx and solve for yy.

  • y=x2−2y = x^2 - 2: each xx gives one yy. Function.
  • x=y2−2x = y^2 - 2: x=2x = 2 gives y2=4y^2 = 4, so y=2y = 2 or y=−2y = -2. Not a function.

Is each relation a function?

(a) {(1,4),(2,5),(3,4),(4,7)}\{(1, 4), (2, 5), (3, 4), (4, 7)\}

(b) {(2,1),(2,3),(5,0)}\{(2, 1), (2, 3), (5, 0)\}

Solution.

(a) The inputs are 1,2,3,41, 2, 3, 4, and each appears once. It’s a function. The output 44 appears twice (from 11 and 33), which is allowed. It’s a many-to-one function.

(b) The input 22 is paired with both 11 and 33. Not a function.

xx−1-1001122
yy33113399

Is this relation a function? If so, is it one-to-one or many-to-one?

Solution. Each input appears once, so it’s a function. The output 33 comes from two inputs (−1-1 and 11), so it is many-to-one.

Which of these are functions?

(a) y=3x−4y = 3x - 4 \qquad (b) x2+y2=9x^2 + y^2 = 9 \qquad (c) y=xy = \sqrt{x}

Solution.

(a) Each xx gives one value of 3x−43x - 4. Function (one-to-one; its graph is a slanted line).

(b) Try x=0x = 0: y2=9y^2 = 9, so y=3y = 3 or y=−3y = -3. One input, two outputs. Not a function. (Its graph is a circle, which fails the vertical line test.)

(c) x\sqrt{x} means the positive square root, so each x≥0x \ge 0 gives exactly one yy. Function.

Thinking a repeated output breaks the rule. {(1,5),(2,5)}\{(1, 5), (2, 5)\} is a function. The rule is about inputs: one input can’t have two outputs.

Using a horizontal line instead of a vertical one. The vertical line test checks for a function. A horizontal line test checks something else (whether the function is one-to-one), which matters later for inverse functions.

Worrying about a repeated pair. If (2,5)(2, 5) is listed twice, it’s still the same input with the same output. That’s fine.

Assuming every equation is a function. Circles, like x2+y2=9x^2 + y^2 = 9, and sideways parabolas, like x=y2x = y^2, are relations but not functions. Test a value of xx when you’re unsure.

1. (Warm-up) Is {(−3,2),(0,2),(4,2)}\{(-3, 2), (0, 2), (4, 2)\} a function?

Solution

Yes. Each input (−3-3, 00, 44) has exactly one output. All three share the output 22, which is allowed (many-to-one).

2. (Warm-up) Is {(1,5),(3,−2),(1,7),(6,0)}\{(1, 5), (3, -2), (1, 7), (6, 0)\} a function?

Solution

No. The input 11 is paired with both 55 and 77.

3. (Warm-up) The points (2,5)(2, 5) and (2,−1)(2, -1) are both on a graph. Can the graph be a function?

Solution

No. Both points have the input x=2x = 2 but different outputs, so the vertical line x=2x = 2 crosses the graph twice.

4. (Core) Is this relation a function? If so, is it one-to-one or many-to-one?

xx−2-2−1-1001122
yy4411001144
Solution

Each input appears once, so it’s a function. Outputs 44 and 11 each come from two inputs, so it’s many-to-one. (These values fit y=x2y = x^2.)

5. (Core) Decide whether each equation is a function.

  • (a) y=2x2−1y = 2x^2 - 1
  • (b) y2=x+4y^2 = x + 4
  • (c) y=1xy = \dfrac{1}{x}
  • (d) x=3x = 3
Solution

(a) Function. Each xx gives one value of 2x2−12x^2 - 1.

(b) Not a function. For x=0x = 0, y2=4y^2 = 4, so y=2y = 2 or y=−2y = -2.

(c) Function. Each x≠0x \ne 0 gives one value of 1x\dfrac{1}{x}. It’s one-to-one.

(d) Not a function. Every point on this graph has x=3x = 3, so the single input 33 has infinitely many outputs. (The graph is itself a vertical line.)

6. (Core) Is each relation a function? Explain.

  • (a) Each student in your class is paired with the month they were born in.
  • (b) Each month is paired with the students in your class born in that month.
Solution

(a) Function. Every student has exactly one birth month. Many students can share a month, so it’s many-to-one.

(b) Not a function (in most classes). A month like March could be paired with several students, so one input has several outputs.

7. (Challenge) For which values of kk is {(k,2),(3,5),(1,2)}\{(k, 2), (3, 5), (1, 2)\} a function?

Solution

The only problem would be the input 33 having two different outputs. That happens if k=3k = 3, because then (3,2)(3, 2) and (3,5)(3, 5) are both in the relation.

If k=1k = 1, the pair (1,2)(1, 2) just appears twice, which is fine.

So the relation is a function for every value of kk except 33.

8. (Challenge) The circle x2+y2=25x^2 + y^2 = 25 is not a function, but its top half, y=25−x2y = \sqrt{25 - x^2}, is. Explain why.

Solution

Solving the circle’s equation for yy gives y=±25−x2y = \pm\sqrt{25 - x^2}. For any xx between −5-5 and 55, that’s two outputs (one positive, one negative), so the circle fails the vertical line test.

The top half keeps only the positive square root, y=25−x2y = \sqrt{25 - x^2}. Now each xx from −5-5 to 55 gives exactly one yy, so every vertical line crosses it at most once.