"f(x)" redirects here. For the band, see f(x) (band).

Graph of example function,
The input to a function need not be a number, it can be any well defined object. For example, a function might associate the letter A with the number 1, the letter B with the number 2, and so on. There are many ways to describe or represent a function, such as a formula or algorithm that computes the output for a given input, a graph that gives a picture of the function, or a table of values that gives the output for certain specified inputs. Tables of values are especially common in statistics, science, and engineering.In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. f(x) is said, "F of X." The argument and the value may be real numbers, but they can also be elements from any given set. An example of a function is f(x) = 2x, a function which associates with every number the number twice as large. Thus, with the argument 5 the value 10 is associated, and this is written f(5) = 10.
The set of all inputs to a particular function is called its domain. The set of all outputs of a particular function is called its image. In modern mathematics functions also have a codomain. For every function, its codomain includes its image. For instance, a codomain of the function squaring real numbers f(x) = x2 usually is defined to be the set of all real numbers. The function f does not have the real numbers − 1, − 2, − 3 as outputs, thus they are in its codomain but not in its image. Codomains are useful for function composition. Composition (f followed by g) is defined if the codomain of g is the same as the domain of f. Thus the codomain of g defines what functions may follow g. The word range is used in some texts to refer to the image and in others to the codomain, in particular in computing it often refers to the codomain. The domain and codomain are often "understood." Thus for the example given above, f(x) = 2x, the domain and codomain were not stated explicitly. They might both be the set of all real numbers, but they might also be the set of integers. If the domain is the set of integers, then image consists of just the even integers.
The set of all the ordered pairs or inputs and outputs (x, f(x)) of a function is called its graph. A common way to define a function is as the triple (domain, codomain, graph), that is as the input set, the possible outputs and the mapping for each input to its output.
OverviewA function may sometimes be described through its relationship to other functions, for example, as the inverse function of a given function, or as a solution of a differential equation. Functions can be added, multiplied, or combined in other ways to produce new functions. An important operation on functions, which distinguishes them from numbers, is the composition of functions. There are uncountably many different functions, most of which cannot be expressed with a formula or an algorithm.
Collections of functions with certain properties, such as continuous functions and differentiable functions, are called function spaces and are studied as objects in their own right, in such mathematical disciplines as real analysis and complex analysis.
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 argumentand 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.
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 orrange of the function. The image is often a subset of some larger set, called the codomain of a function. Thus, for example, the functionf(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,
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
One precise definition 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 notation ƒ:X→Y 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
,
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) є f are appropriate when, say, f is defined by f(x) = x + 1, for all x є 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
where the first part is read:
- "ƒ is a function from N to R" (one often writes informally "Let ƒ: X → Y" 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:
maps to
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
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.
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
Main article: 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 ƒ: Z → Z → Z = x ⟼ y ⟼ x·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).
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.
Function composition
Main article: Function composition
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 g: Y → 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
This notation follows the form such that
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
A more elaborate form of this is the commutative diagram.
Identity function
Main article: 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
Restrictions and extensions
Main article: Restriction (mathematics)
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: X → Y by g: W → Y (also called overriding union) is an extension of g denoted as (f ⊕ g): (X ∪ W) → Y. Its graph is the set-theoretical union of the graphs of gand 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|X ∩ W and g|X ∩ W 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
Main article: 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.
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
Main article: Image (mathematics)
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 A⊆X 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 ordinalsare 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
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
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.
Tidak ada komentar:
Posting Komentar