Relations and Functions

What turns a relation into a function? A temperature-over-the-day example, why a constant speed still counts, and the vertical line test that turns the rule into a quick visual check.

--

A relation connects two sets. A function is a relation that obeys one extra rule. Everything in this lesson is really just that one rule, seen from a few different angles.

The Setup Temperature through the day
6am, 16° 3pm, 28° 6pm, 20°
Time sits on the horizontal axis — the independent variable, because we choose it freely. Temperature sits on the vertical axis — the dependent variable, because its value depends on the time we picked.
The Rule One input, one output

For a relation to be a function, every value of the independent variable must correspond to exactly one value of the dependent variable. Ask for the temperature at 6 o’clock and you must get back exactly one reading — never two.

A common misunderstanding: different inputs are allowed to share the same output. What is never allowed is one input producing two different outputs.

Example A constant speed is still a function
12 o’clock 5 o’clock 140 km/h
A car holds a constant km/h from 12 to 5 o’clock. Every hour along the way shares the same speed — and that is still perfectly fine. Each individual time gives exactly one speed reading; it just happens to be the same reading every time.

It would make no sense to say the car was travelling at both and km/h at 1 o’clock. It makes complete sense to say it held km/h at 1, 2, and 3 o’clock.

The Test Slide a vertical line across the graph

If a vertical line crosses the graph at no more than one point, wherever you place it, the graph is a function — because that means every x has only one y.

1 crossing — function 2 crossings — not 3 crossings — not
Summary
  1. A relation connects an independent variable (x) to a dependent variable (y).
  2. It is a function only when every x gives exactly one y.
  3. Different x values are allowed to share the same y — a constant speed of 140 km/h is still a function.
  4. The vertical line test turns the rule into a quick check: more than one crossing at any x means it fails.