in mathematics, a relation is how sets of numbers relate to each other
a relation consists of a relation name, typically a letter, and an equation
for example:
types of relations
set is the input set of the relation and set is the output set of the relation
there are four properties that a relation may have:
- each element of X must be paired with at least one element of Y
- no element of X may be paired with more than one element of Y
- each element of Y must be paired with at least one element of X
- no element of Y may be paired with more than one element of X
one to one (also called a bijective relation) - has properties 1 2 3 4
each distinct input corresponds to a distinct output, and vice versa. this makes the relation invertible
for example,
many to one - has properties 1 2 3
an output can correspond to many possible inputs
for example,
one to many - has properties 1 3 4
an input may correspond to many possible outputs
for example,
many to many - has properties 1 3
an input can correspond to many outputs and an output can correspond to many inputs.
for example,
functions
a function is a relation in which each input has exactly one output - a one-to-one relation or a many-to-one relation