Britannica Sources used in this answer

How does a mathematical function assign an output to each input?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In mathematics, a function defines a relationship between an independent variable (the input) and a dependent variable (the output) through a specific rule or law.1

The process of assigning an output to an input works as follows:

  • Rule-based Assignment: For every numerical value assigned to an independent variable x, there is a defined rule that determines a unique value for the dependent variable y.1
  • Uniqueness: A fundamental requirement of a function is that for every input x, there must be exactly one corresponding output f(x). An input cannot result in more than one value.1
  • Mapping: In the language of set theory, a function acts as a mapping, where each element from a set known as the domain is assigned to a particular element in another set, known as the range.21

When represented graphically in the x-y plane, this relationship is verified by the vertical line test: a relation is a function only if any vertical line passes through no more than one point on the curve.1