Diagonal Relation is Right Identity

Theorem
Let $\mathcal R \subseteq S \times T$ be a relation on $S \times T$.

Then:
 * $\mathcal R \circ I_S = \mathcal R$

where $I_S$ is the identity mapping on $S$, and $\circ$ signifies composition of relations.

Corollary
Let $f: S \to T$ be a mapping.

Then:
 * $f \circ I_S = f$

where $I_S$ is the identity mapping on $S$, and $\circ$ signifies composition of mappings.

Proof
We use the definition of relation equality, as follows:

Equality of Codomains
The codomains of $\mathcal R$ and $\mathcal R \circ I_S$ are both equal to $T$ from Codomain of Composite Relation.

Equality of Domains
The domains of $\mathcal R$ and $\mathcal R \circ I_S$ are also easily shown to be equal.

From Domain of Composite Relation, $\operatorname{Dom} \left({\mathcal R \circ I_S}\right) = \operatorname{Dom} \left({I_S}\right)$.

But from the definition of the identity mapping, $\operatorname{Dom} \left({I_S}\right) = \operatorname{Im} \left({I_S}\right) = S$.

Equality of Relations
The composite of $I_S$ and $\mathcal R$ is defined as:


 * $\mathcal R \circ I_S = \left\{{\left({x, z}\right) \in S \times T: \exists y \in S: \left({x, y}\right) \in I_S \land \left({y, z}\right) \in \mathcal R}\right\}$

But by definition of the identity mapping on $S$, we have that:
 * $\left({x, y}\right) \in I_S \implies x = y$

Hence:
 * $\mathcal R \circ I_S = \left\{{\left({y, z}\right) \in S \times T: \exists y \in S: \left({y, y}\right) \in I_S \land \left({y, z}\right) \in \mathcal R}\right\}$

But as $\forall y \in S: \left({y, y}\right) \in I_S$, this means:
 * $\mathcal R \circ I_S = \left\{{\left({y, z}\right) \in S \times T: \left({y, z}\right) \in \mathcal R}\right\}$

That is:
 * $\mathcal R \circ I_S = \mathcal R$

Hence the result.

Proof of Corollary
As a mapping is by definition also a relation, this result also holds for a mapping directly.

Also see

 * Identity Mapping is Left Identity