Mapping Diagrams

Category: Functions   Level: 201

function: each input has exactly one arrow out

Draw the inputs in one oval and the possible outputs in another, then draw an arrow for each pair. A function sends exactly one arrow out of every input. On a graph this becomes the vertical line test.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Draw the inputs and outputs

Put the inputs in the left oval, the domain. Put the outputs we allow in the right oval, the codomain. The rule is: square it.

domain {-2, -1, 1, 2}, codomain {1, 4, 9}

Step 1: Draw the inputs and outputs

Step 2: Draw one arrow per input

Each input gets one arrow to its square. Two inputs may share an output: −2 and 2 both go to 4. That is fine. A function only forbids one input with two outputs.

-2 → 4, -1 → 1, 1 → 1, 2 → 4

Step 2: Draw one arrow per input

Step 3: Read the range

The range is the outputs that actually get hit: 1 and 4. Nobody sends an arrow to 9. It sits in the codomain, unused, like a spare chair.

range = {1, 4} ⊂ codomain

Step 3: Read the range

Step 4: Break the rule

Now pair each x with every y where y² = x. The input 1 sends arrows to 1 and −1, and 4 sends arrows to 2 and −2. Two arrows from one input: not a function.

1 → ± 1, 4 → ± 2: two outputs, so no function

Step 4: Break the rule

Step 5: Turn arrows into a graph

Plot each arrow as a point (input, output). A vertical line x = 1 picks one input. It hits y = x² once, but it hits y² = x twice. One hit means function.

vertical line test: at most one hit per vertical line

Step 5: Turn arrows into a graph

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render mapping-diagram --out /tmp/mapping-diagram

Source: svgmath/diagrams/function_basics.py