Overview

A relation is a connection, correspondence or association between elements or entities. In everyday use it names social, causal or organizational ties; in science and engineering it denotes precise structures used to model connections. The term covers informal ties (family, commercial or diplomatic relations) and formal constructs in mathematics, logic, databases and linguistics.

Mathematical and logical relations

Formally, an n‑ary relation on sets A1, A2, …, An is any subset of the Cartesian product A1 × A2 × … × An. The most common case is a binary relation: a set of ordered pairs drawn from A × B (often A = B). Basic vocabulary includes arity (the number of components), domain and range (sets of first and second coordinates), and examples such as orderings, equivalences and graphs of predicates.

  • Reflexive — every element is related to itself.
  • Symmetric — if aRb then bRa.
  • Transitive — if aRb and bRc then aRc.
  • Antisymmetric — aRb and bRa imply a = b.

Special classes include equivalence relations (reflexive, symmetric, transitive) and partial orders (reflexive, antisymmetric, transitive). Relations are different from functions: a function is a relation with at most one output for each input.

Operations and representations

Common operations on relations are converse (or inverse), composition, union, intersection and taking closures such as the transitive closure. Binary relations are often represented as directed graphs or adjacency matrices, which supports visualization and algorithmic analysis (reachability, connectedness).

Relations in databases

In the relational database model a relation corresponds to a table: tuples are rows and attributes are columns. The model emphasizes declarative specification, keys and integrity constraints. Queries manipulate relations by selection, projection, join, union, difference and product; relational algebra and relational calculus formalize these operations. The relational model remains foundational for data modeling and query languages.

Social, linguistic and applied senses

Outside formal fields, relation denotes interpersonal ties (kinship, friendship, professional links), institutional links (trade or diplomatic relations) and patterned connections studied in social network analysis. In linguistics and semantics, relations describe connections between words and concepts (synonymy, antonymy, hyponymy) and between predicates in logical form.

History and usage

The abstract set-theoretic concept of relation developed with modern logic and set theory. The relational model for data became widely known in the later 20th century. When using the term it helps to distinguish informal, empirical relations from formal mathematical relations because methods for representation, inference and verification differ.