Jump to content

Function

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 66.183.49.2 (talk) at 03:22, 11 June 2003 (further rewriting). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Functions are a basic concept which appear in almost every academic discipline. This page focuses on mathematical functions (see below).

As a mathematical term, "function" was coined by Leibniz, in 1694, to describe a quantity related to a curve; such as a curve's slope or a specific point of said curve. The word was used by Euler during the mid-18th Century to describe an expression involving various arguments; ie: y = F(x). The modern "formal" definition was made by Dirichlet, during the 19th Century


In computer science, a function is a subprogram.


In sociology, social functions are the basis of functionalism.


Mathematics

A function might refer to mapping or a map. It is a "machine" which converts any valid input into a unique output. For example, f(x)=x-1 converts every nonzero number into its inverse. Of course, 0 is not a valid input.

Formally, a function f from a set X of input values to a set Y of possibly output values (written as f: XY) is a relation between X and Y which satisfies:

  1. f is functional: if x f y (x is f-related to y) and x f z, then y = z. i.e., for each input value, there should only be one possible output value.
  2. f is total: for all x in X, there exists a y in Y such that x f y. i.e. for each input value, the formula should produce at least one output value within Y.

X, the set of input values, is called the domain of f and Y, the set of possibly output values, is called the codomain. For each input value x in the domain, the corresponding unique output value y in the codomain is denoted by f(x). The range of f is the set of all outputs {f(x) : x in the domain}. Beware that sometimes the codomain is wrongly called the range.

Consider the following three examples:

File:NotMap1.png This is not a "well-defined" function; because, the element 3, in X, is associated with two elements b and c in Y (Condition 1 is violated). This is a multivalued function.
This is not a "well-defined" function; because, the element 1, in X , is associated with nothing (Condition 2 is violated). This is a partial function.
File:Mathmap.png This is a function, called a piecewise function; of which the range is {a,c,d}. It can be stated explicitly as

Occasionally, all three relations above are called functions. In this case, the function satisfies Conditions (1) and (2) is said to be a "well-defined function" or "total function". In this encyclopedia, the terms "well-defined function", "total function" and "function" are synonymous.

A function could be specified as a formula, a relationship, and/or a rule. For example, functions such as f(x) = x2 and f(x,y)=xy are used to convert input arguments into output, via direct substitution. The first example takes some number, x, and squares it; the second example takes two numbers, x and y, and multiplies them. See How to specify a function.

Graph of a functions

The graph of a function f is the collection of all points(x, f(x)), for all x in set X. In the example of the piecewise function, the graph of f is {(1,a),(2,d),(3,c)}. There are theorems formulated or proved most easily in terms of the graph, such as the closed graph theorem.

If X and Y are real lines, then this definition is coincident with the usaul sense of graph. (an example should be added later)

Note that a function f is usually identified to its graph.

Functions with several input values

One may also consider functions that expect several input values; for instance the volume V of a right circular cone can be computed from the radius r of its base and its height h according to the rule V(r,h) = 1/3 * pi * r2 * h. We then consider the domain of V to be the set of ordered pairs of reals (r, h); and we write that V:(R × R) → R.

Images and preimages

If fX → Y is a function and A is a subset of X, then the image (or direct image) of A under f is the subset of Y defined by

f(A) := {f(x) : x in A}.

Notice that the range of f is the image f(X) of its domain. In our example, the image of {2,3} under f is f({2,3})={c,d} and the range of f is {a,c,d}.

If B is a subset of Y, we define its preimage (or inverse image) to be the subset of X defined by

f −1(B) := {x in X : f(x)&nbsp in  B}.

In our example, the preimage of {a,b} is f −1({a,b})={1}.

Note that with this definiton, f -1 becomes a function whose domain is the set of all subsets of Y (also known as the power set of Y) and whose codomain is the power set of X'.

Some consequences that follow immediately from these definitions are:

  • f(A1 ∪ A2) = f(A1) ∪ f(A2).
  • f(A1 ∩ A2) ⊆ f(A1) ∩ f(A2).
  • f −1(B1 ∪ B2) = f −1(B1) ∪ f −1(B2).
  • f −1(B1 ∩ B2) = f −1(B1) ∩ f −1(B2).
  • f(f −1(B)) ⊆ B.
  • f −1(f(A)) ⊇ A.

The results relating images and preimages to the algebra of intersection and union work for any number of sets, not just for 2.

Injective, surjective and bijective functions

Several types of functions are very useful, deserve special names:

  • injective (one-to-one) functions send different arguments to different values; in other words, if x and y are members of the domain of f, then f(x) = f(y) if and only if x = y. Our example is an injective function.
  • surjective (onto) functions have their range equal to their codomain; in other words, if y is any member of the codomain of f, then there exists at least one x such that f(x) = y.
  • bijective functions are both injective and surjective; they are often used to show that the sets X and Y are "the same" in some sense.

Examples of functions

(More can be found at List of functions.)

  • The relation wght between persons in the United States and their weights.
  • The relation between nations and their capitals.
  • The relation sqr between natural numbers n and their squares n2.
  • The relation nlog between positive real numbers x and their natural logarithms ln(x). Note that the relation between real numbers and their natural logarithms is not a function because not every real number has a natural logarithm; that is, this relation is not total and is therefore only a partial function.
  • The relation dist between points in the plane R2 and their distances from the origin (0,0).
  • The relation grav between a point in the punctured plane R2 \ {(0,0)} and the vector describing the gravitational force that a certain mass at that point would experience from a certain other mass at the origin (0,0).

n-ary function

If the domain of a function is a subset of the Cartesian product of n sets then the function is called an n-ary function. For example, the relation dist has the domain R × R and is therefore a binary function. In that case dist((x,y)) is simply written as dist(x,y).

In abstract algebra, operators such as "*" are defined as binary functions; when we write a formula such as x*y in this context, we are implictly invoking the function *(x,y).

Combining functions

The functions fX → Y and gY → Z can be composed by first applying f to an argument x and then applying g to the result. Thus one obtains a function g o f: X → Z defined by (g o f)(x) := g(f(x)) for all x in X. As an example, suppose that a plane's height at time t is given by the function h(t) and that the oxygen concentration at height x is given by the function c(x). Then (c o h)(t) describes the oxygen concentration around the plane at time t.

If fX → R and gX → R are functions with common domain X and codomain is a ring R, then one can define the sum function f + g: X → R and the product function f × g: X → R as follows:

(f + g)(x) := f(x) + g(x);
(f × g)(x) := f(x) × g(x);

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

References