Skip to main content
Statistics LibreTexts

1.3: Relations

  • Page ID
    10118
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    \(\newcommand{\R}{\mathbb{R}}\) \(\newcommand{\N}{\mathbb{N}}\) \(\newcommand{\Z}{\mathbb{Z}}\)

    Relations play a fundamental role in probability theory, as in most other areas of mathematics.

    Definitions and Constructions

    Suppose that \(S\) and \(T\) are sets. A relation from \(S\) to \(T\) is a subset of the product set \(S \times T\).

    1. The domain of \(R\) is the set of first coordinates: \(\text{domain}(R) = \left\{x \in S: (x, y) \in R \text{ for some } y \in T\right\}\).
    2. The range of \(R\) is the set of second coordinates: \(\text{range}(R) = \left\{y \in T: (x, y) \in R \text{ for some } x \in S\right\}\).

    A relation from a set \(S\) to itself is a relation on \(S\).

    As the name suggests, a relation \(R\) from \(S\) into \(T\) is supposed to define a relationship between the elements of \(S\) and the elements of \(T\), and so we usually use the more suggestive notation \(x\,R\,y\) when \((x, y) \in R\). Note that the domain of \(R\) is the projections of \( R \) onto \( S \) and the range of \( R \) is the projection of \( R \) onto \( T \).

    Basic Examples

    Suppose that \(S\) is a set and recall that \(\mathscr{P}(S)\) denotes the power set of \(S\), the collection of all subsets of \(S\). The membership relation \(\in\) from \(S\) to \(\mathscr{P}(S)\) is perhaps the most important and basic relationship in mathematics. Indeed, for us, it's a primitive (undefined) relationship—given \(x\) and \(A\), we assume that we understand the meaning of the statement \(x \in A\).

    Another basic primitive relation is the equality relation \(=\) on a given set of objects \(S\). That is, given two objects \(x\) and \(y\), we assume that we understand the meaning of the statement \(x = y\).

    Other basic relations that you have seen are

    1. The subset relation \(\subseteq\) on \(\mathscr{P}(S)\).
    2. The order relation \(\le\) on \(\R\)

    These two belong to a special class of relations known as partial orders that we will study in the next section. Note that a function \(f\) from \(S\) into \(T\) is a special type of relation. To compare the two types of notation (relation and function), note that \(x\,f\,y\) means that \(y = f(x)\).

    Constructions

    Since a relation is just a set of ordered pairs, the set operations can be used to build new relations from existing ones.

    if \(Q\) and \(R\) are relations from \(S\) to \(T\), then so are \(Q \cup R\), \(Q \cap R\), \(Q \setminus R\).

    1. \(x(Q \cup R)y\) if and only if \(x\,Q\,y\) or \(x\,R\,y\).
    2. \(x(Q \cap R)y\) if and only if \(x\,Q\,y\) and \(x\,R\,y\).
    3. \(x(Q \setminus R)y\) if and only if \(x\,Q\,y\) but not \(x\,R\,y\).
    4. If \(Q \subseteq R\) then \(x\,Q\,y\) implies \(x\,R\,y\).

    If \(R\) is a relation from \(S\) to \(T\) and \(Q \subseteq R\), then \(Q\) is a relation from \(S\) to \(T\).

    The restriction of a relation defines a new relation.

    If \(R\) is a relation on \(S\) and \(A \subseteq S\) then \(R_A = R \cap (A \times A)\) is a relation on \(A\), called the restriction of \(R\) to \(A\).

    The inverse of a relation also defines a new relation.

    If \(R\) is a relation from \(S\) to \(T\), the inverse of \(R\) is the relation from \(T\) to \(S\) defined by \[ y\,R^{-1}\,x \text{ if and only if } x\,R\,y \]

    Equivalently, \(R^{-1} = \{(y, x): (x, y) \in R\}\). Note that any function \(f\) from \(S\) into \(T\) has an inverse relation, but only when the \(f\) is one-to-one is the inverse relation also a function (the inverse function). Composition is another natural way to create new relations from existing ones.

    Suppose that \(Q\) is a relation from \(S\) to \(T\) and that \(R\) is a relation from \(T\) to \(U\). The composition \(Q \circ R\) is the relation from \(S\) to \(U\) defined as follows: for \(x \in S\) and \(z \in U\), \(x(Q \circ R)z\) if and only if there exists \(y \in T\) such that \(x\,Q\,y\) and \(y\,R\,z\).

    Note that the notation is inconsistent with the notation used for composition of functions, essentially because relations are read from left to right, while functions are read from right to left. Hopefully, the inconsistency will not cause confusion, since we will always use function notation for functions.

    Basic Properties

    The important classes of relations that we will study in the next couple of sections are characterized by certain basic properties. Here are the definitions:

    Suppose that \(R\) is a relation on \(S\).

    1. \(R\) is reflexive if \(x\,R\,x\) for all \(x \in S\).
    2. \(R\) is irreflexive if no \(x \in S\) satisfies \(x\,R\,x\).
    3. \(R\) is symmetric if \(x\,R\,y\) implies \(y\,R\,x\) for all \(x, \, y \in S\).
    4. \(R\) is anti-symmetric if \(x\,R\,y\) and \(y\,R\,x\) implies \(x = y\) for all \(x, \, y \in S\).
    5. \(R\) is transitive if \(x\,R\,y\) and \(y\,R\,z\) implies \(x\,R\,z\) for all \(x, \, y, \, z \in S\).

    The proofs of the following results are straightforward, so be sure to try them yourself before reading the ones in the text.

    A relation \(R\) on \(S\) is reflexive if and only if the equality relation \(=\) on \(S\) is a subset of \(R\).

    Proof

    This follows from the definitions. \( R \) is reflexive if and only if \( (x, x) \in R \) for all \( x \in S \).

    A relation \(R\) on \(S\) is symmetric if and only if \(R^{-1} = R\).

    Proof

    Suppose that \( R \) is symmetric. If \( (x, y) \in R \) then \( (y, x) \in R \) and hence \( (x, y) \in R^{-1} \). If \( (x, y) \in R^{-1} \) then \( (y, x) \in R \) and hence \( (x, y) \in R \). Thus \( R = R^{-1} \). Conversely, suppose \( R = R^{-1} \). If \( (x, y) \in R \) then \( (x, y) \in R^{-1} \) and hence \( (y, x) \in R \).

    A relation \(R\) on \(S\) is transitive if and only if \(R \circ R \subseteq R\).

    Proof

    Suppose that \( R \) is transitive. If \( (x, z) \in R \circ R \) then there exists \( y \in S \) such that \( (x, y) \in R \) and \( (y, z) \in R \). But then \( (x, z) \in R \) by transitivity. Hence \( R \circ R \subseteq R \). Conversely, suppose that \( R \circ R \subseteq R \). If \( (x, y) \in R \) and \( (y, z) \in R \) then \( (x, z) \in R \circ R \) and hence \( (x, z) \in R \). Hence \( R \) is transitive.

    A relation \(R\) on \(S\) is antisymmetric if and only if \(R \cap R^{-1}\) is a subset of the equality relation \(=\) on \(S\).

    Proof

    Restated, this result is that \( R \) is antisymmetric if and only if \( (x, y) \in R \cap R^{-1} \) implies \( x = y \). Thus suppose that \( R \) is antisymmetric. If \( (x, y) \in R \cap R^{-1} \) then \( (x, y) \in R \) and \( (x, y) \in R^{-1} \). But then \( (y, x) \in R \) so by antisymmetry, \( x = y \). Conversely suppose that \( (x, y) \in R \cap R^{-1} \) implies \( x = y \). If \( (x, y) \in R \) and \( (y, x) \in R \) then \( (x, y) \in R^{-1} \) and hence \( (x, y) \in R \cap R^{-1} \). Thus \( x = y \) so \( R \) is antisymmetric.

    Suppose that \(Q\) and \(R\) are relations on \(S\). For each property below, if both \(Q\) and \(R\) have the property, then so does \(Q \cap R\).

    1. reflexive
    2. symmetric
    3. transitive
    Proof
    1. Suppose that \( Q \) and \( R \) are reflexive. Then \( (x, x) \in Q \) and \( (x, x) \in R \) for each \( x \in S \) and hence \( (x, x) \in Q \cap R \) for each \( x \in S \). Thus \( Q \cap R \) is reflexive.
    2. Suppose that \( Q \) and \( R \) are symmetric. If \( (x, y) \in Q \cap R \) then \( (x, y) \in Q \) and \( (x, y) \in R \). Hence \( (y, x) \in Q \) and \( (y, x) \in R \) so \( (y, x) \in Q \cap R \). Hence \( Q \cap R \) is symmetric.
    3. Suppose that \( Q \) and \( R \) are transitive. If \( (x, y) \in Q \cap R \) and \( (y, z) \in Q \cap R \) then \( (x, y) \in Q \), \( (x, y) \in R \), \( (y, z) \in Q \), and \( (y, z) \in R \). Hence \( (x, z) \in Q \) and \( (x, z) \in R \) so \( (x, z) \in Q \cap R \). Hence \( Q \cap R \) is transitive.

    Suppose that \(R\) is a relation on a set \(S\).

    1. Give an explicit definition for the property \(R\) is not reflexive.
    2. Give an explicit definition for the property \(R\) is not irreflexive.
    3. Are any of the properties \(R\) is reflexive, \(R\) is not reflexive, \(R\) is irreflexive, \(R\) is not irreflexive equivalent?
    Answer
    1. \( R \) is not reflexive if and only if there exists \( x \in S \) such that \( (x, x) \notin R \).
    2. \( R \) is not irreflexive if and only if there exists \( x \in S \) such that \( (x, x) \in R \).
    3. Nope.

    Suppose that \(R\) is a relation on a set \(S\).

    1. Give an explicit definition for the property \(R\) is not symmetric.
    2. Give an explicit definition for the property \(R\) is not antisymmetric.
    3. Are any of the properties \(R\) is symmetric, \(R\) is not symmetric, \(R\) is antisymmetric, \(R\) is not antisymmetric equivalent?
    Answer
    1. \( R \) is not symmetric if and only if there exist \( x, \, y \in S \) such that \( (x, y) \in R \) and \( (y, x) \notin R \).
    2. \( R \) is not antisymmetric if and only if there exist distinct \( x, \, y \in S \) such that \( (x, y) \in R \) and \( (y, x) \in R \).
    3. Nope.

    Computational Exercises

    Let \(R\) be the relation defined on \(\R\) by \(x\,R\,y\) if and only if \(\sin(x) = \sin(y)\). Determine if \(R\) has each of the following properties:

    1. reflexive
    2. symmetric
    3. transitive
    4. irreflexive
    5. antisymmetric
    Answer
    1. yes
    2. yes
    3. yes
    4. no
    5. no

    The relation \(R\) in the previous exercise is a member of an important class of equivalence relations.

    Let \(R\) be the relation defined on \(\R\) by \(x\,R\,y\) if and only if \(x^2 + y^2 \le 1\). Determine if \(R\) has each of the following properties:

    1. reflexive
    2. symmetric
    3. transitive
    4. irreflexive
    5. antisymmetric
    Answer
    1. no
    2. yes
    3. no
    4. no
    5. no

    This page titled 1.3: Relations is shared under a CC BY 2.0 license and was authored, remixed, and/or curated by Kyle Siegrist (Random Services) via source content that was edited to the style and standards of the LibreTexts platform.

    • Was this article helpful?