In mathematics, a relation denotes some kind of relationship between two objects in a set, which may or may not hold. As an example, "is less than" is a relation on the set of natural numbers; it holds, for instance, between the values 1 and 3 (denoted as 1 < 3), and likewise between 3 and 4 (denoted as 3 < 4), but not between the values 3 and 1 nor between 4 and 4, that is, 3 < 1 and 4 < 4 both evaluate to false.As another example, "is sister of" is a relation on the set of all people, it holds e.g. between Marie Curie and Bronisława Dłuska, and likewise vice versa.Set members may not be in relation "to a certain degree" – either they are in relation or they are not.
Formally, a relation R over a set X can be seen as a set of ordered pairs (x,y) of members of X.The relation R holds between x and y if (x,y) is a member of R.For example, the relation "is less than" on the natural numbers is an infinite set Rless of pairs of natural numbers that contains both (1,3) and (3,4), but neither (3,1) nor (4,4).The relation "is a nontrivial divisor of" on the set of one-digit natural numbers is sufficiently small to be shown here:Rdv = { (2,4), (2,6), (2,8), (3,6), (3,9), (4,8) }; for example 2 is a nontrivial divisor of 8, but not vice versa, hence (2,8) ∈ Rdv, but (8,2) ∉ Rdv.