Functions
| Properties of Functions | |||
| Terms | Description (with some alternate ways of looking at the definition) | Examples | |
| domain, pre-image | An element from the first set. | x, f-1(y) | |
| range, image, codomain | An element in the second set. | y, f(x) | |
| One-to-one, injection |
|
YES | NO |
| For integers, f(n)=n-1 Given any n, there is only one value of n+1. |
For integers, f(n)=n2+1 both f(-1) and f(1)=2 Therefore 2 is not unique. NOTE: If we restricted the domain to positive values of n, then it would be one-to-one. |
||
| onto, surjection |
|
For integers, f(n)=floor(n/2) all values of floor(n/2) return values value in the set of integers. |
For integers, f(n)=n2+1 Since n2+1 is always positive the range excludes part of the set of integers.
NOTE if we restricted the range to positive integers greater than 1, it would be onto. |
| bijection, one-to-one correspondence, invertible |
|
f(x)=x+1 | |
Inverses
A function that is a bijection has an inverse: f-1(b)=a when f(a)=b.
To determine the inverse function, start with the function. For example, y=f(x)=x+6.
Solve for x: x = y - 6 = f-1(y)
f-1(y) = y-6 or f(x) = x-6
A function which generally does not have an inverse may have an inverse if the domain is restricted.
f(x)=x2 does not have an inverse. There are two values for y=1: x=1 and x=-1.
However, if f(x)=x2 is restricted to x>0, then the function has an inverse.
Composite functions
If f(a)=b and f(b)=c, then f¤g(a)=f(g(a))
f¤g(a)=f(g(a))=g(f(a)=g¤f(a)if and only if f and g are inverses of each other.
Example 1
Let f(x)=x+6, g(x)=x2+2
g(3)=32+2=11, f(11)=11+6=17
Example 2
Let f(x)=upcase(x) and let g(x) = substr(var1,1,3)
f¤g(a)=f(g(a))=upcase(substr(var1,1,3)
The result of the composite function is first to take the first 3 letters from var1 and then to convert them to uppercase.
Depending on the computer language, this is a frequent use of composite
functions. You will also see this in compound SELECT clauses in SQL.
You are the visitor to this site.