MathematicsDiscrete MathematicsEasy

Function (mathematics)

Also known as:MapMappingTransformation

A function is a relation that assigns to each element of a set (called the domain) exactly one element of another set (called the codomain). Denoted f: A → B, it is a rule that maps every input to a unique output without ambiguity. Functions are among the most central concepts in mathematics and appear in calculus, linear algebra, programming, and virtually every applied science.

Key Formula

f: A → B, where f(x) = y for each x in A

LaTeX: f: A \to B, \quad f(x) = y

SymbolMeaningUnit
fThe functionmapping
ADomain (set of inputs)set
BCodomain (set of possible outputs)set
xInput elementelement of A
yOutput elementelement of B

Worked Example

Problem

Let f: ℝ → ℝ be defined by f(x) = 2x² − 3x + 1. Find f(0), f(1), and f(−2).

Solution

Step 1: Substitute x = 0. — f(0) = 2(0)² − 3(0) + 1 = 0 − 0 + 1 = 1 Step 2: Substitute x = 1. — f(1) = 2(1)² − 3(1) + 1 = 2 − 3 + 1 = 0 Step 3: Substitute x = −2. — f(−2) = 2(−2)² − 3(−2) + 1 = 2(4) + 6 + 1 = 8 + 6 + 1 = 15

Answer

f(0) = 1, f(1) = 0, f(−2) = 15.

Types of Functions in Mathematics

TypeDefinitionExampleProperty
Injective (One-to-One)Different inputs → different outputsf(x) = 2xNo two x give same f(x)
Surjective (Onto)Every element of B is mapped tof(x) = x³ on ℝRange = Codomain
BijectiveBoth injective and surjectivef(x) = x + 1Has an inverse
ConstantAll inputs map to same outputf(x) = 5Range is a single element
IdentityEvery input maps to itselff(x) = xf∘f = f

Interactive Tools

Desmos Graphing Calculator

Graph and explore any function interactively.

Open Tool

GeoGebra — Functions

Visualize domain, range, and function types dynamically.

Open Tool

Khan Academy — Functions

Complete course on functions from introduction to advanced topics.

Open Tool
Diagram showing a function mapping elements from domain to codomain

Wikimedia Commons, CC BY-SA

Related Terms

From Latin "functio" (performance, execution), from "fungi" (to perform). The formal mathematical definition was developed by Leonhard Euler in the 18th century; the modern notation f(x) was introduced by him around 1734.

functiondiscrete-mathematicsmappingdomainrangealgebra