# lec1012 - Functions A function is a special type of...

This preview shows pages 1–4. Sign up to view the full content.

Functions A function is a special type of relation. In particular, here are the rules for a relation to be a function, for an arbitrary relation R A x B : For each element in a A, we must have EXACTLY 1 element in R such that a is the first term of the ordered pair. In English that means for each element in the set A it MUST BE related to exactly one element in the set B. Note that this means we must have |A| |B|. Typically, we call the set A the domain and the set B the co-domain. It is possible that all of the possible values of f(a) (when a A) form only a proper subset of B. Thus the set of possible values of the function, which can be more formally written as follows: f(A) = { f(a) | a A } is known as the range of the function. Here is an example of a function : Let the set A = { the set of words in the English language } For all a A, define f(a) as follows: f(a) = the number of letters in the word a. Thus, we have that the domain is the set of all English words, the co-domain is the set of all positive integers, and the range is all positive integers less than 29, (assuming that antidisestablishmentarianism is the longest word in the English language).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
However, recall the relation I showed you in an earlier lecture: Cocktails = {(Orange Juice, Vodka), (Cranberry Juice, Vodka), (Coke, Rum), (Orange Juice, Peach Schnapps) } This is not a function because Orange Juice is related to more than one element of the range. Note that you can define functions on multiple sets, just as you can define relations on multiple sets. Consider the following: f(a,b) = a+b. This is a function of two real number variables. Notice that different ordered pairs of this function map to the same element in the domain. For example, f(2,3) = f(4,1). We have already talked about composing relations together. Now we will introduce function composition. Consider the following example, which uses the first function from this lecture: f(a) = the number of letters in the word a. g(b) = the sum of the digits in the integer b. Consider inputting the output from f(a) into the function g. Pictorially, we get something like this:
Composing Functions produces a function Let f: A B and g: B C be two functions. The composition of f and g as relations defines a function g f : A C, such that g f (a) = g(f(a)). We need to show that for each element a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

lec1012 - Functions A function is a special type of...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online