Function (mathematics)

From Hidden Wiki
Jump to navigation Jump to search

Template:Functions

In mathematics, a function[1] was originally the idealization of how a varying quantity depends on another quantity. For example, the position of a planet is a function of time. Historically, the concept was elaborated with the infinitesimal calculus at the end of the 17th century, and, until the 19th century, the functions that were considered were differentiable (that is, they had a high degree of regularity). The concept of function was formalized at the end of the 19th century in terms of set theory, and this greatly enlarged the domains of application of the concept.

A function is a process or a relation that associates each element Template:Mvar of a set Template:Mvar, the domain of the function, to a single element Template:Mvar of another set Template:Mvar (possibly the same set), the codomain of the function. If the function is called Template:Mvar, this relation is denoted Template:Math (read Template:Mvar of Template:Mvar), the element Template:Mvar is the argument or input of the function, and Template:Mvar is the value of the function, the output, or the image of Template:Mvar by Template:Mvar.[2] The symbol that is used for representing the input is the variable of the function (one often says that Template:Mvar is a function of the variable Template:Mvar).

A function is uniquely represented by its graph which is the set of all pairs Template:Math. When the domain and the codomain are sets of numbers, each such pair may be considered as the Cartesian coordinates of a point in the plane. In general, these points form a curve, which is also called the graph of the function. This is a useful representation of the function, which is commonly used everywhere, for example in newspapers.

Functions are widely used in science, and in most fields of mathematics. Their role is so important that it has been said that they are "the central objects of investigation" in most fields of mathematics.Template:Sfn

File:Function machine2.svg
Metaphor describing a function as a "machine" or "black box" that for each input returns a corresponding output.
File:Graph of example function.svg
The red curve is the graph of a function, because any vertical line has exactly one crossing point with the curve.
File:Function color example 3.svg
A function that associates any of the four colored shapes to its color.

Definition

Template:Multiple image Intuitively, a function is a process that associates to each element of a set Template:Math a unique element of a set Template:Math.

Formally, a function Template:Math from a set Template:Math to a set Template:Math is defined by a set Template:Mvar of ordered pairs Template:Math such that Template:Math, Template:Math, and every element of Template:Math is the first component of exactly one ordered pair in Template:Mvar.[3] In other words, for every Template:Math in Template:Math, there is exactly one element Template:Math such that the ordered pair Template:Math belongs to the set of pairs defining the function Template:Math. The set Template:Mvar is called the graph of the function. Formally speaking, it may be identified with the function, but this hides the usual interpretation of a function as a process. Therefore, in common usage, the function is generally distinguished from its graph. Functions are also called maps or mappings. However, some authors[4] reserve the word mapping to the case where the codomain Y belongs explicitly to the definition of the function. In this sense, the graph of the mapping recovers the function as the set of pairs.

In the definition of function, Template:Math and Template:Math are respectively called the domain and the codomain of the function Template:Mvar. If Template:Math belongs to the set defining Template:Mvar, then Template:Mvar is the image of Template:Mvar under Template:Mvar, or the value of Template:Mvar applied to the argument Template:Mvar. Especially in the context of numbers, one says also that Template:Mvar is the value of Template:Mvar for the value Template:Mvar of its variable, or, still shorter, Template:Mvar is the value of Template:Mvar of Template:Mvar, denoted as Template:Math.

The domain and codomain are not always explicitly given when a function is defined, and, without some (possibly difficult) computation, one knows only that the domain is contained in a larger set. Typically, this occurs in mathematical analysis, where "a function Template:Nowrap often refers to a function that may have a proper subset of Template:Mvar as domain. For example, a "function from the reals to the reals" may refer to a real-valued function of a real variable, and this phrase does not mean that the domain of the function is the whole set of the real numbers, but only that the domain is a set of real numbers that contains a non-empty open interval. For example, if Template:Mvar is a function that has the real numbers as domain and codomain, then a function mapping the value Template:Mvar to the value <math>g(x)=\tfrac 1{f(x)}</math> is a function Template:Mvar from the reals to the reals, whose domain is the set of the reals Template:Mvar, such that Template:Math. In many cases, the exact domains are difficult to determine, but this is rarely a problem for working with such functions.

The range of a function is the set of the images of all elements in the domain. However, range is sometimes used as a synonym of codomain, generally in old textbooks.

Relational approach

Any subset of the Cartesian product of a domain <math>X</math> and a codomain <math>Y</math> is said to define a binary relation <math>R\subseteq (X\times Y)</math> between these two sets. It is immediate that an arbitrary relation may contain pairs that violate the necessary conditions for a function, given above.

A univalent relation is a relation such that

<math>(x,y)\in R\; \land \;(x,z) \in R\quad\Rightarrow \quad y=z.</math>

Univalent relations may be identified to functions whose domain is a subset of Template:Mvar.

A left-total relation is a relation such that

<math>\forall x \in X \;\exists y \in Y\colon (x,y)\in R.</math>

Formal functions may be strictly identified to relations that are both univalent and left total. Violating the left-totality is similar to giving a convenient encompassing set instead of the true domain, as explained above.

Various properties of functions and function composition may be reformulated in the language of relations. For example, a function is injective if the converse relation <math>R^{\text{T}}\subseteq (Y\times X)</math> is univalent, where the converse relation is defined as <math>R^{\text{T}} = \{(y,x)\colon (x,y) \in R\}.</math>[5]

Notation

There are various standard ways for denoting functions. The most commonly used notation is functional notation, which defines the function using an equation that gives the names of the function and the argument explicitly. This gives rise to a subtle point, often glossed over in elementary treatments of functions: functions are distinct from their values. Thus, a function Template:Math should be distinguished from its value Template:Math at the value Template:Math in its domain. To some extent, even working mathematicians will conflate the two in informal settings for convenience, and to avoid the use of pedantic language. However, strictly speaking, it is an abuse of notation to write "let <math>f\colon \mathbb{R}\to\mathbb{R}</math> be the function Template:Math ", since Template:Math and Template:Math should both be understood as the value of f at x, rather than the function itself. Instead, it is correct, though pedantic, to write "let <math>f\colon \mathbb{R}\to\mathbb{R}</math> be the function defined by the equation Template:Math valid for all real values of Template:Math ".

This distinction in language and notation becomes important in cases where functions themselves serve as inputs for other functions. (A function taking another function as an input is termed a functional.) Other approaches to denoting functions, detailed below, avoid this problem but are less commonly used.

Functional notation

First used by Leonhard Euler in 1734,[6] it is often useful to use a symbol for denoting a function. This symbol consists generally of a single letter in italic font, most often the lower-case letters Template:Math. Some widely used functions are represented by a symbol consisting of several letters (usually two or three, generally an abbreviation of their name). By convention, the symbol for standard functions is set in roman type, such as "Template:Math" for the sine function, in contrast to functions defined on an ad hoc basis.

The notation (read: "Template:Mvar equals Template:Mvar of Template:Mvar")

<math>y=f(x)</math>

means that the pair Template:Math belongs to the set of pairs defining the function Template:Mvar. If Template:Mvar is the domain of Template:Mvar, the set of pairs defining the function is thus, using set-builder notation,

<math>\{(x, f(x))\colon x\in X\}.</math>

Often, a definition of the function is given by what f does to the explicit argument x. For example, a function f can be defined by the equation

<math>f(x)=\sin(x^2+1)</math>

for all real numbers x. In this example, f can be thought of as the composite of several simpler functions: squaring, adding 1, and taking the sine. However, only the sine function has a common explicit symbol (sin), while the combination of squaring and then adding 1 is described by the polynomial expression <math>x^2+1</math>. In order to explicitly reference functions such as squaring or adding 1 without introducing new function names (e.g., by defining function g and h by <math>g(x)=x^2</math> and <math>h(x)=x+1</math>), one of the methods below (arrow notation or dot notation) could be used.

Sometimes the parentheses of functional notation are omitted when the symbol denoting the function consists of several characters and no ambiguity may arise. For example, <math>\sin x</math> can be written instead of <math>\sin(x).</math>

Arrow notation

For explicitly expressing domain Template:Math and the codomain Template:Math of a function Template:Math, the arrow notation is often used (read: Template:Nowrap or Template:Nowrap):

<math>f\colon X \to Y</math>

or

<math>X ~ \stackrel{f}{\to} ~ Y.</math>

This is often used in relation with the arrow notation for elements (read: "Template:Mvar maps Template:Mvar to Template:Math"), often stacked immediately below the arrow notation giving the function symbol, domain, and codomain:

<math>x\mapsto f(x).</math>

For example, if a multiplication is defined on a set Template:Mvar, then the square function <math>\operatorname{sqr}</math> on Template:Mvar is unambiguously defined by (read: "the function <math>\operatorname{sqr}</math> from Template:Mvar to Template:Mvar that maps Template:Mvar to Template:Math")

<math>\begin{align}

\operatorname{sqr}\colon X &\to X\\ x &\mapsto x\cdot x,\end{align}</math>

the latter line being more commonly written

<math>x\mapsto x^2.</math>

Often, the expression giving the function symbol, domain and codomain is omitted. Thus, the arrow notation is useful for avoiding introducing a symbol for a function that is defined, as it is often the case, by a formula expressing the value of the function in terms of its argument. As a common application of the arrow notation, suppose <math>f\colon X\times X\to Y;\;(x,t) \mapsto f(x,t)</math> is a two-argument function, and we want to refer to a partially applied function <math>X\to Y</math> produced by fixing the second argument to the value Template:Math without introducing a new function name. The map in question could be denoted <math>x\mapsto f(x,t_0)</math> using the arrow notation for elements. Note that the expression <math>x\mapsto f(x,t_0)</math> (read: "the map taking Template:Math to <math>f(x,t_0)</math>") represents this new function with just one argument, whereas the expression <math>f(x_0,t_0)</math> refers to the value of the function Template:Math at the Template:Nowrap

Index notation

Index notation is often used instead of functional notation. That is, instead of writing Template:Math, one writes <math>f_x.</math>

This is typically the case for functions whose domain is the set of the natural numbers. Such a function is called a sequence, and, in this case the element <math>f_n</math> is called the Template:Mvarth element of sequence.

The index notation is also often used for distinguishing some variables called parameters from the "true variables". In fact, parameters are specific variables that are considered as being fixed during the study of a problem. For example, the map <math>x\mapsto f(x,t)</math> (see above) would be denoted <math>f_t</math> using index notation, if we define the collection of maps <math>f_t</math> by the formula <math>f_t(x)=f(x,t)</math> for all <math>x,t\in X</math>.

Dot notation

In the notation <math>x\mapsto f(x),</math> the symbol Template:Mvar does not represent any value, it is simply a placeholder meaning that, if Template:Mvar is replaced by any value on the left of the arrow, it should be replaced by the same value on the right of the arrow. Therefore, Template:Mvar may be replaced by any symbol, often an interpunct "Template:Math". This may be useful for distinguishing the function Template:Math from its value Template:Math at Template:Mvar.

For example, <math> a(\cdot)^2</math> may stand for the function <math> x\mapsto ax^2</math>, and <math>\textstyle \int_a^{\, (\cdot)} f(u)\,du</math> may stand for a function defined by an integral with variable upper bound: <math>\textstyle x\mapsto \int_a^x f(u)\,du</math>.

Specialized notations

There are other, specialized notations for functions in sub-disciplines of mathematics. For example, in linear algebra and functional analysis, linear forms and the vectors they act upon are denoted using a dual pair to show the underlying duality. This is similar to the use of bra–ket notation in quantum mechanics. In logic and the theory of computation, the function notation of lambda calculus is used to explicitly express the basic notions of function abstraction and application. In category theory and homological algebra, networks of functions are described in terms of how they and their compositions commute with each other using commutative diagrams that extend and generalize the arrow notation for functions described above.

Specifying a function

According to the definition of a function, a specific function is, in general, defined by associating to every element of its domain one element of its codomain. When the domain and the codomain are sets of numbers, this association may take the form of a computation taking as input any element of the domain and producing an output in the codomain. This computation may be described by a formula. (This is the starting point of algebra, where many similar numerical computations can be replaced by a single formula that describes these computations by means of variables that represent computation inputs as unspecified numbers). This type of specification of a function frequently uses previously defined auxiliary functions.

For example, the function Template:Mvar from the reals to the reals, defined by the formula <math>f(x)=\sqrt{1+x^2},</math> employs, as auxiliary functions, the square function (mapping all the reals to the non-negative reals), the square root function (mapping the non-negative reals to the non-negative reals), and the addition of real numbers. The whole set of real numbers may be taken as the domain of Template:Mvar, even though the domain of the square root function is restricted to the non-negative real numbers; the image of Template:Mvar consists of the reals that are not less than one.

A computation that defines a function may often be described by an algorithm, and any kind of algorithm may be used. Sometimes, the definition of a function may involve elements or properties that can be defined, but not computed. For example, if one considers the set <math>\mathcal P</math> of the programs in a given programming language that take an integer as input. The terminating function is the function that returns 1 if a program of <math>\mathcal P</math> runs forever when executed on a given integer input, and returns 0 otherwise. It is a basic theorem of computability theory that there does not exist an algorithm for computing this function. More generally, computability theory is the study of computable functions, that is, the functions that can be computed by an algorithm.

The above ways of defining functions define them "pointwise", that is, each value is defined independently of the other values. This is not necessarily the case.

When the domain of a function is the set of nonnegative integers or, more generally, when the domain is a well ordered set, a function may be defined by induction or recursion, meaning (roughly) that the calculation of the value of the function for some given input requires values of the function for lesser inputs. For example, the Fibonacci sequence is a function from the natural numbers into themselves that is defined by two starting values and a formula, recurring to the two immediately preceding arguments (see above for the use of indices for the argument of a function):

<math>F_0=0,\quad F_1=1, \quad\text{and}\quad F_n=F_{n-1}+F_{n-2}\quad \text{for } n>1.</math>

In calculus, the usual functions considered have extensive regularities. That is, the value of the function at a point is related to the values of the function at neighboring points. This allows defining them by functional equations (for example, the gamma function is the unique meromorphic function such that <math>\Gamma(1)=1</math>, and <math>\Gamma(z+1)=z\Gamma(z)</math> for any complex Template:Mvar that is not a non-positive integer), by differential equations (for example, the natural logarithm is the solution of the differential equation <math>\frac{d(\ln x)}{dx}=\frac 1x</math> such that Template:Math), by integral equations or by analytic continuation.

Representing a function

As functions may be complicated objects, it is often useful to draw the graph of a function for getting a global view of its properties. Some functions may also represented histograms

Graph

Template:Main

Given a function <math>f\colon X\to Y,</math> its graph is, formally, the set

<math>G=\{(x,y)\colon x\in X \text{ and } y=f(x)\}.</math>

In the frequent case where Template:Mvar and Template:Mvar are subsets of the real numbers (or may be identified to such subsets), an element <math>(x,y)\in G</math> may be identified with the point of coordinates Template:Math in the Cartesian plane. Marking these points provides a drawing, generally a curve, that is also called the graph of the function. For example the graph of the square function

<math>x\mapsto x^2</math>

is a parabola that consists of all points of coordinates <math>(x, x^2)</math> for <math>x\in \R.</math>

It is possible to draw effectively the graph of a function only if the function is sufficiently regular, that is, either if the function is differentiable (or piecewise differentiable) or if its domain may be identified with the integers or a subset of the integers.

If either the domain or the codomain of the function is a subset of <math>\R^n,</math> the graph is a subset of a Cartesian space of higher dimension, and various technics have been developed for drawing it, including the use of colors for representing one of the dimensions.Template:Cn

Histogram

Template:Main

Histograms are often used for representing functions whose domain is finite, or is the natural numbers or the integers. In this case, an element Template:Mvar of the domain is represented by an interval of the Template:Mvar-axis, and a point Template:Math of the graph is represented by a rectangle with basis the interval corresponding to Template:Mvar and height Template:Mvar.

In statistic, histogram are often used for representing very irregular functions. For example, for representing the function that associates his weight to each member of some population, one draws the histogram of the function that associates to each weight interval the number of people, whose weights belong to this interval.

There are many variants of this method, see Histogram for details.

General properties

In this section, we describe general properties of functions, that are independent of specific properties of the domain and the codomain.

Canonical functions

Some functions are uniquely defined by their domain and codomain, and are sometimes called canonical: Template:Anchor

Function composition

Template:Main

Given two functions <math>f\colon X\to Y</math> and <math>g\colon Y\to Z</math> such that the domain of Template:Mvar is the codomain of Template:Mvar, their composition is the function <math>g \circ f\colon X \rightarrow Z</math> defined by

<math>(g \circ f)(x) = g(f(x)).</math>

That is, the value of <math>g \circ f</math> is obtained by first applying Template:Math to Template:Math to obtain Template:Math and then applying Template:Math to the result Template:Mvar to obtain Template:Math. In the notation the function that is applied first is always written on the right.

The composition <math>g\circ f</math> is an operation on functions that is defined only if the codomain of the first function is the domain of the second one. Even when <math>g \circ f</math> and <math>f \circ g</math> are both defined, the composition is not commutative. For example, if Template:Math and Template:Math, one has <math>g(f(x))=x^2+1\neq f(g(x)) = (x+1)^2.</math>

The function composition is associative in the sense that, if one of <math>(h\circ g)\circ f</math> and <math>h\circ (g\circ f)</math> is defined, then the other is also defined, and they are equal. Thus, one writes

<math>h\circ g\circ f = (h\circ g)\circ f = h\circ (g\circ f).</math>

The identity functions <math>\operatorname{id}_X</math> and <math>\operatorname{id}_Y</math> are respectively a right identity and a left identity for functions from Template:Mvar to Template:Mvar. That is, if Template:Mvar is a function with domain Template:Mvar, and codomain Template:Mvar, one has <math>f\circ \operatorname{id}_X = \operatorname{id}_Y \circ f = f.</math>

Image and preimage

Template:Main Let <math>f\colon X\to Y.</math> The image by Template:Mvar of an element Template:Mvar of the domain Template:Mvar is Template:Math. If Template:Math is any subset of Template:Math, then the image of Template:Mvar by Template:Mvar, denoted Template:Math is the subset of the codomain Template:Math consisting of all images of elements of Template:Mvar, that is,

<math>f(A)=\{f(x)\mid x\in A\}.</math>

The image of Template:Math is the image of the whole domain, that is Template:Math. It is also called the range of Template:Mvar, although the term may also refer to the codomain.[7]

On the other hand, the inverse image, or preimage by Template:Mvar of a subset Template:Math of the codomain Template:Math is the subset of the domain Template:Math consisting of all elements of Template:Math whose images belong to Template:Math. It is denoted by <math>f^{-1}(B).</math> That is

<math>f^{-1}(B) = \{x \in X \mid f(x) \in B\}.</math>

For example, the preimage of {4, 9} under the square function is the set {−3,−2,2,3}.

By definition of a function, the image of an element Template:Math of the domain is always a single element of the codomain. However, the preimage of a single element Template:Mvar, denoted <math>f^{-1}(x),</math> may be empty or contain any number of elements. For example, if Template:Mvar is the function from the integers to themselves that map every integer to 0, then Template:Math.

If <math>f\colon X\to Y</math> is a function, Template:Math and Template:Math are subsets of Template:Math, and Template:Math and Template:Math are subsets of Template:Math, then one has the following properties:

  • <math>A\subseteq B \Longrightarrow f(A)\subseteq f(B)</math>
  • <math>C\subseteq D \Longrightarrow f^{-1}(C)\subseteq f^{-1}(D)</math>
  • <math>A \subseteq f^{-1}(f(A))</math>
  • <math>C \supseteq f(f^{-1}(C))</math>
  • <math>f(f^{-1}(f(A)))=f(A)</math>
  • <math>f^{-1}(f(f^{-1}(C)))=f^{-1}(C)</math>

The preimage by Template:Mvar of an element Template:Mvar of the codomain is sometimes called, in some contexts, the fiber of Template:Math under Template:Mvar.

If a function Template:Mvar has an inverse (see below), this inverse is denoted <math>f^{-1}.</math> In this case <math>f^{-1}(C)</math> may denote either the image by <math>f^{-1}</math> or the preimage by Template:Mvar of Template:Mvar. This is not a problem, as these sets are equal. The notation <math>f(A)</math> and <math>f^{-1}(C)</math> may be ambiguous in the case of sets that contain some subsets as elements, such as <math>\{x, \{x\}\}.</math> In this case, some care may be needed, for example, by using square brackets <math>f[A], f^{-1}[C]</math> for images and preimages of subsets, and ordinary parentheses for images and preimages of elements.

Injective, surjective and bijective functions

Let <math>f\colon X\to Y</math> be a function.

The function Template:Mvar is injective (or one-to-one, or is an injection) if Template:Math for any two different elements Template:Math and Template:Mvar of Template:Mvar. Equivalently, Template:Mvar is injective if, for any <math>y\in Y,</math> the preimage <math>f^{-1}(y)</math> contains at most one element. An empty function is always injective. If Template:Mvar is not the empty set, and if, as usual, the axiom of choice is assumed, then Template:Mvar is injective if and only if there exists a function <math>g\colon y\to X</math> such that <math>g\circ f=\operatorname{id}_X,</math> that is, if Template:Mvar has a left inverse. The axiom of choice is needed, because, if Template:Mvar is injective, one defines Template:Mvar by <math>g(y)=x</math> if <math>y=f(x),</math> and by <math>g(y)=x_0</math>, if <math>y\not\in f(X),</math> where <math>x_0</math> is an arbitrarily chosen element of Template:Mvar.

The function Template:Mvar is surjective (or onto, or is a surjection) if the range equals the codomain, that is, if Template:Math. In other words, the preimage <math>f^{-1}(y)</math> of every <math>y\in Y</math> is nonempty. If, as usual, the axiom of choice is assumed, then Template:Mvar is surjective if and only if there exists a function <math>g\colon y\to X</math> such that <math>f\circ g=\operatorname{id}_Y,</math> that is, if Template:Mvar has a right inverse. The axiom of choice is needed, because, if Template:Mvar is injective, one defines Template:Mvar by <math>g(y)=x,</math> where <math>x</math> is an arbitrarily chosen element of <math>f^{-1}(y).</math>

The function Template:Mvar is bijective (or is bijection or a one-to-one correspondence) if it is both injective and surjective. That is Template:Mvar is bijective if, for any <math>y\in Y,</math> the preimage <math>f^{-1}(y)</math> contains exactly one element. The function Template:Mvar is bijective if and only if it admits an inverse function, that is a function <math>g\colon y\to X</math> such that <math>g\circ f=\operatorname{id}_X,</math> and <math>f\circ g=\operatorname{id}_Y.</math> (Contrarily to the case of injections and surjections, this does not require the axiom of choice.)

Every function <math>f\colon X\to Y</math> may be factorized as the composition Template:Math of a surjection followed by an injection, where Template:Mvar is the canonical surjection of Template:Mvar onto Template:Math, and Template:Mvar is the canonical injection of Template:Math into Template:Mvar. This is the canonical factorization of Template:Mvar.

"One-to-one" and "onto" are terms that were more common in the older English language literature; "injective", "surjective", and "bijective" were originally coined as French words in the second quarter of the 20th century by the Bourbaki group and imported into English. As a word of caution, "a one-to-one function" is one that is injective, while a "one-to-one correspondence" refers to a bijective function. Also, the statement "Template:Math maps Template:Math onto Template:Math" differs from "Template:Math maps Template:Math into Template:Math" in that the former implies that Template:Math is surjective), while the latter makes no assertion about the nature of Template:Math the mapping. In a complicated reasoning, the one letter difference can easily be missed. Due to the confusing nature of this older terminology, these terms have declined in popularity relative to the Bourbakian terms, which have also the advantage to be more symmetrical.

Restriction and extensionTemplate:Anchor

Template:Main If <math>f\colon X\to Y</math> is a function, and Template:Mvar is a subset of Template:Mvar, then the restriction of Template:Mvar to Template:Mvar, denoted Template:Math, is the function from Template:Mvar to Template:Mvar that is defined by

<math>f_{|S}(x)= f(x)\quad \text{for all } x\in S.</math>

This often used for define partial inverse functions: if there is a subset Template:Mvar of a function Template:Mvar such that Template:Math is injective, then the canonical surjection of Template:Math on its image Template:Math is a bijection, which has an inverse function from Template:Math to Template:Mvar. This is in this way that inverse trigonometric functions are defined. The cosine function, for example, is injective, when restricted to the interval Template:Math; the image of this restriction is the interval Template:Math; this defines thus an inverse function from Template:Math to Template:Math, which is called arccosine and denoted Template:Math.

Function restriction may also be used for "gluing" functions together: let <math>\textstyle X=\bigcup_{i\in I}U_i</math> be the decomposition of Template:Mvar as a union of subsets. Suppose that a function <math>f_i\colon U_i\to Y</math> is defined on each <math>U_i,</math> such that, for each pair of indices, the restrictions of <math>f_i</math> and <math>f_j</math> to <math>U_i\cap U_j</math> are equal. Then, this defines a unique function <math>f\colon X\to Y</math> such that <math>f_{|U_i} =f_i</math> for every Template:Mvar. This is generally in this way that functions on manifolds are defined.

An extension of a function Template:Mvar is a function Template:Mvar such that Template:Mvar is a restriction of Template:Mvar. A typical use of this concept is the process of analytic continuation, that allows extending functions whose domain is a small part of the complex plane to functions whose domain is almost the whole complex plane.

Here is another classical example of a function extension that is encountered when studying homographies of the real line. An homography is a function <math>h(x)=\frac{ax+b}{cx+d}</math> such that Template:Math. Its domain is the set of all real numbers different from <math>-d/c,</math> and its image is the set of all real numbers different from <math>a/c.</math> If one extends the real line to the projectively extended real line by adding Template:Math to the real numbers, one may extend Template:Mvar for being a bijection of the extended real line to itself, by setting <math>h(\infty)=a/c</math> and <math>h(-d/c)=\infty.</math>

Multivariate function Template:Anchor

File:Binary operations as black box.svg
A binary operation is a typical example of a bivariate, function which assigns to each pair <math>(x, y)</math> the result <math>x\circ y</math>.

A multivariate function, or function of several variables is a function that depends on several arguments. Such functions are commonly encountered. For example, the position of a car on a road is a function of the time and its speed.

More formally, a function of Template:Mvar variables is a function whose domain is a set of [[tuple|Template:Mvar-tuples]]. For example, multiplication of integers is a function of two variables, or bivariate function, whose domain is the set of all pairs (2-tuples) of integers, and whose codomain is the set of integers. The same is true for every binary operation. More generally, every mathematical operation is defined as a multivariate function.

The Cartesian product <math>X_1\times\cdots\times X_n</math> of Template:Mvar sets <math>X_1, \ldots, X_n</math> is the set of all Template:Mvar-tuples <math>(x_1, \ldots, x_n)</math> such that <math>x_i\in X_i</math> for every Template:Mvar with <math>1 \leq i \leq n</math>. Therefore, a function of Template:Mvar variables is a function

<math>f\colon U\to Y,</math>

where the domain Template:Mvar has the form

<math>U\subseteq X_1\times\cdots\times X_n.</math>

When using function notation, one usually omits the parentheses surrounding tuples, writing <math>f(x_1,x_2)</math> instead of <math>f((x_1,x_2)).</math>

In the case where all the <math>X_i</math> are equal to the set <math>\R</math> of real numbers, one has a function of several real variables. If the <math>X_i</math> are equal to the set <math>\C</math> of complex numbers, one has a function of several complex variables.

It is common to also consider functions whose codomain is a product of sets. For example, Euclidean division maps every pair Template:Math of integers with Template:Math to a pair of integers called the quotient and the remainder:

<math>\begin{align}
 \text{Euclidean division}\colon\quad \Z\times (\Z\setminus \{0\}) &\to \Z\times\Z\\
 (a,b) &\mapsto (\operatorname{quotient}(a,b),\operatorname{remainder}(a,b)).
\end{align}</math>

The codomain may also be a vector space. In this case, one talks of a vector-valued function. If the domain is contained in a Euclidean space, or more generally a manifold, a vector-valued function is often called a vector field.

In calculus

The idea of function, starting in the 17th century, was fundamental to the new infinitesimal calculus (see History of the function concept). At that time, only real-valued functions of a real variable were considered, and all functions were assumed to be smooth. But the definition was soon extended to functions of several variables and to function of a complex variable. In the second half of 19th century, the mathematically rigorous definition of a function was introduced, and functions with arbitrary domains and codomains were defined.

Functions are now used throughout all areas of mathematics. In introductory calculus, when the word function is used without qualification, it means a real-valued function of a single real variable. The more general definition of a function is usually introduced to second or third year college students with STEM majors, and in their senior year they are introduced to calculus in a larger, more rigorous setting in courses such as real analysis and complex analysis.

Real function

Template:See also

File:Gerade.svg
Graph of a linear function
File:Polynomialdeg2.svg
Graph of a polynomial function, here a quadratic function.
File:Sine cosine one period.svg
Graph of two trigonometric functions: sine and cosine.

A real function is a real-valued function of a real variable, that is, a function whose codomain is the field of real numbers and whose domain is a set of real numbers that contains an interval. In this section, these functions are simply called functions.

The functions that are most commonly considered in mathematics and its applications have some regularity, that is they are continuous, differentiable, and even analytic. This regularity insures that these functions can be visualized by their graphs. In this section, all functions are differentiable in some interval.

Functions enjoy pointwise operations, that is, if Template:Mvar and Template:Mvar are functions, their sum, difference and product are functions defined by

<math>\begin{align}

(f+g)(x)&=f(x)+g(x)\\ (f-g)(x)&=f(x)-g(x)\\ (f\cdot g)(x)&=f(x)\cdot g(x)\\ \end{align}.</math> The domains of the resulting functions are the intersection of the domains of Template:Mvar and Template:Mvar. The quotient of two functions is defined similarly by

<math>\frac fg(x)=\frac{f(x)}{g(x)},</math>

but the domain of the resulting function is obtained by removing the zeros of Template:Mvar from the intersection of the domains of Template:Mvar and Template:Mvar.

The polynomial functions are defined by polynomials, and their domain is the whole set of real numbers. They include constant functions, linear functions and quadratic functions. Rational functions are quotients of two polynomial functions, and their domain is the real numbers with a finite number of them removed to avoid division by zero. The simplest rational function is the function <math>x\mapsto \frac 1x,</math> whose graph is an hyperbola, and whose domain is the whole real line except for 0.

The derivative of a real differentiable function is a real function. An antiderivative of a continuous real function is a real function that is differentiable in any open interval in which the original function is continuous. For example, the function <math>x\mapsto\frac 1x</math> is continuous, and even differentiable, on the positive real numbers. Thus one antiderivative, which takes the value zero for Template:Math, is a differentiable function called the natural logarithm.

A real function Template:Mvar is monotonic in an interval if the sign of <math>\frac{f(x)-f(y)}{x-y}</math> does not depend of the choice of Template:Mvar and Template:Mvar in the interval. If the function is differentiable in the interval, it is monotonic if the sign of the derivative is constant in the interval. If a real function Template:Mvar is monotonic in an interval Template:Mvar, it has an inverse function, which is a real function with domain Template:Math and image Template:Mvar. This is how inverse trigonometric functions are defined in terms of trigonometric functions, where the trigonometric functions are monotonic. Another example: the natural logarithm is monotonic on the positive real numbers, and its image is the whole real line; therefore it has an inverse function that is a bijection between the real numbers and the positive real numbers. This inverse is the exponential function.

Many other real functions are defined either by the implicit function theorem (the inverse function is a particular instance) or as solutions of differential equations. For example the sine and the cosine functions are the solutions of the linear differential equation

<math>y+y=0</math>

such that

<math>\sin 0=0, \quad \cos 0=1, \quad\frac{\partial \sin x}{\partial x}(0)=1, \quad\frac{\partial \cos x}{\partial x}(0)=0.</math>

Complex function

Template:Main Template:Expand section

When working with complex numbers different types of functions are used[8]:

  • Complex-valued functions, functions that return complex values
<math>f\colon X\to\mathbb{C}</math>
for <math>X</math> an arbitrary set, or perhaps a subset of the real numbers.
  • Or a function for which both domain and range are subsets of the complex numbers.
<math>f\colon \mathbb{C}\to\mathbb{C}</math>.
  • Complex variable functions that return, say real numbers or other values
<math>f\colon \mathbb{C}\to X</math>.

The study of complex functions is a vast subject in mathematics with many applications, and that can claim[9] to be an ancestor to many other areas of mathematics, like homotopy theory, and manifolds.

Function of several real or complex variables

Template:Main Template:Expand section

Vector-valued function

Template:Main Template:Expand section

Function space

Template:Main In mathematical analysis, and more specifically in functional analysis, a function space is a set of scalar-valued or vector-valued functions, which share a specific property and form a topological vector space. For example, the real smooth functions with a compact support (that is, they are zero outside some compact set) form a function space that is at the basis of the theory of distributions.

Function spaces play a fundamental role in advanced mathematical analysis, by allowing the use of their algebraic and topological properties for studying properties of functions. For example, all theorems of existence and uniqueness of solutions of ordinary or partial differential equations result of the study of function spaces.

Generalizations

Natural extension

It is rather frequent that a function with domain Template:Mvar may be naturally extended to a function whose domain is a set Template:Mvar that is built from Template:Mvar.

For example, for any set Template:Mvar, its power set Template:Math is the set of all subsets of Template:Mvar. Any function <math>f\colon X\to Y,</math> may be extended to a function on power sets by

<math>\begin{align}

&\mathcal P(X) \to \mathcal P(Y) \\ &S \mapsto f(S) \end {align}</math> where Template:Math is the image by Template:Mvar of the subset Template:Mvar of Template:Mvar.

According to the definition, a function Template:Mvar maps each element from its domain Template:Mvar to some element of its codomain Template:Mvar. It is often convenient to extend this meaning to apply to arbitrary subsets of the domain, which are, as immediately can be checked, mapped to subsets of the codomain, thus considering a function <math>\tilde f,</math> mapping its domain, the powerset Template:Mathcal(Template:Mvar) of Template:Mvar 's domain Template:Mvar, to its codomain, a subset of the powerset Template:Mathcal(Template:Mvar) of Template:Mvar 's codomain Template:Mvar.

<math>\begin{align}

\mathcal P(X) \to \mathcal P(Y) \\ S \mapsto f(S). \end {align}</math> Under slight abuse of notation this function on subsets is often denoted also by Template:Mvar.

Another example is the following. If the function <math>f\colon R\to S</math> is a ring homomorphism, it may be extended to a function on polynomial rings

<math>\begin{align}

R[x]&\to S[x]\\ \sum_{i=0}^n a_ix^i&\mapsto \sum _{i=0}^n f(a_i)x^i, \end{align} </math> which is also a ring homomorphism.

Multi-valued functions

Template:Main

File:Function with two values 1.svg
Together, the two square roots of all nonnegative real numbers form a single smooth curve.

Several methods for specifying functions of real or complex variables start from a local definition of the funcion at a point or on a neighbourhood of a point, and then extend by continuity the function to a much larger domain. Frequently, for a starting point <math>x_0,</math> there are several possible starting values for the function.

For example, in defining the square root as the inverse function of the square function, for any positive real number <math>x_0,</math> there are two choices for the value of the square root, one of which is positive and denoted <math>\sqrt {x_0},</math> and another which is negative and denoted <math>-\sqrt {x_0}.</math> These choices define two continuous functions, both having the nonnegative real numbers as a domain, and having either the nonnegative or the nonpositive real numbers as images. When looking at the graphs of these functions, one can see that, together, they form a single smooth curve. It is therefore often useful to consider these two square root functions as a single function that has two values for positive Template:Mvar, one value for 0 and no value for negative Template:Mvar.

In the preceding example, one choice, the positive square root, is more natural than the other. This is not the case in general. For example, let consider the implicit function that maps Template:Mvar to a root Template:Mvar of <math>x^3-3x-y =0</math> (see the figure on the right). For Template:Math one may choose either <math>0, \sqrt 3,\text{ or } -\sqrt 3</math> for Template:Mvar By the implicit function theorem, each choice defines a function; for the first one, the (maximal) domain is the interval Template:Math and the image is Template:Math; for the second one, the domain is Template:Math and the image is Template:Math; for the last one, the domain is Template:Math and the image is Template:Math. As the three graphs together form a smooth curve, and there is no reason for preferring one choice, these three functions are often considered as a single multi-valued function of Template:Mvar that has three values for Template:Math, and only one value for Template:Math and Template:Math.

Usefulness of the concept of multi-valued functions is clearer when considering complex functions, typically analytic functions. The domain to which a complex function may be extended by analytic continuation generally consists of almost the whole complex plane. However, when extending the domain through two different paths, one often gets different values. For example, when extending the domain of the square root function, along a path of complex numbers with positive imaginary parts, one gets Template:Mvar for the square root of –1; while, when extending through complex numbers with negative imaginary parts, one gets Template:Math. There are generally two ways of solving the problem. One may define a function that is not continuous along some curve, called a branch cut. Such a function is called the principal value of the function. The other way is to consider that one has a multi-valued function, which is analytic everywhere except for isolated singularities, but whose value may "jump" if one follows a closed loop around a singularity. This jump is called the monodromy.

In foundations of mathematics and set theory

The definition of a function that is given in this article requires the concept of set, since the domain and the codomain of a function must be a set. This is not a problem in usual mathematics, as it is generally not difficult to consider only functions whose domain and codomain are sets, which are well defined, even if the domain is not explicitly defined. However, it is sometimes useful to consider more general functions.

For example the singleton set may be considered as a function <math>x\mapsto \{x\}.</math> Its domain would include all sets, and therefore would not be a set. In usual mathematics, one avoids this kind of problem by specifying a domain, which means that one has many singleton functions. However, when establishing foundations of mathematics, one may have to use functions whose domain, codomain or both are not specified, and some authors, often logicians, give precise definition for these weakly specified functions.[10]

These generalized functions may be critical in the development of a formalization of foundations of mathematics. For example, the Von Neumann–Bernays–Gödel set theory, is an extension of the set theory in which the collection of all sets is a class. This theory includes the replacement axiom, which may be interpreted as "if Template:Mvar is a set, and Template:Mvar is a function, then Template:Math is a set".

In computer science

Template:Main Template:Expand section

See also

Subpages

Template:Div col

Template:Div col end

Generalizations

Template:Div col

Template:Div col end

Related topics

Template:Div col

Template:Div col end

Notes

1 }}
     | references-column-width 
     | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
   | {{#if: 30em
     | references-column-width }} }}" style="{{#if: 
   | {{#iferror: {{#ifexpr: 1 > 1 }}
     | Template:Column-width
     | Template:Column-count }}
   | {{#if: 30em
     | Template:Column-width }} }} list-style-type: {{#switch: 
   | upper-alpha
   | upper-roman
   | lower-alpha
   | lower-greek
   | lower-roman = {{{group}}}
   | #default = decimal}};">
  1. The words map, mapping, transformation, correspondence, and operator are often used synonymously. Template:Harvnb.
  2. Template:Cite book
  3. Template:Cite book
  4. Template:Cite book
  5. Gunther Schmidt( 2011) Relational Mathematics, Encyclopedia of Mathematics and its Applications, vol. 132, sect 5.1 Functions, pages 49 to 60, Cambridge University Press Template:ISBN CUP blurb for Relational Mathematics
  6. Template:Citation
  7. Quantities and Units - Part 2: Mathematical signs and symbols to be used in the natural sciences and technology, page 15. ISO 80000-2 (ISO/IEC 2009-12-01)
  8. Template:Cite book
  9. Template:Cite book
  10. Template:Harvnb; Template:Harvnb; Template:Harvnb

References

Further reading

External links

Template:Commonscat

Template:Mathematical logic

Template:Authority control