In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a finitary relation over a sequence of sets is a
subset
In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
of the
Cartesian product ; that is, it is a set of ''n''-tuples , each being a sequence of elements ''x''
''i'' in the corresponding ''X''
''i''. Typically, the relation describes a possible connection between the elements of an ''n''-tuple. For example, the relation "''x'' is divisible by ''y'' and ''z''" consists of the set of 3-tuples such that when substituted to ''x'', ''y'' and ''z'', respectively, make the sentence true.
The non-negative integer ''n'' that gives the number of "places" in the relation is called the ''
arity
In logic, mathematics, and computer science, arity () is the number of arguments or operands taken by a function, operation or relation. In mathematics, arity may also be called rank, but this word can have many other meanings. In logic and ...
'', ''adicity'' or ''degree'' of the relation. A relation with ''n'' "places" is variously called an ''n''-ary relation, an ''n''-adic relation or a relation of degree ''n''. Relations with a finite number of places are called ''finitary relations'' (or simply ''relations'' if the context is clear). It is also possible to generalize the concept to ''infinitary relations'' with
infinite sequences.
Definitions
; Definition : ''R'' is an ''n''-ary relation on sets is given by a subset of the Cartesian product .
Since the definition is predicated on the underlying sets , ''R'' may be more formally defined as the ()-tuple , where ''G'', called the ''graph'' of ''R'', is a subset of the Cartesian product .
As is often done in mathematics, the same symbol is used to refer to the mathematical object and an underlying set, so the statement is often used to mean is read "''x''
1, ..., ''x''
''n'' are ''R''-related" and are denoted using
prefix notation by and using
postfix notation by . In the case where ''R'' is a binary relation, those statements are also denoted using
infix notation by .
The following considerations apply:
* The set ''X''
''i'' is called the th ''domain'' of ''R''. In the case where ''R'' is a binary relation, ''X''
1 is also called simply the
''domain'' or ''set of departure'' of ''R'', and ''X''
2 is also called the
''codomain'' or ''set of destination'' of ''R''.
* When the elements of ''X''
''i'' are relations, ''X''
''i'' is called a ''nonsimple domain'' of ''R''.
* The set of such that for at least one is called the ''i''th ''domain of definition'' or ''active domain'' of ''R''. In the case where ''R'' is a binary relation, its first domain of definition is also called simply the
''domain of definition'' or ''active domain'' of ''R'', and its second domain of definition is also called the
''codomain of definition'' or ''active codomain'' of ''R''.
* When the th domain of definition of ''R'' is equal to ''X''
''i'', ''R'' is said to be ''total'' on its ''i''th domain (or on ''X''
''i'', when this is not ambiguous). In the case where ''R'' is a binary relation, when ''R'' is total on ''X''
1, it is also said to be
''left-total'' or ''serial'', and when ''R'' is total on ''X''
2, it is also said to be
''right-total'' or ''surjective''.
* When , where , , , and is a
partition of , ''R'' is said to be ''unique'' on , and is called ''a
primary key'' of ''R''. In the case where ''R'' is a binary relation, when ''R'' is unique on , it is also said to be
''left-unique'' or ''injective'', and when ''R'' is unique on , it is also said to be
''univalent'' or ''right-unique''.
* When all ''X''
''i'' are the same set ''X'', it is simpler to refer to ''R'' as an ''n''-ary relation over ''X'', called a ''
homogeneous relation''. Without this restriction, ''R'' is called a ''
heterogeneous relation''.
* When any of ''X''
''i'' is empty, the defining Cartesian product is empty, and the only relation over such a sequence of domains is the empty relation .
Let a
Boolean domain ''B'' be a two-element set, say, , whose elements can be interpreted as logical values, typically and . The
characteristic function of ''R'', denoted by ''χ''
''R'', is the
Boolean-valued function , defined by if and otherwise.
In applied mathematics,
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
and statistics, it is common to refer to a Boolean-valued function as an ''n''-ary
''predicate''. From the more abstract viewpoint of
formal logic and
model theory
In mathematical logic, model theory is the study of the relationship between theory (mathematical logic), formal theories (a collection of Sentence (mathematical logic), sentences in a formal language expressing statements about a Structure (mat ...
, the relation ''R'' constitutes a ''logical model'' or a ''relational structure'', that serves as one of many possible
interpretations of some ''n''-ary predicate symbol.
Because relations arise in many scientific disciplines, as well as in many branches of
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
and
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
, there is considerable variation in terminology. Aside from the
set-theoretic extension of a relational concept or term, the term "relation" can also be used to refer to the corresponding logical entity, either the
logical comprehension, which is the totality of
intensions or abstract properties shared by all elements in the relation, or else the symbols denoting these elements and intensions. Further, some writers of the latter persuasion introduce terms with more concrete connotations (such as "relational structure" for the set-theoretic extension of a given relational concept).
Specific values of ''n''
Nullary
Nullary (0-ary) relations count only two members: the empty nullary relation, which never holds, and the universal nullary relation, which always holds. This is because there is only one 0-tuple, the empty tuple (), and there are exactly two subsets of the (singleton) set of all 0-tuples. They are sometimes useful for constructing the base case of an
induction argument.
Unary
Unary (1-ary) relations can be viewed as a collection of members (such as the collection of
Nobel laureates) having some property (such as that of having been awarded the
Nobel Prize
The Nobel Prizes ( ; ; ) are awards administered by the Nobel Foundation and granted in accordance with the principle of "for the greatest benefit to humankind". The prizes were first awarded in 1901, marking the fifth anniversary of Alfred N ...
).
Every nullary function is a unary relation.
Binary
Binary (2-ary) relations are the most commonly studied form of finitary relations. Homogeneous binary relations (where ) include
*
Equality and
inequality, denoted by signs such as = and < in statements such as "", or
*
Divisibility, denoted by the sign , in statements such as "".
Heterogeneous binary relations include
*
Set membership, denoted by the sign ∈ in statements such as "".
Ternary
Ternary (3-ary) relations include, for example, the
binary functions, which relate two inputs and the output. All three of the domains of a homogeneous ternary relation are the same set.
Example
Consider the ternary relation ''R'' "''x'' thinks that ''y'' likes ''z''" over the set of people , defined by:
: .
''R'' can be represented equivalently by the following table:
Here, each row represents a triple of ''R'', that is it makes a statement of the form "''x'' thinks that ''y'' likes ''z''". For instance, the first row states that "Alice thinks that Bob likes Denise". All rows are distinct. The ordering of rows is insignificant but the ordering of columns is significant.
The above table is also a simple example of a
relational database
A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
, a field with theory rooted in
relational algebra
In database theory, relational algebra is a theory that uses algebraic structures for modeling data and defining queries on it with well founded semantics (computer science), semantics. The theory was introduced by Edgar F. Codd.
The main applica ...
and applications in data management.
Computer scientists, logicians, and mathematicians, however, tend to have different conceptions what a general relation is, and what it is consisted of. For example, databases are designed to deal with empirical data, which is by definition finite, whereas in mathematics, relations with infinite arity (i.e., infinitary relation) are also considered.
History
The logician
Augustus De Morgan, in work published around 1860, was the first to articulate the notion of relation in anything like its present sense. He also stated the first formal results in the theory of relations (on De Morgan and relations, see Merrill 1990).
Charles Peirce,
Gottlob Frege
Friedrich Ludwig Gottlob Frege (; ; 8 November 1848 – 26 July 1925) was a German philosopher, logician, and mathematician. He was a mathematics professor at the University of Jena, and is understood by many to be the father of analytic philos ...
,
Georg Cantor
Georg Ferdinand Ludwig Philipp Cantor ( ; ; – 6 January 1918) was a mathematician who played a pivotal role in the creation of set theory, which has become a foundations of mathematics, fundamental theory in mathematics. Cantor establi ...
,
Richard Dedekind and others advanced the theory of relations. Many of their ideas, especially on relations called
orders, were summarized in ''
The Principles of Mathematics'' (1903) where
Bertrand Russell
Bertrand Arthur William Russell, 3rd Earl Russell, (18 May 1872 – 2 February 1970) was a British philosopher, logician, mathematician, and public intellectual. He had influence on mathematics, logic, set theory, and various areas of analytic ...
made free use of these results.
In 1970,
Edgar Codd proposed a
relational model for
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s, thus anticipating the development of
data base management systems.
See also
*
Incidence structure
*
Hypergraph
*
Logic of relatives
*
Logical matrix
*
Partial order
*
Predicate (mathematical logic)
*
Projection (set theory)
*
Reflexive relation
*
Relation algebra
*
Relational algebra
In database theory, relational algebra is a theory that uses algebraic structures for modeling data and defining queries on it with well founded semantics (computer science), semantics. The theory was introduced by Edgar F. Codd.
The main applica ...
*
Relational model
*
Relations (philosophy)
References
Bibliography
*
*
*
*
*
*
*
*
Lewis, C.I. (1918)
A Survey of Symbolic Logic, Chapter 3: Applications of the Boole–Schröder Algebra, via
Internet Archive
The Internet Archive is an American 501(c)(3) organization, non-profit organization founded in 1996 by Brewster Kahle that runs a digital library website, archive.org. It provides free access to collections of digitized media including web ...
*
*
*
*
*
Peirce, C.S. (1870), "Description of a Notation for the Logic of Relatives, Resulting from an Amplification of the Conceptions of Boole's Calculus of Logic", ''Memoirs of the American Academy of Arts and Sciences'' 9, 317–78, 1870. Reprinted, ''Collected Papers'' CP 3.45–149, ''Chronological Edition'' CE 2, 359–429.
*
Peirce, C.S. (1984) ''Writings of Charles S. Peirce: A Chronological Edition, Volume 2, 1867–1871''. Peirce Edition Project, eds. Indiana University Press.
*
*
* 2nd edition, J. Corcoran, ed. Indianapolis IN: Hackett Publishing.
*
Ulam, S.M. and
Bednarek, A.R. (1990), "On the Theory of Relational Structures and Schemata for Parallel Computation", pp. 477–508 in A.R. Bednarek and Françoise Ulam (eds.), ''Analogies Between Analogies: The Mathematical Reports of S.M. Ulam and His Los Alamos Collaborators'', University of California Press, Berkeley, CA.
*
*
{{Authority control
Mathematical logic
Mathematical relations