Overview

A function is a fundamental concept in mathematics that describes a rule or correspondence assigning each element of one collection to exactly one element of another. In formal language a function is a kind of mathematical object that pairs inputs with outputs. Inputs and outputs may be numbers, vectors, geometric points, strings, or any members of well-defined sets. This pairing can be given by a formula, a table, an algorithm, or any unambiguous procedure. FunctionProcess.png

Basic definition and notation

Given two sets X and Y, a function f from X to Y is written f: X → Y and means every element x in X is associated to a single element f(x) in Y. The set X is the domain, Y is the codomain, and the collection of actual outputs {f(x): x in X} is the range or image. Standard notation uses letters such as f, g, h and an expression f(x) to denote the value at input x. More on formal definitions and related structures can be found via definitions and introductory texts about set theory or maps.

Key properties and special types

Functions are classified by how inputs and outputs relate. Important properties include:

  • Injective (one-to-one): distinct inputs give distinct outputs.
  • Surjective (onto): every element of the codomain is produced by some input.
  • Bijective: both injective and surjective; such functions have inverses.
  • Continuous or differentiable when domain and codomain carry topology or calculus structure.

Functions can be composed: if f: X → Y and g: Y → Z then g∘f is the function from X to Z that applies f then g. Algebraic operations, limits and other constructions create new functions from old ones; see general references on function properties.

Examples and constructions

Simple examples illustrate variety: f(x)=x+1 on the integers; f(x)=x^2 on the reals; trigonometric, exponential and polynomial rules; piecewise definitions that use different formulas on parts of the domain; and discrete lookup tables used in computer science. Functions need not be given by closed-form expressions—an algorithm or a graph may fully specify a function. Multivariable functions take vectors as inputs, and vector-valued functions return vectors; parametric curves, surfaces and maps between manifolds are instances. For programmable or applied contexts, functions often correspond to subroutines or procedures. Further examples and exercises are collected at introductory sources such as educational pages.

History and development

The notion of a function evolved gradually. Early mathematicians used formulas linking quantities in geometry and mechanics; by the 18th century notation like f(x) became common, popularized by figures such as Euler who helped establish symbolic function notation. Nineteenth-century analysis and set theory led to more general and rigorous formulations of what constitutes a function and its domain. Later work formalized functions as particular kinds of relations and emphasized functions between arbitrary sets, not just numbers; historical introductions and surveys summarize these developments in broader context; see historical notes.

Applications, distinctions and notable facts

Functions are ubiquitous: they model physical laws, data transformations, computations, cryptographic operations, probability distributions, and mappings between coordinate systems. In computer science functions appear as procedures or methods; in category theory they are morphisms satisfying compositional laws. Important distinctions: a function differs from a general relation because it yields exactly one output for each input, and some objects called "multivalued functions" are instead relations and require different handling. For accessible guides and applied perspectives consult resources on applications and implications.