FUNCTION:
Let and be nonempty sets. A function from to (denoted: ) is an assignment of EXACTLY ONE element of to each element of .
If is the unique element of assigned by the function to the element , we write
Functions are also maps
From each element in , one element maps to at LEAST one element in basically
RELATIONS:
A relation from to is just a subset of . A function can also be defined in terms of a relation from to . A relation from to that contains one, and ONLY ONE, ordered pair for every element , defines a function from to .
This function is defined by the assignment , where is the unique ordered pair in the relation that has as its first element
If and , how many relations do we have from ?
- The total number of ordered pairs we can have from their product is going to be . So, we then have
- A relation is simply a subset of this product, and for each pair , you have two choices:
- Either the pair is in the relation
- It is NOT in the relation
- Thus, for each of the pairs, there are two choices: it is either in the relation or not. This leads to a total number of possible relations being:
Examples:
If you are given two sets and and the relation , is this a function? NO, because 1 maps to 5 and 7, when we said a function should make map to EXACTLY one element of
If you are given the relation , is this a function? YES, although you might be saying “but but but 5 is mapped to twice” that does not matter. It matters that the first element is not mapped to two different numbers in . If the numbers in are mapped two by TWO DIFFERENT ELEMENTS FROM , then that’s fine
DOMAIN:
If is a function from to , we say that is the domain of and is the codomain of .
If , we say that is the image of and is the preimage of .
The range, or image, of is the set of all images of elements of . This is best explained with an example
Example:
If we are given this relation , answer the following questions:
- Is this relation a function?
- What is the domain of this relation?
- What is the image/range of this relation?
- This relation IS a function, since 5 is mapped to by two different elements of . The elements of are unique and are not mapped twice.
- The domain of this relation: . Remember, the domain is the first element is each ordered pair
- The image of this relation:
If you are given this relation: , answer the same questions above
- This is NOT a function, since 1 is mapped to two elements and 2 is mapped to two elements
- The domain of this relation:
- The image of this relation:
Two functions are considered equal when they have:
- The same domain
- The same codomain
- Map each element of the domain to the same element in the codomain
Another way to describe range:
- The range of a function, denoted as or , is the set of ALL values that maps to in the codomain . In other words, it is the set of OUTPUT values of the function
- The range is ALWAYS a subset of the codomain , because maps elements from
Is this a function?
- Yes, each element in is not mapped to two different elements in . Although is never mapped to anything, that’s fine. It doesn’t HAVE to be mapped.
- The domain of this function:
- The codomain of this function:
- The range/image of this function:
We don’t include in the domain of since is never mapped to anything. Although some elements in are not mapped to anything, it is still considered the codomain since the codomain is ALL elements of
If we have and , and we have the relation defined as:
- Is this relation a function
- What is the domain and codomain of this relation
- What is the range/image of this relation
- This relation IS a function, this is because for every , there will always be ONE that will map to. Meaning if , 1 ONLY gets mapped to . If , 2 ONLY gets mapped to , and so on
- The domain of this function is and the codomain of this function:
- The range/image of this function: , it is all perfect squares
If we have , which is just , and , and we are given the relation:
- Is this relation a function
- This is NOT a function, because for , you can have be either the + or - value of its square root. So, if we had , this means either or , 1 maps to two values, so this is not a function
We have different types of functions that we will talk about…yay!
- Injective functions
- Surjective functions
- Bijective functions
- Inverse functions
INJECTIVE FUNCTIONS:
A function is said to be injective, or one-to-one, IF AND ONLY IF distinct elements of the domain have distinct images in the range of
Examples:
If we had the function , this is NOT an injective function, because 1 in the codomain is mapped to twice by two distinct elements in the domain.
If we had something like , this IS an injective function
SURJECTIVE FUNCTION:
A function is said to be surjective, or onto, IF AND ONLY IF every element of the codomain is in the range of .
Examples:
If we are given and and we are given this function: , then this is not surjective. Because, in our function, the range would be , which is NOT equal to the codomain .
If we are given and and the function , then this IS considered surjective
BIJECTIVE FUNCTIONS:
A function is said to be bijective IF AND ONLY IF it is BOTH injective and surjective
Example:
If we are given and and we are given this function: , this function is both surjective AND injective, making it a bijective function
INVERSE FUNCTION:
If is a bijective function, then its inverse relation is also a function
In this case, we say that is invertible
The surjectivity of guarantees that is defined al ALL elements of ; the injectivity of guarantees that maps each element of to a unique element of
Example: If we are given , we have an inverse function
If a function is not bijective, it can still have an inverse relation, mind you, i’m not saying FUNCTON, it can have an inverse RELATION:
Let be:
Obviously this function is not injective, since , but this doesn’t mean it doesn’t have an inverse RELATION. An inverse relation is defined as:
This relation becomes a function IF AND ONLY IF it is bijective
So, for the above example, we can still have an inverse relation
🤓 It is important to note that:
- All functions are relations
- Not all relations are functions
this is common sense if you think about it
COMPOSITION OF FUNCTIONS:
If and are functions, then the composition (which is always defined as a relation) is a function.
So, if we had a function , and we wanted to find the value of , this would be:
. This makes sense when you trace it with the image above