Introduction to functions and maps
A function or map is a way taking elements from one set and using them to find an element of another set. Usually in when you are first learning about functions both of these sets are taken to be the real numbers ( ie 1,2,1/2,pi etc). So any function must have three things:
- A domain
- A co-domain or range
- A “rule” for assigning each element of the domain to a unique element of the co-domain.
Important Points
There are some important things about functions, in particular part 3, which you need to remember.
Firstly the function must be able to be applied to every element of the domain so f(x) = 1/x isn’t a function from the real numbers to the real numbers since 0 cant be assigned a value, as 1/0 isn’t a real number. There are two ways round this problem, we can define the co-domain not to include 0 (ie ) or can give 1/0 a different rule, eg f(x) = 1/x for all
and f(0) = 7.
However not every element in the co-domain needs to be assigned to something so is a valid function even though nothing goes to -1
Every element of the domain is assigned a unique element of the c0-domain. This uniqueness is often a source of confusion – here what we mean is that the function only assigns a single element of the co-domain to each element of the domain, but more than one element of the domain can be assigned the same element of the co-domain.
Simple examples
Here are some simple examples of functions from the real numbers to the real numbers.
– This simply applys this operation to any number and give you another number.
for $ x \not 0 $ and
– This takes the reciprocal of a number unless that number is zero where the reciprocal is undefined so gives 7.
-Note that f(a) = f(-a) and nothing gives f(x) = -1 however this is still a function as f(x) is defined for all x and f(x) gives only one answer.
Composing Functions
You can compose two or more functions to form a new function. Consider two functions f and g both from the reals to the reals, f composed with g, written, fg or is given by
so if f = x+1 and g=2x fg(x) = f(2x) = 2x+1
Note that in order to do this the domain of g has to be the same as the co-domain of f.
Inverses and the Identity map
The identity map or function is the function which does nothing. If I is the identity on the reals the I(x) = x.
The inverse of a function , written
, is the function which when composed with f gives the identity. There are two types of inverse, a right sided inverse and a left sided inverse, depending upon which side you compose them with f.
g is the left sided inverse of f is
gf(x) = I(x) = x
and h is the right sided inverse of f if
fh(x) = I(x) = x
If there is a function h such that
hf = fh = I
then h is said to be a two sided inverse of f and is often simply refereed to as the inverse of f.
Note that not all functions have inverses, for example x2 has no inverse, but when a function does have one it is unique.
Comments Left