Of the main (mathematics) a mathematical relation such that each element of a given set…