Function (mathematics)
Adapted from Wikipedia · Discoverer experience
In mathematics, a function is a way to connect two sets of numbers or objects. Imagine you have a machine where you put in a number, and the machine gives you back another number based on a rule. The set of possible inputs is called the domain, and the set of possible outputs is called the codomain. For example, the position of a planet changes over time, which means position is a function of time.
Functions help us understand how things depend on each other. They became important in history when mathematicians developed infinitesimal calculus in the 1600s. Later, in the 1800s, they were described more strictly using set theory, which opened up many new uses.
We often write a function using a letter like f, and we say "f of x" to mean the output when the input is x. For instance, if f(x) = x² + 1, then when x = 4, the output is f(4) = 17. This way of thinking about relationships is used everywhere, from science to engineering and many areas of mathematics. Functions are like the building blocks that help us describe and study the world.
Definition
A function is a way of matching each item in one group to exactly one item in another group. The first group is called the domain, and the second group is called the codomain. For example, imagine you have a list of names and you match each name to a favorite color. Each name (in the domain) is linked to one color (in the codomain).
We can think of functions in everyday life too. The position of a planet in the sky changes over time. We can say the position is a function of time — for each moment in time, the planet has one specific position. This idea helps us understand many patterns and relationships in the world around us.
Notation
Functions in mathematics are ways to describe how one value depends on another. For example, the position of a planet changes over time — this relationship can be described using a function.
There are several common ways to write about functions. The most usual way is called functional notation. We give the function a name, like f, and then show how it works with a value inside parentheses, like f(x). This might also be used with well-known functions, such as sin(3), where the input value is shown inside the parentheses.
Other ways to describe functions include arrow notation, where we use the symbol ↦ to show how inputs become outputs, like x ↦ x + 1. Index notation uses letters with subscripts, like fₙ, often used when the inputs are whole numbers. Placeholder notation uses symbols like a(⋅)² to stand for a function without naming it. Each of these notations helps mathematicians describe and work with functions in clear and useful ways.
Main article: Function (mathematics))
Other terms
For broader coverage of this topic, see Map (mathematics).
A function can also be called a map or a mapping. Some writers use these words differently, but they often mean the same thing. For example, the word "map" might be used when the function has a special pattern or structure.
In some areas of math, like studying how systems change over time, the word "map" is used in a particular way. No matter which word is used, important ideas like the starting point (domain) and the ending point (codomain) still mean the same.
| Term | Distinction from "function" |
|---|---|
| Map/Mapping | None; the terms are synonymous. |
| A map can have any set as its codomain, while, in some contexts, typically in older books, the codomain of a function is specifically the set of real or complex numbers. | |
| Alternatively, a map is associated with a special structure (e.g. by explicitly specifying a structured codomain in its definition). For example, a linear map. | |
| Homomorphism | A function between two structures of the same type that preserves the operations of the structure (e.g. a group homomorphism). |
| Morphism | A generalisation of homomorphisms to any category, even when the objects of the category are not sets (for example, a group defines a category with only one object, which has the elements of the group as morphisms; see Category (mathematics) § Examples for this example and other similar ones). |
Specifying a function
A function in mathematics connects each element in one set, called the domain, to exactly one element in another set, called the codomain. There are different ways to describe how this connection works. One way is by listing the values, like saying that for the set {1, 2, 3}, the function gives 2, 3, and 4 respectively.
Functions can also be defined by formulas. For example, a function might be described by saying that each number in the domain is increased by one. When we use formulas, we must be careful about the values that make sense, like avoiding division by zero or taking the square root of a negative number.
Representing a function
Main article: Graph of a function
Main article: Mathematical table
Main article: Bar chart
Functions in math help us understand how one thing changes based on another. For example, the position of a planet changes over time, and we can think of this as a function. We often use pictures called graphs to show functions. These graphs can help us see if a function is going up or down.
We can also use tables to show functions. If the values we are looking at are limited, like the numbers 1 to 5, we can make a full table. For bigger or continuous values, tables can still help by showing specific points, and we can estimate the values in between. Bar charts are another way to show functions, especially when dealing with whole numbers. Each bar stands for a value in the function.
y x | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 1 | 2 | 3 | 4 | 5 |
| 2 | 2 | 4 | 6 | 8 | 10 |
| 3 | 3 | 6 | 9 | 12 | 15 |
| 4 | 4 | 8 | 12 | 16 | 20 |
| 5 | 5 | 10 | 15 | 20 | 25 |
| x | sin x |
|---|---|
| 1.289 | 0.960557 |
| 1.290 | 0.960835 |
| 1.291 | 0.961112 |
| 1.292 | 0.961387 |
| 1.293 | 0.961662 |
General properties
Functions are a way to describe how one value depends on another. For example, the position of a planet changes over time — this relationship can be described using a function.
There are several basic types of functions. Some functions map every input to the same output, while others connect each input to a unique output. Functions can also be combined, where the output of one function becomes the input of another. This creates new functions with interesting properties.
In calculus
Further information: History of the function concept
The idea of a function began in the 17th century and was very important for the new subject of infinitesimal calculus. At first, only functions that used real numbers were studied, and it was thought that all these functions were smooth. Later, the idea was expanded to include functions with many different inputs and outputs.
Functions are used everywhere in mathematics today. In basic calculus classes, the word "function" usually means a function that uses real numbers and gives out real numbers. More advanced students learn about functions in more detail in college courses like real analysis and complex analysis.
Real function
See also: Real analysis
A real function is a special type of function that uses real numbers for both inputs and outputs. These functions are often smooth, which means they can be drawn as smooth curves without sharp corners. When we add, subtract, or multiply two real functions, we get another real function. For example, if we have two functions f and g, we can create a new function by adding them together: (f + g)(x) = f(x) + g(x).
Polynomial functions, like straight lines or curves, are important examples. Rational functions, which are ratios of polynomial functions, also are widely used. For instance, the function that maps x to 1/x creates a hyperbola shape when drawn.
Function space
Main articles: Function space and Functional analysis
In mathematical analysis, a function space is a collection of functions that share certain properties. These functions can have values that are numbers or vectors, and they form special sets called topological vector spaces.
Function spaces are very important in advanced mathematics. They help mathematicians study and solve difficult equations, like ordinary and partial differential equations, by using the properties of these function collections.
Multi-valued functions
Main article: Multi-valued function
Sometimes, a function can have more than one value for a single input. For example, when we talk about the square root of a positive number, there are two answers: one positive and one negative. Both are correct, and together they form a smooth curve when drawn on a graph.
In more complex situations, like solving certain equations, there might be even more possible answers for a single input. These are called multi-valued functions, and they help us understand all the possible outcomes of a function.
This article is a child-friendly adaptation of the Wikipedia article on Function (mathematics), available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia