2.2.4 · D2Functions

Visual walkthrough — Vertical line test for functions

1,593 words7 min readBack to topic

Step 1 — What is a point on the plane?

WHAT. Before any test, we need the stage: a flat sheet with two number lines crossing at right angles. The horizontal one we call the ==-axis== (it holds the input). The vertical one is the ==-axis== (it holds the output).

A single dot is written . Read it as an address:

  • The first slot = go right (positive) or left (negative) along the flat axis.
  • The second slot = go up (positive) or down (negative).

WHY. Every graph we test is just a crowd of these dots. If we cannot read one dot, we cannot read a graph. So we start here.

PICTURE. The red dot sits at : three steps right, two steps up. Notice the two dashed guide-lines — one vertical from the -axis, one horizontal from the -axis — meeting exactly at the dot.


Step 2 — What does "input → output" mean as a rule?

WHAT. A function is a machine with one law: feed it one , it hands back exactly one . We write that handing-back as , read " equals of ":

The word exactly is the whole game. Not "at least one." Not "some." Exactly one.

WHY. If pressing button could drop either or , you'd never know what the machine will do. A rule you cannot predict is not a rule. So we demand: one , one . (This is the formal statement in 2.1.01-Definition-of-a-function.)

PICTURE. Left machine: input → single output . Good. Right machine: input two outputs and at once. Broken — the arrow splits.


Step 3 — Stacking dots that share the same

WHAT. Take that broken case and draw both dots on our plane. Input produced and , so we plot and .

Look at their addresses side by side:

The first slots are identical; only the second slots differ.

WHY. Two dots with the same but different are the fingerprint of a broken machine. We want a way to see that fingerprint instantly, without reading numbers. That is what the next step invents.

PICTURE. Two coral dots sit stacked vertically above the same spot on the axis. They line up perfectly one above the other — because they share the -address.


Step 4 — Inventing the vertical line

WHAT. A vertical line at is the set of all dots whose first slot equals :

Term by term:

  • is frozen — every dot on this line has the same .
  • is free — it slides through every possible height.

So one vertical line is a probe that asks a single question: "At the input , which outputs does the graph offer?"

WHY. Why vertical and not slanted or horizontal? Because we are testing the input. Freezing and sweeping every is exactly the act of pressing one button and watching everything that falls out. A horizontal line would freeze the output instead — a different question (that's 2.2.05-Horizontal-line-test-for-injective-functions).

PICTURE. The lavender vertical line stands at . An arrow slides up and down it, showing ranging freely while stays pinned at .


Step 5 — Counting crossings = counting outputs

WHAT. Now drop the vertical line onto a graph and count how many dots it touches. Each touch is one point that lives on both the line and the graph — i.e. one output the machine gives for input .

WHY. This is the bridge. The line already collects "all dots with ." The graph already stores "all outputs of the machine." Where they overlap is precisely "outputs at ." Counting overlaps is counting outputs — no algebra needed.

PICTURE. Same lavender line at , now laid over the broken graph. It punches through both coral dots — two crossings, glowing.


Step 6 — Reading the verdict

WHAT. Translate the count straight into a ruling:

A relation is a function when every vertical line gives or crossing — never more.

WHY. Look back at Step 2: the law was exactly one output. " or " says "at most one," which allows the machine to simply be silent at some inputs (undefined there) while never being greedy (two answers). Silence is allowed; greed is not.

PICTURE. Three vertical lines side by side over one graph: one misses entirely (0), one grazes a single dot (1, green tick), one skewers two dots (2, red cross).


Step 7 — The edge cases we must not skip

WHAT. Four situations trip people up. We show each so no scenario surprises you.

  1. A gap in the graph (like at ): the line finds zero crossings there → allowed.
  2. A wavy graph (like ): it wiggles a lot, but every vertical line still hits it once → passes.
  3. A vertical line drawn ON the graph (like the relation itself): the line overlaps infinitely → fails hard.
  4. A single stacked pair (our circle at just one ): even one bad vertical line is enough to fail the whole graph.

WHY. The rule says every vertical line must behave. A graph can look tame for a thousand lines and still fail on the one line you didn't check. And it can look wild (waves, gaps) yet pass everywhere. Shape is a distraction; crossing-count is the only judge.

PICTURE. Four mini-panels: (a) gap → 0, (b) wave → 1 everywhere, (c) the line → infinite, (d) circle → 2 at one spot.


The one-picture summary

Everything above, compressed: the vertical line is a probe that freezes , sweeps , and counts outputs by counting crossings. Zero or one → function. Two or more → not.

Recall Feynman retelling — say it back in plain words

Imagine a snack machine. Pressing a button is choosing an . Whatever drops out is the . A proper machine gives you exactly one snack per press. To catch a broken machine, I take a see-through ruler, hold it straight up-and-down at one button, and slide my eye along it counting how many snacks live at that button. If I ever count two, the machine is a cheat — it's not a function. If I count one, it's honest for that button. If I count zero, the button is just empty, which is fine. I repeat for every button. Only if no button ever coughs up two-or-more snacks do I call the machine a real function. The ruler is the vertical line; the count is the whole test.

Recall Quick self-check

Why vertical and not horizontal? ::: Vertical freezes the input and sweeps outputs — exactly the "one input, one output" question. Horizontal tests the output side (injectivity). A vertical line hits a graph zero times at . Does the graph fail? ::: No — zero crossings means is simply not in the domain. "At most one" allows zero. A graph is a wild wiggly wave but every vertical line hits once. Function? ::: Yes. Shape is irrelevant; only the crossing-count matters.


Connections

  • 2.1.01-Definition-of-a-function — the "exactly one output" law this test draws
  • 2.2.01-Graph-of-a-function — what the crowd of dots means
  • 2.2.05-Horizontal-line-test-for-injective-functions — the mirror-image test on outputs
  • 2.3.02-Domain-and-rangefrom-graphs — reading where a function is defined
  • 3.1.01-Inverse-functions — needs both line tests to pass

#flashcards/maths

One vertical line at represents what set of points?
All points with frozen at and free — i.e. every possible output at input .
Two crossings of a vertical line means what?
One input has two outputs, breaking the "exactly one output" rule → not a function.
Is a graph with a gap (undefined at some ) still possibly a function?
Yes — zero crossings there is allowed; the test requires at most one, not exactly one everywhere.