Functions

Reliable ice cream machines

2-minute read
Made by ChickenFryBytes Studios
Table of Contents

An ordered pair is simply a pair of items written in a particular order e.g. $(a,b)$ where $a$ is the $x$ value and $b$ is the $y$ value.

Relations

A relation is a set of ordered pairs. Relations can be one of four types:

  • One-to-one where one input has exactly one output e.g. one husband can only have one wife at any time
  • One-to-many where one input has many outputs e.g. one drummer can play for many bands
  • Many-to-one where many inputs can produce the same output e.g. many persons can follow a celebrity
  • Many-to-many where many inputs can have one output and one input can have many outputs e.g. children each have two parents and any parent can have many children

Functions

Functions are relations where any input can have at most one output. This means that one-to-many and many-to-many relations do not qualify as functions. A function must be deterministic meaning that the same input will always produce the same output every time. Thus there are only two types of relations that qualify as functions:

  • One-to-one relations
  • Many-to-one relations

The reliable ice cream machine analogy

You can think of functions as being reliable ice cream machines. When you put in one ingredient you get a flavour of ice cream dependent upon that ingredient. For example, chocolate will give chocolate ice cream and strawberry will give strawberry ice cream. It is possible, as is the case of many-to-one functions, that you can input chocolate syrup and still get an output of chocolate ice cream but that does not change the fact that chocolate begets chocolate ice cream.

The ice cream machine is reliable because we can expect that strawberry always begets strawberry ice cream. It will not produce strawberry ice cream one time and then banana ice cream another time (thus ruling out one-to-many and many-to-many relations). We can rely on it to produce the same output for any given input every single time.

The vertical line test

Testing if a relation qualifies as a function is as easy as drawing a vertical line on the graph of the relation. If it is possible to draw such a vertical line at any point on the graph and have the line intersect with the curve more than once then the relation does not work as a function. Many intersections with the vertical line implies that one input ($x$ value) has many outputs ($y$ values).

Domain and range of a function

Created using natural intelligence

Like our content? Support us via Donations