Function (mathematics)

Algebra ->  Algebra  -> Functions -> Function (mathematics)      Log On

Ad: Algebrator™ solves your algebra problems and provides step-by-step explanations!
Ad: Algebra Solved!™: algebra software solves algebra homework problems with step-by-step help!

   

Function (mathematics)

/div>
Jump to: navigation, search
The red curve is the graph of a function f in the Cartesian plane. The horizontal axis represents the input x and the vertical axis the output f(x), so that the graph consists of all ordered pairs (x, f(x)).

In mathematics, a function associates an argument or input quantity with exactly one value or output quantity. The value of a function f with argument x is denoted f(x), read "f of x". An example of such a value is f(x) = 2x, given by a function which associates with every number x the number twice as large: in the case x = 5, f(x) = 10.

Function arguments and values can be real numbers or elements of any given sets. For example, a function could associate the letter A with the number 1, the letter B with the number 2, and so on. The set of all inputs for a function is called its domain, and the set of all outputs its range or image.

There are many ways to describe or represent a function, such as with a formula or algorithm that computes the output for a given input, a picture or graph of the function's input–output ordered pairs, or a table of outputs for selected inputs. A function can also be described through its relations to other functions, for instance as an inverse function or solution of a differential equation. In analogy with arithmetic, it is possible to define function addition, multiplication, and other operations to produce new functions. An important operation which is not available on numbers is the composition of functions.

Formal definitions of a function rely on its domain, its graph, and another set known as the codomain in which the outputs are constrained to fall. Collections of functions with the same domain and codomain are called function spaces, properties of which are studied in such mathematical disciplines as real analysis and complex analysis. Functions and their various analogues or generalisations, such as the functors of category theory, are "the central objects of investigation"[1] in most fields of modern mathematics.

[ Overview

Because functions are so widely used, many traditions have grown up around their use. The symbol for the input to a function is often called the independent variable or argument and is often represented by the letter x or, if the input is a particular time, by the letter t. The symbol for the output is called the dependent variable or value and is often represented by the letter y. The function itself is most often called f, and thus the notation y = f(x) indicates that 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 image is often a subset of some larger set, called the codomain of the 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. Sometimes, especially in computer science, the term "range" refers to the codomain rather than the image, so care needs to be taken when using the word.

It is usual practice in mathematics to introduce functions with temporary names like ƒ. For example, ƒ(x) = 2x+1, implies ƒ(3) = 7; when a name for the function is not needed, the form y = 2x+1 may be used. If a function is often used, it may be given a more permanent name as, for example,

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

Functions need not act on numbers: the domain and codomain of a function may be arbitrary sets. One example of a function that acts on non-numeric inputs takes English words as inputs and returns the first letter of the input word as output. Furthermore, functions need not be described by any expression, rule or algorithm: indeed, in some cases it may be impossible to define such a rule. For example, the association between inputs and outputs in a choice function often lacks any fixed rule, although each input element is still associated to one and only one output.

A function of two or more variables is considered in formal mathematics as having a domain consisting of ordered pairs or tuples of the argument values. For example Sum(x,y) = x+y operating on integers is the function Sum with a domain consisting of pairs of integers. Sum then has a domain consisting of elements like (3,4), a codomain of integers, and an association between the two that can be described by a set of ordered pairs like ((3,4), 7). Evaluating Sum(3,4) then gives the value 7 associated with the pair (3,4).

A family of objects indexed by a set is equivalent to a function. For example, the sequence 1, 1/2, 1/3, ..., 1/n, ... can be written as the ordered sequence <1/n> where n is a natural number, or as a function f(n) = 1/n from the set of natural numbers into the set of rational numbers.

[ Definition

Colored dice with white background
This diagram represents a function with domain {1,2,3}, image {D,B,A} and set of ordered pairs {(1,D),(2,B),(3,A)}.
This does not represent a function since 2 is the first element in more than one ordered pair, in particular, (2,B) and (2,C) are both elements of the set of ordered pairs.

One precise definition[citation needed] of a function is an ordered triple of sets, written (X, Y, F), where X is the domain, Y is the codomain, and F is a set of ordered pairs (a, b). In each of the ordered pairs, the first element a is from the domain, the second element b is from the codomain, and a necessary condition is that every element in the domain is the first element in exactly one ordered pair. The set of all b is known as the image of the function, and need not be the whole of the codomain. Most authors use the term "range" to mean the image, while some use "range" to mean the codomain.

The domain X may be void, but if X = ∅ then F = ∅. The codomain Y may be also void, but if Y = ∅ then X = ∅ and F = ∅. Such “void” functions are not usual, but the theory assures their existence.

The notation ƒ:XY indicates that ƒ is a function with domain X and codomain Y, and the function f is said to map or associate elements of X to elements of Y.

If the domain and codomain are both the set of real numbers, using the ordered triple scheme we can, for example, write the function y = x2 as

\Big( \mathbb{R}, \mathbb{R}, \left\{ \left( x, x^2\right) : x \in \mathbb{R} \right\} \Big) ,

In most situations, the domain and codomain are understood from context, and only the relationship between the input and output is given.

In set theory especially, a function f is often defined as a set of ordered pairs, with the property that if (x,a) and (x,b) are in f, then a = b. In this case statements such as (2,3) \in f are appropriate when, say, f is defined by f(x) = x + 1, for all x \in \mathbb{R}.

The graph of a function is its set of ordered pairs. Part of such a set can be plotted on a pair of coordinate axes; for example, (3, 9), the point above 3 on the horizontal axis and to the right of 9 on the vertical axis, lies on the graph of y = x2.

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.

A function can also be called a map or a mapping. Some authors, however, use the terms "function" and "map" to refer to different types of functions. Other specific types of functions include functionals and operators.

A function is a special case of a more general mathematical concept, the 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. In other words, an element of the domain may not be the first element of any ordered pair, or may be the first element of two or more ordered pairs. A relation is "single-valued" when if an element of the domain is the first element of one ordered pair, it is not the first element of any other ordered pair. A relation is "left-total" or simply "total" if every element of the domain is the first element of some ordered pair. Thus a function is a total, single-valued relation.

In some parts of mathematics, including recursion theory and functional analysis, it is convenient to study partial functions in which some values of the domain have no association in the graph; i.e., single-valued relations. For example, the function f such that f(x) = 1/x does not define a value for x = 0, and so is only a partial function from the real line to the real line. The term total function can be used to stress the fact that every element of the domain does appear as the first element of an ordered pair in the graph. In other parts of mathematics, non-single-valued relations are similarly conflated with functions: these are called multivalued functions, with the corresponding term single-valued function for ordinary functions.

Many operations in set theory, such as the power set, have the class of all sets as their domain, and therefore, although they are informally described as functions, they do not fit the set-theoretical definition outlined above, because a class is not necessarily a set.

[ Notation

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} , \,\!

where f(n) is read as "f as function of n" or "f of n". There is some loss of information: we no longer are explicitly given the domain N and codomain R.

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 the consistent use of either prefix or postfix notation eliminates the need for any parentheses.

To define a function, sometimes a dot notation is used in order to emphasize the functional nature of an expression without assigning a special symbol to the variable. For instance, \scriptstyle a(\cdot)^2 stands for the function \textstyle x\mapsto ax^2, \scriptstyle \int_a^{\, \cdot} f(u)du stands for the integral function \scriptstyle x\mapsto \int_a^x f(u)du, and so on.

[ Injective and surjective functions

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 definition of a function by its graph only 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.

[ 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 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, x and y. Functions of two variables may be plotted on the three-dimensional Cartesian as ordered triples of the form (x,y,f(x,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 integer divide function, with domain Z×N and codomain Z×N. The resultant (quotient, remainder) pair is a single value in the codomain seen as a Cartesian product.

[ Currying

An alternative approach to handling functions with multiple arguments is to transform them into a chain of functions that each takes a single argument. For instance, one can interpret Add(3,5) to mean "first produce a function that adds 3 to its argument, and then apply the 'Add 3' function to 5". This transformation is called currying: Add 3 is curry(Add) applied to 3. There is a bijection between the function spaces CA×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. Conversely, the → and ⟼ symbols are considered to be right-associative, so that curried functions may be defined by a notation such as ƒ: ZZZ = xyx·y

[ 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).

[ 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 takes the output of one or more functions as the input of others. 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.

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.

[ 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}

[ 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 a restriction of ƒ, then it is said that ƒ is an extension of g.

The overriding of f: XY by g: WY (also called overriding union) is an extension of g denoted as (fg): (XW) → Y. Its graph is the set-theoretical union of the graphs of g and f|X \ W. Thus, it relates any element of the domain of g to its image under g, and any other element of the domain of f to its image under f. Overriding is an associative operation; it has the empty function as an identity element. If f|XW and g|XW are pointwise equal (e.g., the domains of f and g are disjoint), then the union of f and g is defined and is equal to their overriding union. This definition agrees with the definition of union for binary relations.

[ 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 C to degrees Fahrenheit F, 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 is similar to multiplication; in fact, sometimes it is denoted using juxtaposition, gƒ, without an intervening circle. With this analogy, identity functions are like the multiplicative identity, 1, and inverse functions are like reciprocals (hence the notation).

For functions that 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.

[ Image of a set

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.

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 }.

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

[ Inverse image

The inverse image (or preimage, 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\}.

In the same way as for the image, some authors use square brackets to avoid confusion between the inverse image and the inverse function. Thus they would write ƒ−1[B] and ƒ−1[b] for the preimage of a set and a singleton.

The preimage of a singleton set is sometimes called a fiber. The term kernel can refer to a number of related concepts.

[ 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.

For any infinite domain and a codomain with at least two elements there are uncountably many functions, most of which cannot be expressed with a formula or an algorithm.

[ 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.

[ 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 and of size |X| and |Y|, 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|; the factorial sign X!, used for the set of permutations where |X!| = |X|!; and the binomial coefficient sign \begin{pmatrix} X\\ n\end{pmatrix}, used for the set of n-element subsets where  \left| \begin{pmatrix} X \\ n \end{pmatrix} \right| = \begin{pmatrix} |X| \\ n \end{pmatrix}.

If ƒ: XY, it may reasonably be concluded that ƒ ∈ [XY].

[ Pointwise operations

Pointwise operations inherit properties from the corresponding operations on the codomain. For example if ƒ: X → R and gX → R are functions with a common domain of X and common codomain of a ring R, then the sum function ƒ + gX → R and the product function ƒ ⋅ gX → R can be defined as follows:

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

[ 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:

[ History

[ Functions prior to Leibniz

Historically, some mathematicians can be regarded as having foreseen and come close to a modern formulation of the concept of function. Among them is Oresme (1323–1382) . . . In his theory, some general ideas about independent and dependent variable quantities seem to be present.[2][3]

Ponte further notes that "The emergence of a notion of function as an individualized mathematical entity can be traced to the beginnings of infinitesimal calculus".[2]

[ The notion of "function" in analysis

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.[4][5] 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.

Johann Bernoulli "by 1718, had come to regard a function as any expression made up of a variable and some constants",[6] and Leonhard Euler during the mid-18th century used the word to describe an expression or formula involving variables and constants e.g., x2+3x+2.[7]

Alexis Claude Clairaut (in approximately 1734) and Euler introduced the familiar notation " f(x) ".[7]

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 a precise sense, more common than differentiable functions. Such functions have since been applied to thee modeling of physical phenomena such as CC-BY-SA.


Tutors Answer Your Questions about Functions (FREE)


Older solutions: 1..45, 46..90, 91..135, 136..180, 181..225, 226..270, 271..315, 316..360, 361..405, 406..450, 451..495, 496..540, 541..585, 586..630, 631..675, 676..720, 721..765, 766..810, 811..855, 856..900, 901..945, 946..990, 991..1035, 1036..1080, 1081..1125, 1126..1170, 1171..1215, 1216..1260, 1261..1305, 1306..1350, 1351..1395, 1396..1440, 1441..1485, 1486..1530, 1531..1575, 1576..1620, 1621..1665, 1666..1710, 1711..1755, 1756..1800, 1801..1845, 1846..1890, 1891..1935, 1936..1980, 1981..2025, 2026..2070, 2071..2115, 2116..2160, 2161..2205, 2206..2250, 2251..2295, 2296..2340, 2341..2385, 2386..2430, 2431..2475, 2476..2520, 2521..2565, 2566..2610, 2611..2655, 2656..2700, 2701..2745, 2746..2790, 2791..2835, 2836..2880, 2881..2925, 2926..2970, 2971..3015, 3016..3060, 3061..3105, 3106..3150, 3151..3195, 3196..3240, 3241..3285, 3286..3330, 3331..3375, 3376..3420, 3421..3465, 3466..3510, 3511..3555, 3556..3600, 3601..3645, 3646..3690, 3691..3735, 3736..3780, 3781..3825, 3826..3870, 3871..3915, 3916..3960, 3961..4005, 4006..4050, 4051..4095, 4096..4140, 4141..4185, 4186..4230, 4231..4275, 4276..4320, 4321..4365, 4366..4410, 4411..4455, 4456..4500, 4501..4545, 4546..4590, 4591..4635, 4636..4680, 4681..4725, 4726..4770, 4771..4815, 4816..4860, 4861..4905, 4906..4950, 4951..4995, 4996..5040, 5041..5085, 5086..5130, 5131..5175, 5176..5220, 5221..5265, 5266..5310, 5311..5355, 5356..5400, 5401..5445, 5446..5490, 5491..5535, 5536..5580, 5581..5625, 5626..5670, 5671..5715, 5716..5760, 5761..5805, 5806..5850, 5851..5895, 5896..5940, 5941..5985, 5986..6030, 6031..6075, 6076..6120, 6121..6165, 6166..6210, 6211..6255, 6256..6300, 6301..6345, 6346..6390, 6391..6435, 6436..6480, 6481..6525, 6526..6570, 6571..6615, 6616..6660, 6661..6705, 6706..6750, 6751..6795, 6796..6840, 6841..6885, 6886..6930, 6931..6975, 6976..7020