Function (mathematics)
Adapted from Wikipedia · Adventurer 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.
Functions help us understand how things depend on each other. They became important in history when mathematicians developed infinitesimal calculus. Later, they were described more strictly using set theory.
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 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. You can match each name to a favorite color. Each name (in the domain) is linked to one color (in the codomain).
We see 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 in the world.
Notation
Functions in mathematics show 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 ways to write about functions. The most common 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 is also 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. These words often mean the same thing. For example, the word "map" might be used when the function has a special pattern.
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 item in one group, called the domain, to exactly one item in another group, called the codomain. There are different ways to show how this connection works. One way is by listing the values. For example, for the group {1, 2, 3}, the function might give 2, 3, and 4.
Functions can also be defined by formulas. For example, a function might say that each number in the domain is increased by one. When we use formulas, we need to be careful about values that do not work, like avoiding division by zero.
Representing a function
Main article: Graph of a function
Main article: Mathematical table
Main article: Bar chart
Functions in math show how one thing changes when another thing changes. For example, a planet's position changes over time, and we can think of this as a function. We often draw pictures called graphs to show functions. These graphs help us see if the function is going up or down.
We can also use tables to show functions. If we are looking at small numbers, like 1 to 5, we can make a full table. For bigger numbers, tables can still help by showing some points, and we can guess the values in between. Bar charts are another way to show functions, especially 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 show how one value depends on another. For example, the position of a planet changes over time — this relationship can be shown using a function.
There are several basic types of functions. Some functions give the same output for every input. Others give a unique output for each input. Functions can also be combined, where the output of one function becomes the input of another. This creates new functions.
In calculus
Further information: History of the function concept
The idea of a function started in the 1600s and became very important for a new area of math called infinitesimal calculus. At first, people only studied functions that used real numbers, and they thought all these functions were smooth. Later, the idea grew to include functions with many kinds of inputs and outputs.
Functions are used everywhere in math today. In basic calculus classes, the word "function" usually means a function that uses real numbers and gives out real numbers. Older students learn about functions in more detail in college classes like real analysis and complex analysis.
Real function
See also: Real analysis
A real function is a special kind of function that uses real numbers for both inputs and outputs. These functions are often smooth, meaning they can be drawn as smooth lines without sharp points. When we add, take away, or multiply two real functions, we get another real function. For example, if we have two functions f and g, we can make 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 divisions of polynomial functions, are also used a lot. For example, the function that changes x to 1/x makes a hyperbola shape when drawn.
Function space
Main articles: Function space and Functional analysis
In mathematical analysis, a function space is a group of functions that have similar features. These functions can have numbers or vectors as their values, and they make up special sets known as topological vector spaces.
Function spaces are very useful in advanced mathematics. They help mathematicians study and solve hard equations, such as ordinary and partial differential equations, by looking at the properties of these groups of functions.
Multi-valued functions
Main article: Multi-valued function
Sometimes, a function can give more than one answer for the same input. For example, the square root of a positive number has two answers: one positive and one negative. Both are correct.
In more difficult cases, there might be even more answers for one input. These are called multi-valued functions, and they help us see all the possible results 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