Function (mathematics)

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Graph of example function,
\begin{align}&\scriptstyle f \colon [-1,1.5] \to [-1,1.5] \\ &\textstyle x \mapsto \frac{(4x^3-6x^2+1)\sqrt{x+1}}{3-x}\end{align}

In science and mathematics, a function has an input and an output. The defining property of a function is that, for a given input, there is one and only one output. A common example of a function is f(x) = x2; if the input is 3, then the output is 9. An example of a relation that is not a function is y = ±  \sqrt x . If the input is nine, the output can be either +3 or -3, so there may be a choice of two different outputs, and this relation is not a function.

There are many ways to give a function: by a formula, by a plot or graph, by an algorithm that computes it, or by a description of its properties. Sometimes, a function is described through its relationship to other functions (see, for example, inverse function). In applied disciplines, functions are frequently specified by their tables of values or by a formula. Mathematicians also consider functions that cannot be given by any of these methods, and the mathematical definition of a function is discussed below.

Contents

[edit] Introduction

Functions are fundamental in many fields, including mathematics, the sciences, engineering, and economics. Different fields define the word in different ways, but the basic idea does not change: the input determines the output.

Functions need not act on numbers. A function may input a word and output the first letter of that word.

Because functions are so widely used, a great many traditions have grown up around their use. The input to a function is often called the independent variable and is often represented by the letter x or, if the input is a particular time, by the letter t. The output is often called the dependent variable and is often represented by the letter y. The function itself is most often called f, and we understand y = f(x) to mean a function named f has an input named x and an output named y.

A function ƒ takes an input, x, and returns an output ƒ(x). One metaphor describes the function as a "machine" or "black box" that converts the input into the output.

The set of all permitted inputs to a given function is called the domain of the function. The set of all resulting outputs is called the image or range of the function. The range is often a subset of some larger set, called the codomain of a function. Thus, for example, the function f(x) = x2 could take as its domain the set of all real numbers, as its image the set of all non-negative real numbers, and as its codomain the set of all real numbers. In that case, we would describe f as a real valued function of a real variable.

It is a usual practice in mathematics to introduce functions with temporary names like ƒ; we might define a function by ƒ(x) = 2x+1, which implies ƒ(3) = 7. When a name for the function is not needed, the form y =  2x+1 may be used.

If we use a function often, we may give it a more permanent name as, for example,

\operatorname{Square}(x) = x^2 . \,\!

[edit] Mathematical Definition

The essential property of a function is that a given input has one and only one output, but this property can be defined in several ways, some intuitive, some abstract. Formal definitions often use the notation of set theory.

A technical, precise, mathematical defintion of a function is that it consists of three sets. The first set is the domain of the function, the second set is the codomain of the function, and the third set is a set of ordered pairs. The ordered pairs are often written <a, b>. The first element in each ordered pair is from the domain, the second element in each ordered pair is from the codomain, every element in the domain is the first element in one and only one ordered pair. The set of all second elements in the ordered pairs is the range of the function.

For example, f(x) = x2 is, to a mathematician, three sets. The domain is (usually) the real numbers, the codomain is also the real numbers, and the ordered pairs include all pairs such as <3, 9>.

The notation ƒ:XY indicates that ƒ is a function with domain X and codomain Y.

The graph of a function is the set of ordered pairs, which can be plotted on a pair of coordinate axes. The point <3, 9> can be plotted as a point three units to the right of the origin and nine units above the horizontal axis.

A function is a special case of a more general mathematical concept, a relation, for which the restriction that each element of the domain appear as the first element in one and only one ordered pair is removed.

[edit] History

The idea of a function dates back to the Persian mathematician, Sharaf al-Dīn al-Tūsī, in the 12th century. In his analysis of the equation x3 + d = bx2 for example, he begins by changing the equation's form to x2(bx) = d. He then states that the question of whether the equation has a solution depends on whether or not the “function” on the left side reaches the value d. To determine this, he finds a maximum value for the function. Sharaf al-Din then states that if this value is less than d, there are no positive solutions; if it is equal to d, then there is one solution; and if it is greater than d, then there are two solutions.[1]

The history of the function concept in mathematics is described by da Ponte (1992). As a mathematical term, "function" was coined by Gottfried Leibniz in a 1673 letter, to describe a quantity related to a curve, such as a curve's slope at a specific point.[2] The functions Leibniz considered are today called differentiable functions. For this type of function, one can talk about limits and derivatives; both are measurements of the output or the change in the output as it depends on the input or the change in the input. Such functions are the basis of calculus.

The word function was later used by Leonhard Euler during the mid-18th century to describe an expression or formula involving various arguments, e.g. ƒ(x) = sin(x) + x3.

During the 19th century, mathematicians started to formalize all the different branches of mathematics. Weierstrass advocated building calculus on arithmetic rather than on geometry, which favoured Euler's definition over Leibniz's (see arithmetization of analysis).

At first, the idea of a function was rather limited. Joseph Fourier, for example, claimed that every function had a Fourier series, something no mathematician would claim today. By broadening the definition of functions, mathematicians were able to study "strange" mathematical objects such as continuous functions that are nowhere differentiable. These functions were first thought to be only theoretical curiosities, and they were collectively called "monsters" as late as the turn of the 20th century. However, powerful techniques from functional analysis have shown that these functions are in some sense "more common" than differentiable functions. Such functions have since been applied to the modeling of physical phenomena such as Brownian motion.

Towards the end of the 19th century, mathematicians started to formalize all of mathematics using set theory, and they sought to define every mathematical object as a set. Dirichlet and Lobachevsky are traditionally credited with independently giving the modern "formal" definition of a function as a relation in which every first element has a unique second element, but Dirichlet's claim to this formalization is disputed by Imre Lakatos:

There is no such definition in Dirichlet's works at all. But there is ample evidence that he had no idea of this concept. In his [1837], for instance, when he discusses piecewise continuous functions, he says that at points of discontinuity the function has two values: ...
(Proofs and Refutations, 151, Cambridge University Press 1976.)

Hardy (1908, pp. 26–28) defined a function as a relation between two variables x and y such that "to some values of x at any rate correspond values of y." He neither required the function to be defined for all values of x nor to associate each value of x to a single value of y. This broad definition of a function encompasses more relations than are ordinarily considered functions in contemporary mathematics.

The notion of a function as a rule for computing, rather than a special kind of relation, was also extensively studied in mathematical logic, constructive mathematics and computer science. In an effort to solve Hilbert's Entscheidungsproblem (1928), mathematicians set about to define what was meant by an "effective method" or "algorithm", i.e., an explicit, step-by-step procedure that would succeed in computing a function. In rapid succession various models for algorithms appeared, including the lambda calculus, the μ-recursive functions and Turing machines. It was shown that all of these models could compute the same class of computable functions, and that there were functions which could not be effectively computed by an algorithm. However, there is little consensus among scholars about the precise definition of "algorithm" and its relation to that of "computable function".

The idea of structure-preserving functions, or homomorphisms led to the abstract notion of morphism, the key concept of category theory. More recently, the concept of functor has been used as an analogue of a function in category theory.[3]

[edit] Vocabulary

A specific input in a function is called an argument of the function. For each argument value x, the corresponding unique y in the codomain is called the function value at x, output of ƒ for an argument x, or the image of x under ƒ. The image of x may be written as ƒ(x) or as y. (See the section on notation.)

The graph of a function ƒ is the set of all ordered pairs (x, ƒ(x)), for all x in the domain X. If X and Y are subsets of R, the real numbers, then this definition coincides with the familiar sense of "graph" as a picture or plot of the function, with the ordered pairs being the Cartesian coordinates of points.

The concept of the image can be extended from the image of a point to the image of a set. If A is any subset of the domain, then ƒ(A) is the subset of im ƒ consisting of all images of elements of A. We say the ƒ(A) is the image of A under f.

Notice that the image of ƒ is the image ƒ(X) of its domain, and that the image of ƒ is a subset of its codomain.

The preimage (or inverse image, or more precisely, complete inverse image) of a subset B of the codomain Y under a function ƒ is the subset of the domain X defined by

f^{-1}(B) = \{x \in X : f(x) \in B\}.

So, for example, the preimage of {4, 9} under the squaring function is the set {−3,−2,2,3}.

In general, the preimage of a singleton set (a set with exactly one element) may contain any number of elements. For example, if ƒ(x) = 7, then the preimage of {5} is the empty set but the preimage of {7} is the entire domain. Thus the preimage of an element in the codomain is a subset of the domain. The usual convention about the preimage of an element is that ƒ−1(b) means ƒ−1({b}), i.e

f^{-1}(b) = \{x \in X : f(x) = b\}.

Three important kinds of function are the injections (or one-to-one functions), which have the property that if ƒ(a) = ƒ(b) then a must equal b; the surjections (or onto functions), which have the property that for every y in the codomain there is an x in the domain such that ƒ(x) = y; and the bijections, which are both one-to-one and onto. This nomenclature was introduced by the Bourbaki group.

When the first definition of function given above is used, since the codomain is not defined, the "surjection" must be accompanied with a statement about the set the function maps onto. For example, we might say ƒ maps onto the set of all real numbers.

[edit] Restrictions and extensions

Informally, a restriction of a function ƒ is the result of trimming its domain.

More precisely, if ƒ is a function from a X to Y, and S is any subset of X, the restriction of ƒ to S is the function ƒ|S from S to Y such that ƒ|S(s) = ƒ(s) for all s in S.

If g is any restriction of ƒ, we say that ƒ is an extension of g.

[edit] Notation

It is common to omit the parentheses around the argument when there is little chance of confusion, thus: sin x; this is known as prefix notation. Writing the function after its argument, as in x ƒ, is known as postfix notation; for example, the factorial function is customarily written n!, even though its generalization, the gamma function, is written Γ(n). Parentheses are still used to resolve ambiguities and denote precedence, though in some formal settings use of either prefix or postfix notation eliminates the need for any parentheses.

Formal description of a function typically involves the function's name, its domain, its codomain, and a rule of correspondence. Thus we frequently see a two-part notation, an example being

\begin{align}
 f\colon \mathbb{N} &\to \mathbb{R} \\
 n &\mapsto \frac{n}{\pi}
\end{align}

where the first part is read:

  • "ƒ is a function from N to R" (one often writes informally "Let ƒ: XY" to mean "Let ƒ be a function from X to Y"), or
  • "ƒ is a function on N into R", or
  • "ƒ is an R-valued function of an N-valued variable",

and the second part is read:

  •  n \, maps to  \frac{n}{\pi} \,\!

Here the function named "ƒ" has the natural numbers as domain, the real numbers as codomain, and maps n to itself divided by π. Less formally, this long form might be abbreviated

 f(n) = \frac{n}{\pi} , \,\!

though with some loss of information; we no longer are explicitly given the domain and codomain. Even the long form here abbreviates the fact that the n on the right-hand side is silently treated as a real number using the standard embedding.

An alternative to the colon notation, convenient when functions are being composed, writes the function name above the arrow. For example, if ƒ is followed by g, where g produces the complex number eix, we may write

 \mathbb{N} \xrightarrow{f} \mathbb{R} \xrightarrow{g} \mathbb{C} . \,\!

A more elaborate form of this is the commutative diagram.

Use of ƒ(A) to denote the image of a subset AX is consistent so long as no subset of the domain is also an element of the domain. In some fields (e.g. in set theory, where ordinals are also sets of ordinals) it is convenient or even necessary to distinguish the two concepts; the customary notation is ƒ[A] for the set { ƒ(x): x ∈ A }; some authors write ƒ`x instead of ƒ(x), and ƒ``A instead of ƒ[A].

[edit] Function composition

A composite function g(f(x)) can be visualized as the combination of two "machines". The first takes input x and outputs f(x). The second takes f(x) and outputs g(f(x)).

The function composition of two or more functions uses the output of one function as the input of another. The functions ƒ: X → Y and gY → Z can be composed by first applying ƒ to an argument x to obtain y = ƒ(x) and then applying g to y to obtain z = g(y). The composite function formed in this way from general ƒ and g may be written

\begin{align}
 g\circ f\colon X &\to Z \\
 x &\mapsto g(f(x)).
\end{align}

This notation follows the form such that (g\circ f)(x) = g(f(x)).

The function on the right acts first and the function on the left acts second, reversing English reading order. We remember the order by reading the notation as "g of ƒ". The order is important, because rarely do we get the same result both ways. For example, suppose ƒ(x) = x2 and g(x) = x+1. Then g(ƒ(x)) = x2+1, while ƒ(g(x)) = (x+1)2, which is x2+2x+1, a different function.

In a similar way, the function given above by the formula y = 5x−20x3+16x5 can be obtained by composing several functions, namely the addition, negation, and multiplication of real numbers.

[edit] Identity function

The unique function over a set X that maps each element to itself is called the identity function for X, and typically denoted by idX. Each set has its own identity function, so the subscript cannot be omitted unless the set can be inferred from context. Under composition, an identity function is "neutral": if ƒ is any function from X to Y, then

\begin{align}
 f \circ \mathrm{id}_X &= f , \\
 \mathrm{id}_Y \circ f &= f .
\end{align}

[edit] Inverse function

If ƒ is a function from X to Y then an inverse function for ƒ, denoted by ƒ−1, is a function in the opposite direction, from Y to X, with the property that a round trip (a composition) returns each element to itself. Not every function has an inverse; those that do are called invertible. The inverse function exists if and only if ƒ is a bijection.

As a simple example, if ƒ converts a temperature in degrees Celsius to degrees Fahrenheit, the function converting degrees Fahrenheit to degrees Celsius would be a suitable ƒ−1.

\begin{align}
 f(C) &= \frac {9}{5} C + 32 \\
 f^{-1}(F) &= \frac {5}{9} (F - 32)
\end{align}

The notation for composition reminds us of multiplication; in fact, sometimes we denote it using juxtaposition, gƒ, without an intervening circle. Under this analogy, identity functions are like 1, and inverse functions are like reciprocals (hence the notation).

For functions which are injections or surjections, generalized inverse functions can be defined, called left and right inverses respectively. Left inverses map to the identity when composed to the left; right inverses when composed to the right.

[edit] Specifying a function

A function can be defined by any mathematical condition relating each argument to the corresponding output value. If the domain is finite, a function ƒ may be defined by simply tabulating all the arguments x and their corresponding function values ƒ(x). More commonly, a function is defined by a formula, or (more generally) an algorithm — a recipe that tells how to compute the value of ƒ(x) given any x in the domain.

There are many other ways of defining functions. Examples include piecewise definitions, induction or recursion, algebraic or analytic closure, limits, analytic continuation, infinite series, and as solutions to integral and differential equations. The lambda calculus provides a powerful and flexible syntax for defining and combining functions of several variables.

[edit] Computability

Functions that send integers to integers, or finite strings to finite strings, can sometimes be defined by an algorithm, which gives a precise description of a set of steps for computing the output of the function from its input. Functions definable by an algorithm are called computable functions. For example, the Euclidean algorithm gives a precise process to compute the greatest common divisor of two positive integers. Many of the functions studied in the context of number theory are computable.

Fundamental results of computability theory show that there are functions that can be precisely defined but are not computable. Moreover, in the sense of cardinality, almost all functions from the integers to integers are not computable. The number of computable functions from integers to integers is countable, because the number of possible algorithms is. The number of all functions from integers to integers is higher: the same as the cardinality of the real numbers. Thus most functions from integers to integers are not computable. Specific examples of uncomputable functions are known, including the busy beaver function and functions related to the halting problem and other undecidable problems.

[edit] Functions with multiple inputs and outputs

The concept of function can be extended to an object that takes a combination of two (or more) argument values to a single result. This intuitive concept is formalized by a function whose domain is the Cartesian product of two or more sets.

For example, consider the multiplication function that associates two integers to their product: ƒ(x, y) = x·y. This function can be defined formally as having domain Z×Z , the set of all integer pairs; codomain Z; and, for graph, the set of all pairs ((x,y), x·y). Note that the first component of any such pair is itself a pair (of integers), while the second component is a single integer.

The function value of the pair (x,y) is ƒ((x,y)). However, it is customary to drop one set of parentheses and consider ƒ(x,y) a function of two variables (or with two arguments), x and y.

The concept can still further be extended by considering a function that also produces output that is expressed as several variables. For example consider the function mirror(x, y) = (y, x) with domain R×R and codomain R×R as well. The pair (y, x) is a single value in the codomain seen as a cartesian product.

There is an alternative approach: one can instead interpret a function of two variables as sending each element of A to a function from B to C, this is known as currying. The equivalence of these approaches is expressed by the bijection between the function spaces C^{A \times B} and (CB)A. When working with curried functions it is customary to use prefix notation (with function application considered left-associative), since juxtaposition of multiple arguments—as in (ƒ x y)—naturally maps to evaluation of a curried function.

[edit] Binary operations

The familiar binary operations of arithmetic, addition and multiplication, can be viewed as functions from R×R to R. This view is generalized in abstract algebra, where n-ary functions are used to model the operations of arbitrary algebraic structures. For example, an abstract group is defined as a set X and a function ƒ from X×X to X that satisfies certain properties.

Traditionally, addition and multiplication are written in the infix notation: x+y and x×y instead of +(x, y) and ×(x, y).

[edit] Function spaces

The set of all functions from a set X to a set Y is denoted by XY, by [XY], or by YX.

The latter notation is motivated by the fact that, when X and Y are finite, of size |X| and |Y| respectively, then the number of functions XY is |YX| = |Y||X|. This is an example of the convention from enumerative combinatorics that provides notations for sets based on their cardinalities. Other examples are the multiplication sign X×Y used for the cartesian product where |X×Y| = |X|·|Y| , and the factorial sign X! used for the set of permutations where |X!| = |X|! , and the binomial coefficient sign \tbinom X n used for the set of n-element subsets where |\tbinom X n | = \tbinom {|X|} n.

We may interpret ƒ: XY to mean ƒ ∈ [XY]; that is, "ƒ is a function from X to Y".

[edit] Pointwise operations

If ƒ: X → R and gX → R are functions with common domain X and common codomain a ring R, then one can define the sum function ƒ + gX → R and the product function ƒ ⋅ gX → R as follows:

\begin{align}
 (f+g)(x) &= f(x)+g(x) , \\
 (f\cdot g)(x) &= f(x) \cdot g(x) ,
\end{align}

for all x in X.

This turns the set of all such functions into a ring. The binary operations in that ring have as domain ordered pairs of functions, and as codomain functions. This is an example of climbing up in abstraction, to functions of more complex types.

By taking some other algebraic structure A in the place of R, we can turn the set of all functions from X to A into an algebraic structure of the same type in an analogous way.

[edit] Other properties

There are many other special classes of functions that are important to particular branches of mathematics, or particular applications. Here is a partial list:

[edit] See also

[edit] References

[edit] Notes

  1. ^ Victor J. Katz, Bill Barton (October 2007), "Stages in the History of Algebra with Implications for Teaching", Educational Studies in Mathematics (Springer Netherlands) 66 (2): 185–201 [192], doi:10.1007/s10649-006-9023-7 
  2. ^ Thompson, S.P; Gardner, M; Calculus Made Easy. 1998. Page 10-11. ISBN 0312185480.
  3. ^ John C. Baez; James Dolan (1998). Categorification. http://arxiv.org/abs/math/9802029. 

[edit] Sources

[edit] External links

Personal tools