---
tag: 08EJC6Q25H
kind: definition
name: Binary relation
msc: ["03E20"]
defines: 05AVARPXA2
uses: [0C81YBVTWH, 0FE8Q5S42Y]
sources:
  - url: https://en.wikipedia.org/wiki/Binary_relation
    locator: lead section
---

## Definition

Let $A$ and $B$ be [[sets|0SJ3RX9TXA]].
A binary relation from $A$ to $B$ is a [[subset|0FE8Q5S42Y]] $R$ of the [[Cartesian product|0C81YBVTWH]] $A \times B$.
For $a \in A$ and $b \in B$, write $a \mathrel{R} b$ when $(a, b) \in R$.
A binary relation on $A$ is a binary relation from $A$ to $A$.

## Remarks

Examples on $\mathbb{Z}$ are $\le$, $=$ and divisibility $\mid$.
A relation on a finite set can be drawn as a directed graph, with an arrow from $a$ to $b$ when $a \mathrel{R} b$.
A [[function|0XHDTE5YMZ]] is a special kind of binary relation.

## Explanations

### L1 human

A relation is a rule that says which pairs belong together.
For the relation "divides" on $\{1, 2, 3, 4\}$, the pair $(2, 4)$ is in the relation and the pair $(3, 4)$ is not.
