Relation (mathematics)
In mathematics, a relation is used to describe certain properties of things. That way, certain things may be connected in some way; this is called a relation. It is clear, that things are either related, or they are not, there are no in-betweens.
Formally, a relation is a set of n-tuples of equal degree. Thus a binary relation is a set of pairs, a ternary relation a set of 3-tuples, and so forth. A ternary relation however is always expressable as two binary relations. Specifically in the context of functions, this is known as currying.
Particularly concerning binary relations, the set of all the starting point is called the domain and the sets of the ending points is the range. The domain is the x's, and the range is the y's.
An example for such a relation might be a function. Functions associate keys with values. The set of all functions is a subset of the set of all relations - a function is a relation where the first value of every tuple is unique through the set.
Other well-known relations are the Equivalence relation and the Order relation. That way, sets of things can be ordered: Take the first element of a set, it is either equal to the element looked for, or there is an order relation that can be used to classify it. That way, the whole set can be classified (compared to some arbitrarily chosen element).
Relations can be transitive. One example of a transitive relation is "smaller-than". If X "is smaller than" Y, and Y is "smaller than" Z, then X "is smaller than" Z
Relations can be symmetric. One example of a symmetric relation is "is equal to". If X "is equal to" Y, Y "is equal to" X.
Relations can be reflexive. One example of a reflexive relation is "is equal to". X "is equal to" X.