How do you define a function?

1 Answer
Jun 28, 2015

The definition for a function describes the relationship between objects in the 'domain' of the function and objects in its 'range'.

See explanation...

Explanation:

The definition for a function describes the relationship between objects in the 'domain' of the function and objects in its 'range' in such a way that for any object in the domain there is a unique corresponding object in the range.

The definition of a function can take several forms. Here are some popular ones:

Formula

A function definition can be a formula which given a value allows you to compute another value. For example:

#f(x) = 2x+3#

is a function definition which given a number #x# tells you that you can compute #f(x)# by multiplying #x# by two then add three.

This example function definition works as a definition of a function from integers to integers, rational numbers to rational numbers or real numbers to real numbers.

Explicit mapping

A function definition can tell you explicitly what maps to what. This may be expressed as a set of ordered pairs.

For example, the set #{ (1, 1), (2, 4), (3, 9), (4, 16) }# can be viewed as the definition of a function from the set #{ 1,2,3,4 }# to the set #{ 1, 4, 9, 16 }#, which maps #1# to #1#, #2# to #4#, etc.

Miscellaneous

For example, define a function #p:NN->NN# where #p(n) =# the #n#th prime number. So #p(1) = 2#, #p(2) = 3#, etc.

This is obviously a consistent definition of a function, but there is no formula for the #n#th prime number.