Difference between revisions of "Relation composition"

MyWikiBiz, Author Your Legacy — Saturday November 23, 2024
Jump to navigationJump to search
(TeX markup)
(update)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
In [[logic]] and [[mathematics]], '''relation composition''', or the composition of [[relation (mathematics)|relations]], is the generalization of [[function composition]], or the composition of [[function (mathematics)|functions]].
+
<font size="3">&#9758;</font> This page belongs to resource collections on [[Logic Live|Logic]] and [[Inquiry Live|Inquiry]].
 +
 
 +
'''Relation composition''', or the composition of [[relation (mathematics)|relations]], is the generalization of function composition, or the composition of functions.&nbsp; The following treatment of relation composition takes the &ldquo;strongly typed&rdquo; approach to relations that is outlined in the article on [[relation theory]].
  
 
==Preliminaries==
 
==Preliminaries==
  
The first order of business is to define the operation on [[relation (mathematics)|relations]] that is variously known as the ''composition of relations'', ''relational composition'', or ''relative multiplication''.  In approaching the more general constructions, it pays to begin with the composition of 2-adic and 3-adic relations.
+
There are several ways to formalize the subject matter of relations.  Relations and their combinations may be described in the logic of relative terms, in set theories of various kinds, and through a broadening of category theory from functions to relations in general.
 +
 
 +
The first order of business is to define the operation on [[relation (mathematics)|relations]] that is variously known as the ''composition of relations'', ''relational composition'', or ''relative multiplication''.  In approaching the more general constructions, it pays to begin with the composition of dyadic and triadic relations.
  
As an incidental observation on usage, there are many different conventions of [[syntax]] for denoting the application and composition of relations, with perhaps even more options in general use than are common for the application and composition of [[function (mathematics)|functions]].  In this case there is little chance of standardization, since the convenience of conventions is relative to the context of use, and the same writers use different styles of syntax in different settings, depending on the ease of analysis and computation.
+
As an incidental observation on usage, there are many different conventions of syntax for denoting the application and composition of relations, with perhaps even more options in general use than are common for the application and composition of functions.  In this case there is little chance of standardization, since the convenience of conventions is relative to the context of use, and the same writers use different styles of syntax in different settings, depending on the ease of analysis and computation.
  
 
{| align="center" cellpadding="4" width="90%"
 
{| align="center" cellpadding="4" width="90%"
Line 12: Line 16:
 
|-
 
|-
 
|
 
|
<p>The second dimension of variation in syntax has to do with the automatic assumptions in place about the associations of terms in the absence of associations marked by parentheses.  This becomes a significant factor with relations in general because the usual property of [[associativity]] is lost as both the complexities of compositions and the dimensions of relations increase.</p>
+
<p>The second dimension of variation in syntax has to do with the automatic assumptions in place about the associations of terms in the absence of associations marked by parentheses.  This becomes a significant factor with relations in general because the usual property of associativity is lost as both the complexities of compositions and the dimensions of relations increase.</p>
 
|}
 
|}
  
Line 43: Line 47:
 
|}
 
|}
  
Note on notation.  The ordinary symbol for functional composition is the ''[[composition sign]]'', a small circle "<math>\circ</math>" written between the names of the functions being composed, as <math>f \circ g,</math> but the sign is often omitted if there is no risk of confusing the composition of functions with their algebraic product.  In contexts where both compositions and products occur, either the composition is marked on each occasion or else the product is marked by means of a ''center dot'' "<math>\cdot</math>", as <math>f \cdot g.</math>
+
Note on notation.  The ordinary symbol for functional composition is the ''composition sign'', a small circle "<math>\circ</math>" written between the names of the functions being composed, as <math>f \circ g,</math> but the sign is often omitted if there is no risk of confusing the composition of functions with their algebraic product.  In contexts where both compositions and products occur, either the composition is marked on each occasion or else the product is marked by means of a ''center dot'' &ldquo;<math>\cdot</math>&rdquo;, as <math>f \cdot g.</math>
  
Generalizing the paradigm along parallel lines, the ''composition'' of a pair of 2-adic relations is formulated in the following two ways:
+
Generalizing the paradigm along parallel lines, the ''composition'' of a pair of dyadic relations is formulated in the following two ways:
  
 
{| align="center" cellpadding="4" width="90%"
 
{| align="center" cellpadding="4" width="90%"
Line 61: Line 65:
 
==Geometric construction==
 
==Geometric construction==
  
There is a neat way of defining relational compositions in geometric terms, not only showing their relationship to the [[projection (set theory)|projection]] operations that come with any [[cartesian product]], but also suggesting natural directions for generalizing relational compositions beyond the 2-adic case, and even beyond relations that have any fixed [[arity]], in effect, to the general case of [[formal language]]s as generalized relations.
+
There is a neat way of defining relational compositions in geometric terms, not only showing their relationship to the projection operations that come with any cartesian product, but also suggesting natural directions for generalizing relational compositions beyond the dyadic case, and even beyond relations that have any fixed arity, in effect, to the general case of formal languages as generalized relations.
  
This way of looking at relational compositions is sometimes referred to as [[Alfred Tarski|Tarski]]'s Trick (T<sup>2</sup>), on account of his having put it to especially good use in his work (Ulam and Bednarek, 1977).  It supplies the imagination with a geometric way of visualizing the relational composition of a pair of 2-adic relations, doing this by attaching concrete imagery to the basic [[set theory|set-theoretic]] operations, namely, [[intersection (set theory)|intersection]]s, [[projection (set theory)|projection]]s, and a certain class of operations [[inverse relation|inverse]] to projections, here called ''[[tacit extension]]s''.
+
This way of looking at relational compositions is sometimes referred to as Tarski's Trick, on account of his having put it to especially good use in his work (Ulam and Bednarek, 1977).  It supplies the imagination with a geometric way of visualizing the relational composition of a pair of dyadic relations, doing this by attaching concrete imagery to the basic set-theoretic operations, namely, intersections, projections, and a certain class of operations inverse to projections, here called ''tacit extensions''.
  
 
The stage is set for Tarski's trick by highlighting the links between two topics that are likely to appear wholly unrelated at first, namely:
 
The stage is set for Tarski's trick by highlighting the links between two topics that are likely to appear wholly unrelated at first, namely:
  
:* The use of logical [[conjunction]], as denoted by the symbol "&and;" in expressions of the form ''F''(''x'',&nbsp;''y'',&nbsp;''z'') = ''G''(''x'',&nbsp;''y'')&nbsp;&and;&nbsp;''H''(''y'',&nbsp;''z''), to define a 3-adic relation ''F'' in terms of a pair of 2-adic relations ''G'' and ''H''.
+
:* The use of [[logical conjunction]], as denoted by the symbol <math>\land,\!</math> in expressions of the form <math>F(x, y, z) = G(x, y) \land H(y, z),\!</math> to define a triadic relation <math>F\!</math> in terms of a pair of dyadic relations <math>G\!</math> and <math>H.\!</math>
  
:* The concepts of 2-adic ''[[projection (set theory)|projection]]'' and ''projective determination'', that are invoked in the 'weak' notion of ''projective reducibility''.
+
:* The concepts of dyadic ''projection'' and ''projective determination'', that are invoked in the &ldquo;weak&rdquo; notion of ''projective reducibility''.
  
The relational composition ''G''&nbsp;&omicron;&nbsp;''H'' of a pair of 2-adic relations ''G'' and ''H'' will be constructed in three stages, first, by taking the tacit extensions of ''G'' and ''H'' to 3-adic relations that reside in the same space, next, by taking the intersection of these extensions, tantamount to the maximal 3-adic relation that is consistent with the ''prima facie'' 2-adic relation data, finally, by projecting this intersection on a suitable plane to form a third 2-adic relation, constituting in fact the relational composition ''G''&nbsp;&omicron;&nbsp;''H'' of the relations ''G'' and ''H''.
+
The relational composition <math>G \circ H\!</math> of a pair of dyadic relations <math>G\!</math> and <math>H\!</math> will be constructed in three stages, first, by taking the tacit extensions of <math>G\!</math> and <math>H\!</math> to triadic relations that reside in the same space, next, by taking the intersection of these extensions, tantamount to the maximal triadic relation that is consistent with the ''prima facie'' dyadic relation data, finally, by projecting this intersection on a suitable plane to form a third dyadic relation, constituting in fact the relational composition <math>G \circ H\!</math> of the relations <math>G\!</math> and <math>H.\!</math>
  
The construction of a relational composition in a specifically mathematical setting normally begins with [[relation (mathematics)|mathematical relations]] at a higher level of abstraction than the corresponding objects in linguistic or logical settings.  This is due to the fact that mathematical objects are typically specified only ''up to [[isomorphism]]'' as the conventional saying goes, that is, any objects that have the 'same form' are generally regarded as the being the same thing, for most all intents and mathematical purposes.  Thus, the mathematical construction of a relational composition begins by default with a pair of 2-adic relations that reside, without loss of generality, in the same plane, say, ''G'', ''H''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'', as depicted in Figure 1.
+
The construction of a relational composition in a specifically mathematical setting normally begins with [[relation (mathematics)|mathematical relations]] at a higher level of abstraction than the corresponding objects in linguistic or logical settings.  This is due to the fact that mathematical objects are typically specified only ''up to isomorphism'' as the conventional saying goes, that is, any objects that have the &ldquo;same form&rdquo; are generally regarded as the being the same thing, for most all intents and mathematical purposes.  Thus the mathematical construction of a relational composition begins by default with a pair of dyadic relations that reside, without loss of generality, in the same plane, say, <math>G, H \subseteq X \times Y,\!</math> as shown in Figure&nbsp;1.
  
o-------------------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                                |
+
|
|        o                      o                |
+
<pre>
|        |\                      |\              |
+
o-------------------------------------------------o
|        | \                    | \              |
+
|                                                |
|        |  \                    |  \            |
+
|        o                      o                |
|        |  \                  |  \            |
+
|        |\                      |\              |
|        |    \                  |    \          |
+
|        | \                    | \              |
|        |    \                |    \          |
+
|        |  \                    |  \            |
|        |  *  \                |  *  \        |
+
|        |  \                  |  \            |
|        X  *  Y              X  *  Y        |
+
|        |    \                  |    \          |
|        \  *  |                \  *  |        |
+
|        |    \                |    \          |
|          \ G  |                \ H  |        |
+
|        |  *  \                |  *  \        |
|          \    |                  \    |        |
+
|        X  *  Y              X  *  Y        |
|            \  |                  \  |        |
+
|        \  *  |                \  *  |        |
|            \  |                    \  |        |
+
|          \ G  |                \ H  |        |
|              \ |                    \ |        |
+
|          \    |                  \    |        |
|              \|                      \|        |
+
|            \  |                  \  |        |
|                o                      o        |
+
|            \  |                    \  |        |
|                                                |
+
|              \ |                    \ |        |
o-------------------------------------------------o
+
|              \|                      \|        |
Figure 1.  Dyadic Relations G, H c X x Y
+
|                o                      o        |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 1.  Dyadic Relations G, H c X x Y
 +
</pre>
 +
|}
  
The 2-adic relations ''G'' and ''H'' cannot be composed at all at this point, not without additional information or further stipulation.  In order for their relational composition to be possible, one of two types of cases has to happen:
+
The dyadic relations <math>G\!</math> and <math>H\!</math> cannot be composed at all at this point, not without additional information or further stipulation.  In order for their relational composition to be possible, one of two types of cases has to happen:
  
:* The first type of case occurs when ''X''&nbsp;=&nbsp;''Y''.  In this case, both of the compositions ''G''&nbsp;&omicron;&nbsp;''H'' and ''H''&nbsp;&omicron;&nbsp;''G'' are defined.
+
:* The first type of case occurs when <math>X = Y.\!</math> In this case, both of the compositions <math>G \circ H\!</math> and <math>H \circ G\!</math> are defined.
  
:* The second type of case occurs when ''X'' and ''Y'' are distinct, but when it nevertheless makes sense to speak of a 2-adic relation ''&#292;'' that is isomorphic to ''H'', but living in the plane ''YZ'', that is, in the space of the cartesian product ''Y''&nbsp;&times;&nbsp;''Z'', for some set ''Z''.
+
:* The second type of case occurs when <math>X\!</math> and <math>Y\!</math> are distinct, but when it nevertheless makes sense to speak of a dyadic relation <math>\hat{H}\!</math> that is isomorphic to <math>H,\!</math> but living in the plane <math>YZ,\!</math> that is, in the space of the cartesian product <math>Y \times Z,\!</math> for some set <math>Z.\!</math>
  
 
Whether you view isomorphic things to be the same things or not, you still have to specify the exact isomorphisms that are needed to transform any given representation of a thing into a required representation of the same thing.  Let us imagine that we have done this, and say how later:
 
Whether you view isomorphic things to be the same things or not, you still have to specify the exact isomorphisms that are needed to transform any given representation of a thing into a required representation of the same thing.  Let us imagine that we have done this, and say how later:
  
o-------------------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                                |
+
|
|        o                              o        |
+
<pre>
|        |\                            /|        |
+
o-------------------------------------------------o
|        | \                          / |        |
+
|                                                |
|        |  \                        /  |        |
+
|        o                              o        |
|        |  \                      /  |        |
+
|        |\                            /|        |
|        |    \                    /    |        |
+
|        | \                          / |        |
|        |    \                  /    |        |
+
|        |  \                        /  |        |
|        |  *  \                /  *  |        |
+
|        |  \                      /  |        |
|        X  *  Y              Y  *  Z        |
+
|        |    \                    /    |        |
|        \  *  |              |  *  /        |
+
|        |    \                  /    |        |
|          \ G  |              |  &#292; /          |
+
|        |  *  \                /  *  |        |
|          \    |              |    /          |
+
|        X  *  Y              Y  *  Z        |
|            \  |              |  /            |
+
|        \  *  |              |  *  /        |
|            \  |              |  /            |
+
|          \ G  |              |  &#292; /          |
|              \ |              | /              |
+
|          \    |              |    /          |
|              \|              |/              |
+
|            \  |              |  /            |
|                o              o                |
+
|            \  |              |  /            |
|                                                |
+
|              \ |              | /              |
o-------------------------------------------------o
+
|              \|              |/              |
Figure 2.  Dyadic Relations G c X x Y and &#292; c Y x Z
+
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 2.  Dyadic Relations G c X x Y and &#292; c Y x Z
 +
</pre>
 +
|}
  
With the required spaces carefully swept out, the stage is set for the presentation of Tarski's trick, and the invocation of the following symbolic formula, claimed to be a definition of the relational composition ''P''&nbsp;&omicron;&nbsp;''Q'' of a pair of 2-adic relations ''P'',&nbsp;''Q''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X''.
+
With the required spaces carefully swept out, the stage is set for the presentation of Tarski's trick, and the invocation of the following symbolic formula, claimed to be a definition of the relational composition <math>P \circ Q\!</math> of a pair of dyadic relations <math>P, Q  
 +
\subseteq X \times X.\!</math>
  
: '''Definition.'''  ''P''&nbsp;&omicron;&nbsp;''Q'' = ''proj''<sub>13</sub> (''P''&nbsp;&times;&nbsp;''X''&nbsp;&cap;&nbsp;''X''&nbsp;&times;&nbsp;''Q'').
+
: '''Definition.'''  <math>P \circ Q = \mathrm{proj}_{13} (P \times X ~\cap~ X \times Q).\!</math>
  
To get this drift of this definition, one needs to understand that it's written within a school of thought that holds that all 2-adic relations are, 'without loss of generality', covered well enough, 'for all practical purposes', under the aegis of subsets of a suitable cartesian square, and thus of the form ''L''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X''.  So, if one has started out with a 2-adic relation of the shape ''L''&nbsp;&sube;&nbsp;''U''&nbsp;&times;&nbsp;''V'', one merely lets ''X''&nbsp;=&nbsp;''U''&nbsp;&cup;&nbsp;''V'', trading in the initial ''L'' for a new ''L''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'' as need be.
+
To get this drift of this definition one needs to understand that it comes from a point of view that regards all dyadic relations as covered well enough by subsets of a suitable cartesian square and thus of the form <math>L \subseteq X \times X.\!</math> So, if one has started out with a dyadic relation of the shape <math>L \subseteq U \times V,\!</math> one merely lets <math>X = U \cup V,\!</math> trading in the initial <math>L\!</math> for a new <math>L \subseteq X \times X\!</math> as need be.
  
The projection ''proj''<sub>13</sub> is just the projection of the cartesian cube ''X''&nbsp;&times;&nbsp;''X''&nbsp;&times;&nbsp;''X'' on the space of shape ''X''&nbsp;&times;&nbsp;''X'' that is spanned by the first and the third domains, but since they now have the same names and the same contents it is necessary to distinguish them by numbering their relational places.
+
The projection <math>\mathrm{proj}_{13}\!</math> is just the projection of the cartesian cube <math>X \times X \times X\!</math> on the space of shape <math>X \times X\!</math> that is spanned by the first and the third domains, but since they now have the same names and the same contents it is necessary to distinguish them by numbering their relational places.
  
Finally, the notation of the cartesian product sign "&times;" is extended to signify two other products with respect to a 2-adic relation ''L''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'' and a subset ''W''&nbsp;&sube;&nbsp;''X'', as follows:
+
Finally, the notation of the cartesian product sign &ldquo;<math>\times\!</math>&rdquo; is extended to signify two other products with respect to a dyadic relation <math>L \subseteq X \times X\!</math> and a subset <math>W \subseteq X,\!</math> as follows:
  
: '''Definition.'''  ''L'' &times; ''W'' = {(''x'', ''y'', ''z'') &isin; ''X''<sup>3</sup> : (''x'', ''y'') &isin; ''L'' &and; ''z'' &isin; ''W''}.
+
: '''Definition.'''  <math>L \times W ~=~ \{ (x, y, z) \in X^3 ~:~ (x, y) \in L ~\mathrm{and}~ z \in W \}.\!</math>
  
: '''Definition.'''  ''W'' &times; ''L'' = {(''x'', ''y'', ''z'') &isin; ''X''<sup>3</sup> : ''x'' &isin; ''W'' &and; (''y'', ''z'') &isin; ''L''}.
+
: '''Definition.'''  <math>W \times L ~=~ \{ (x, y, z) \in X^3 ~:~ x \in W ~\mathrm{and}~ (y, z) \in L \}.\!</math>
  
Applying these definitions to the case ''P'',&nbsp;''Q''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'', the two 2-adic relations whose relational composition ''P''&nbsp;&omicron;&nbsp;''Q''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'' is about to be defined, one finds:
+
Applying these definitions to the case <math>P, Q \subseteq X \times X,\!</math> the two dyadic relations whose relational composition <math>P \circ Q \subseteq X \times X\!</math> is about to be defined, one finds:
  
: ''P'' &times; ''X'' = {(''x'', ''y'', ''z'') &isin; ''X''<sup>3</sup> : (''x'', ''y'') &isin; ''P'' &and; ''z'' &isin; ''X''},
+
: <math>P \times X ~=~ \{ (x, y, z) \in X^3 ~:~ (x, y) \in P ~\mathrm{and}~ z \in X \},\!</math>
  
: ''X'' &times; ''Q'' = {(''x'', ''y'', ''z'') &isin; ''X''<sup>3</sup> : ''x'' &isin; ''X'' &and; (''y'', ''z'') &isin; ''Q''}.
+
: <math>X \times Q ~=~ \{ (x, y, z) \in X^3 ~:~ x \in X ~\mathrm{and}~ (y, z) \in Q \}.\!</math>
  
 
These are just the appropriate special cases of the tacit extensions already defined.
 
These are just the appropriate special cases of the tacit extensions already defined.
  
: ''P'' &times; ''X'' = ''te''<sub>12</sub><sup>3</sup>(''P''),
+
: <math>P \times X ~=~ \mathrm{te}_{12}^3 (P),~\!</math>
  
: ''X'' &times; ''Q'' = ''te''<sub>23</sub><sup>1</sup>(''Q'').
+
: <math>X \times Q ~=~ \mathrm{te}_{23}^1 (Q).~\!</math>
  
 
In summary, then, the expression:
 
In summary, then, the expression:
  
: ''proj''<sub>13</sub>(''P'' &times; ''X'' &cap; ''X'' &times; ''Q'')
+
: <math>\mathrm{proj}_{13} (P \times X ~\cap~ X \times Q)\!</math>
  
 
is equivalent to the expression:
 
is equivalent to the expression:
  
: ''proj''<sub>13</sub>(''te''<sub>12</sub><sup>3</sup>(''P'') &cap; ''te''<sub>23</sub><sup>1</sup>(''Q''))
+
: <math>\mathrm{proj}_{13} (\mathrm{te}_{12}^3 (P) ~\cap~ \mathrm{te}_{23}^1 (Q))\!</math>
 +
 
 +
and this form is generalized &mdash; although, relative to one's school of thought, perhaps inessentially so &mdash; by the form that was given above as follows:
 +
 
 +
: '''Definition.''' <math>P \circ Q ~=~ \mathrm{proj}_{XZ} (\mathrm{te}_{XY}^Z (P) ~\cap~ \mathrm{te}_{YZ}^X (Q)).\!</math>
 +
 
 +
Figure&nbsp;3 presents a geometric picture of what is involved in formulating a definition of the triadic relation <math>F \subseteq X \times Y \times Z\!</math> by way of a conjunction between the dyadic relation <math>G \subseteq X \times Y\!</math> and the dyadic relation <math>H \subseteq Y \times Z,\!</math> as done for example by means of an expression of the following form:
  
and this form is generalized — although, relative to one's school of thought, perhaps inessentially so — by the form that was given above as follows:
+
:* <math>F(x, y, z) ~=~ G(x, y) \land H(y, z).\!</math>
  
: '''Definition.'''  ''P''&nbsp;&omicron;&nbsp;''Q'' = ''proj''<sub>''XZ''</sub>(''te''<sub>''XY''</sub><sup>''Z''</sup>(''P'')&nbsp;&cap;&nbsp;''te''<sub>''YZ''</sub><sup>''X''</sup>(''Q'')).
+
{| align="center" border="0" cellpadding="10"
 +
|
 +
<pre>
 +
o-------------------------------------------------o
 +
|                                                |
 +
|                        o                        |
 +
|                      /|\                      |
 +
|                      / | \                      |
 +
|                    /  |  \                    |
 +
|                    /  |  \                    |
 +
|                  /    |    \                  |
 +
|                  /    |    \                  |
 +
|                /      |      \                |
 +
|                o      o      o                |
 +
|                |\    / \    /|                |
 +
|                | \  / F \  / |                |
 +
|                |  \ /  *  \ /  |                |
 +
|                |  \  /*\  /  |                |
 +
|                |  / \//*\\/ \  |                |
 +
|                | /  /\/ \/\  \ |                |
 +
|                |/  ///\ /\\\  \|                |
 +
|        o      X  /// Y  \\\  Z       o        |
 +
|        |\      \///  |  \\\/      /|        |
 +
|        | \      ///    |    \\\      / |        |
 +
|        |  \    ///\    |    /\\\    /  |        |
 +
|        |  \  ///  \  |  /  \\\  /  |        |
 +
|        |    \///    \  |  /    \\\/    |        |
 +
|        |    /\/      \ | /      \/\    |        |
 +
|        |  *//\      \|/       /\\*  |        |
 +
|        X   */  Y      o      Y  \*  Z        |
 +
|        \  *  |              |  *  /        |
 +
|          \ G  |              |  H /          |
 +
|          \    |              |    /          |
 +
|            \  |              |  /            |
 +
|            \  |              |  /            |
 +
|              \ |              | /              |
 +
|              \|              |/              |
 +
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 3.  Projections of F onto G and H
 +
</pre>
 +
|}
  
Figure 3 presents a geometric picture of what is involved in formulating a definition of the 3-adic relation ''F''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'' by way of a conjunction of the 2-adic relation ''G''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'' and the 2-adic relation ''H''&nbsp;&sube;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'', as done for example by means of an expression of the following form:
+
To interpret the Figure, visualize the triadic relation <math>F \subseteq X \times Y \times Z\!</math> as a body in <math>XYZ\!</math>-space, while <math>G\!</math> is a figure in <math>XY\!</math>-space and <math>H\!</math> is a figure in <math>YZ\!</math>-space.
  
:* ''F''(''x'', ''y'', ''z'') = ''G''(''x'', ''y'') &and; ''H''(''y'', ''z'').
+
The dyadic '''projections''' that accompany a triadic relation over <math>X, Y, Z\!</math> are defined as follows:
  
o-------------------------------------------------o
+
:* <math>\mathrm{proj}_{XY} (L) ~=~ \{ (x, y) \in X \times Y : (x, y, z) \in L ~\text{for some}~ z \in Z) \},\!</math>
|                                                |
 
|                        o                        |
 
|                      /|\                      |
 
|                      / | \                      |
 
|                    /  |  \                    |
 
|                    /  |  \                    |
 
|                  /    |    \                  |
 
|                  /    |    \                  |
 
|                /      |      \                |
 
|                o      o      o                |
 
|                |\    / \    /|                |
 
|                | \  / F \  / |                |
 
|                |  \ /  * \ /  |                |
 
|                |  \ /*\ /  |                |
 
|                |  / \//*\\/ \  |                |
 
|                | /  /\/ \/\  \ |                |
 
|                |/  ///\ /\\\  \|                |
 
|        o      X  ///  Y \\\  Z      o        |
 
|        |\      \///  |  \\\/      /|        |
 
|        | \      ///    |    \\\     / |        |
 
|        |  \   ///\    |    /\\\    /  |        |
 
|        |  \  ///  \  |  /  \\\  /  |        |
 
|        |    \///    \  |  /    \\\/    |        |
 
|        |    /\/      \ | /      \/\    |        |
 
|        |  *//\      \|/      /\\*  |        |
 
|        X  */  Y      o      Y  \*  Z       |
 
|        \  *  |              |  *  /        |
 
|          \ G  |              |  H /          |
 
|          \   |              |    /          |
 
|            \  |              |  /            |
 
|            \  |              |  /            |
 
|              \ |              | /              |
 
|              \|              |/               |
 
|                o              o                |
 
|                                                |
 
o-------------------------------------------------o
 
Figure 3.  Projections of F onto G and H
 
  
To interpret the Figure, visualize the 3-adic relation ''F''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'' as a body in ''XYZ''-space, while ''G'' is a figure in ''XY''-space and ''H'' is a figure in ''YZ''-space.
+
:* <math>\mathrm{proj}_{XZ} (L) ~=~ \{ (x, z) \in X \times Z : (x, y, z) \in L ~\text{for some}~ y \in Y) \},\!</math>
  
The 2-adic '''projections''' that accompany a 3-adic relation over ''X'', ''Y'', ''Z'' are defined as follows:
+
:* <math>\mathrm{proj}_{YZ} (L) ~=~ \{ (y, z) \in Y \times Z : (x, y, z) \in L ~\text{for some}~ x \in X) \}.\!</math>
  
:* ''proj''<sub>''XY''</sub>(''L'') = {(''x'', ''y'') &isin; ''X'' &times; ''Y'' : (&exist; ''z'' &isin; ''Z'') (''x'', ''y'', ''z'') &isin; ''L''},
+
For many purposes it suffices to indicate the dyadic projections of a triadic relation <math>L\!</math> by means of the briefer equivalents listed next:
  
:* ''proj''<sub>''XZ''</sub>(''L'') = {(''x'', ''z'') &isin; ''X'' &times; ''Z'' : (&exist; ''y'' &isin; ''Y'') (''x'', ''y'', ''z'') &isin; ''L''},
+
:* <math>L_{XY} ~=~ \mathrm{proj}_{XY}(L),\!</math>
  
:* ''proj''<sub>''YZ''</sub>(''L'') = {(''y'', ''z'') &isin; ''Y'' &times; ''Z'' : (&exist; ''x'' &isin; ''X'') (''x'', ''y'', ''z'') &isin; ''L''}.
+
:* <math>L_{XZ} ~=~ \mathrm{proj}_{XZ}(L),\!</math>
  
For many purposes it suffices to indicate the 2-adic projections of a 3-adic relation ''L'' by means of the briefer equivalents listed here:
+
:* <math>L_{YZ} ~=~ \mathrm{proj}_{YZ}(L).\!</math>
  
:* ''L''<sub>''XY''</sub> = ''proj''<sub>''XY''</sub>(''L''),
+
In light of these definitions, <math>\mathrm{proj}_{XY}\!</math> is a mapping from the set <math>\mathcal{L}_{XYZ}\!</math> of triadic relations over the domains <math>X, Y, Z\!</math> to the set <math>\mathcal{L}_{XY}\!</math> of dyadic relations over the domains <math>X, Y,\!</math> with similar relationships holding for the other projections.  To formalize these relationships in a concise but explicit manner, it serves to add a few more definitions.
  
:* ''L''<sub>''XZ''</sub> = ''proj''<sub>''XZ''</sub>(''L''),
+
The set <math>\mathcal{L}_{XYZ},~\!</math> whose members are just the triadic relations over <math>X, Y, Z,\!</math> can be recognized as the set of all subsets of the cartesian product <math>X \times Y \times Z,\!</math> also known as the ''power set'' of <math>X \times Y \times Z,\!</math> and notated here as <math>\mathrm{Pow} (X \times Y \times Z).\!</math>
  
:* ''L''<sub>''YZ''</sub> = ''proj''<sub>''YZ''</sub>(''L'').
+
:* <math>\mathcal{L}_{XYZ} ~=~ \{ L : L \subseteq X \times Y \times Z \} ~=~ \mathrm{Pow} (X \times Y \times Z).\!</math>
  
In light of these definitions, ''proj''<sub>''XY''</sub> is a mapping from the set <font face=signature>L</font><sub>''XYZ''</sub> of 3-adic relations over ''X'', ''Y'', ''Z'' to the set <font face=signature>L</font><sub>''XY''</sub> of 2-adic relations over ''X'' and ''Y'', with similar relationships holding for the other projections.  To formalize these relationships in a concise but explicit manner, it serves to add a few more definitions.
+
Likewise, the power sets of the pairwise cartesian products encompass all the dyadic relations on pairs of distinct domains that can be chosen from <math>\{ X, Y, Z \}.\!</math>
  
The set <font face=signature>L</font><sub>''XYZ''</sub>, whose membership is just the 3-adic relations over ''X'', ''Y'', ''Z'', can be recognized as the set of all subsets of the cartesian product ''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'', also known as the '''power set''' of ''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'', and notated here as ''Pow''(''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'').
+
:* <math>\mathcal{L}_{XY} ~=~ \{L : L \subseteq X \times Y \} ~=~ \mathrm{Pow} (X \times Y),~\!</math>
  
:* <font face=signature>L</font><sub>''XYZ''</sub> = {''L''&nbsp;:&nbsp;''L''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z''} = ''Pow''(''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'').
+
:* <math>\mathcal{L}_{XZ} ~=~ \{L : L \subseteq X \times Z \} ~=~ \mathrm{Pow} (X \times Z),~\!</math>
  
Likewise, the power sets of the pairwise cartesian products encompass all of the 2-adic relations on pairs of distinct domains that can be chosen from {''X'', ''Y'', ''Z''}.
+
:* <math>\mathcal{L}_{YZ} ~=~ \{L : L \subseteq Y \times Z \} ~=~ \mathrm{Pow} (Y \times Z).~\!</math>
  
:* <font face=signature>L</font><sub>''XY''</sub> = {''L'' : ''L'' &sube; ''X'' &times; ''Y''} = ''Pow''(''X'' &times; ''Y''),
+
In mathematics, the inverse relation corresponding to a projection map is usually called an ''extension''.  To avoid confusion with other senses of the word, however, it is probably best for the sake of this discussion to stick with the more specific term ''tacit extension''.
  
:* <font face=signature>L</font><sub>''XZ''</sub> = {''L'' : ''L'' &sube; ''X'' &times; ''Z''} = ''Pow''(''X'' &times; ''Z''),
+
Given three sets, <math>X, Y, Z,\!</math> and three dyadic relations,
  
:* <font face=signature>L</font><sub>''YZ''</sub> = {''L'' : ''L'' &sube; ''Y'' &times; ''Z''} = ''Pow''(''Y'' &times; ''Z'').
+
:* <math>U \subseteq X \times Y,~\!</math>
  
In mathematics, the inverse relation corresponding to a projection map is usually called an '''extension'''.  To avoid confusion with other senses of the word, however, it is probably best for the sake of this discussion to stick with the more specific term '''tacit extension'''.
+
:* <math>V \subseteq X \times Z,~\!</math>
  
The ''tacit extensions'' ''te''<sub>''XY''</sub><sup>''Z''</sup>, ''te''<sub>''XZ''</sub><sup>''Y''</sup>, ''te''<sub>''YZ''</sub><sup>''X''</sup>, of the 2-adic relations ''U''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'', ''V''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Z'', ''W''&nbsp;&sube;&nbsp;''Y''&nbsp;&times; ''Z'', respectively, are defined in the following way:
+
:* <math>W \subseteq Y \times Z,~\!</math>
  
:* ''te''<sub>''XY''</sub><sup>''Z''</sup>(''U'') = {(''x'', ''y'', ''z'') : (''x'', ''y'') &isin; ''U''}
+
the ''tacit extensions'', <math>\mathrm{te}_{XY}^Z, \mathrm{te}_{XZ}^Y, \mathrm{te}_{YZ}^X,~\!</math> of <math>U, V, W,\!</math> respectively, are defined as follows:
  
:* ''te''<sub>''XZ''</sub><sup>''Y''</sup>(''V'') = {(''x'', ''y'', ''z'') : (''x'', ''z'') &isin; ''V''}
+
:* <math>\mathrm{te}_{XY}^Z (U) ~=~ \{ (x, y, z) : (x, y) \in U \},\!</math>
  
:* ''te''<sub>''YZ''</sub><sup>''X''</sup>(''W'') = {(''x'', ''y'', ''z'') : (''y'', ''z'') &isin; ''W''}
+
:* <math>\mathrm{te}_{XZ}^Y (V) ~=~ \{ (x, y, z) : (x, z) \in V \},\!</math>
  
So long as the intended indices attaching to the tacit extensions can be gathered from context, it is usually clear enough to use the abbreviated forms, ''te''(''U''), ''te''(''V''), ''te''(''W'').
+
:* <math>\mathrm{te}_{YZ}^X (W) ~=~ \{ (x, y, z) : (y, z) \in W \}.\!</math>
  
The definition and illustration of relational composition presently under way makes use of the tacit extension of ''G''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'' to ''te''(''G'')&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'' and the tacit extension of ''H''&nbsp;&sube;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'' to ''te''(''H'')&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times; ''Z'', only.
+
So long as the intended indices attaching to the tacit extensions can be gathered from context, it is usually clear enough to use the abbreviated forms, <math>\mathrm{te}(U), \mathrm{te}(V), \mathrm{te}(W).\!</math>
  
Geometric illustrations of ''te''(''G'') and ''te''(''H'') are afforded by Figures 4 and 5, respectively.
+
The definition and illustration of relational composition presently under way makes use of the tacit extension of <math>G \subseteq X \times Y\!</math> to <math>\mathrm{te}(G) \subseteq X \times Y
 +
\times Z\!</math> and the tacit extension of <math>H \subseteq Y \times Z\!</math> to <math>\mathrm{te}(H) \subseteq X \times Y \times Z,\!</math> only.
  
o-------------------------------------------------o
+
Geometric illustrations of <math>\mathrm{te}(G)\!</math> and <math>\mathrm{te}(H)\!</math> are afforded by Figures&nbsp;4 and 5, respectively.
|                                                |
+
 
|                        o                        |
+
{| align="center" border="0" cellpadding="10"
|                      /|\                      |
+
|
|                      / | \                      |
+
<pre>
|                    /  |  \                    |
+
o-------------------------------------------------o
|                    /  |  \                    |
+
|                                                |
|                  /    |    \                  |
+
|                        o                        |
|                  /    |    \                  |
+
|                      /|\                      |
|                /      |  *  \                |
+
|                      / | \                      |
|                o      o  **  o                |
+
|                    /  |  \                    |
|                |\    / \***  /|                |
+
|                    /  |  \                    |
|                | \  /  ***  / |                |
+
|                  /    |    \                  |
|                |  \ /  ***\ /  |                |
+
|                  /    |    \                  |
|                |  \  ***  /  |                |
+
|                /      |  *  \                |
|                |  / \***  / \  |                |
+
|                o      o  **  o                |
|                | /  ***  /  \ |                |
+
|                |\    / \***  /|                |
|                |/  ***\ /    \|                |
+
|                | \  /  ***  / |                |
|        o      X  /**  Y      Z      o        |
+
|                |  \ /  ***\ /  |                |
|        |\      \//*  |      /      /|        |
+
|                |  \  ***  /  |                |
|        | \      ///    |    /      / |        |
+
|                |  / \***  / \  |                |
|        |  \    ///\    |    /      /  |        |
+
|                | /  ***  /  \ |                |
|        |  \  ///  \  |  /      /  |        |
+
|                |/  ***\ /    \|                |
|        |    \///    \  |  /      /    |        |
+
|        o      X  /**  Y      Z      o        |
|        |    /\/      \ | /      /    |        |
+
|        |\      \//*  |      /      /|        |
|        |  *//\      \|/      /  *  |        |
+
|        | \      ///    |    /      / |        |
|        X  */  Y      o      Y  *  Z        |
+
|        |  \    ///\    |    /      /  |        |
|        \  *  |              |  *  /        |
+
|        |  \  ///  \  |  /      /  |        |
|          \ G  |              |  H /          |
+
|        |    \///    \  |  /      /    |        |
|          \    |              |    /          |
+
|        |    /\/      \ | /      /    |        |
|            \  |              |  /            |
+
|        |  *//\      \|/      /  *  |        |
|            \  |              |  /            |
+
|        X  */  Y      o      Y  *  Z        |
|              \ |              | /              |
+
|        \  *  |              |  *  /        |
|              \|              |/              |
+
|          \ G  |              |  H /          |
|                o              o                |
+
|          \    |              |    /          |
|                                                |
+
|            \  |              |  /            |
o-------------------------------------------------o
+
|            \  |              |  /            |
 +
|              \ |              | /              |
 +
|              \|              |/              |
 +
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 
  Figure 4.  Tacit Extension of G to X x Y x Z
 
  Figure 4.  Tacit Extension of G to X x Y x Z
<br>
+
</pre>
o-------------------------------------------------o
+
|}
|                                                |
+
 
|                        o                        |
+
{| align="center" border="0" cellpadding="10"
|                      /|\                      |
+
|
|                      / | \                      |
+
<pre>
|                    /  |  \                    |
+
o-------------------------------------------------o
|                    /  |  \                    |
+
|                                                |
|                  /    |    \                  |
+
|                        o                        |
|                  /    |    \                  |
+
|                      /|\                      |
|                /  *  |      \                |
+
|                      / | \                      |
|                o  **  o      o                |
+
|                    /  |  \                    |
|                |\  ***/ \    /|                |
+
|                    /  |  \                    |
|                | \  ***  \  / |                |
+
|                  /    |    \                  |
|                |  \ /***  \ /  |                |
+
|                  /    |    \                  |
|                |  \  ***  /  |                |
+
|                /  *  |      \                |
|                |  / \  ***/ \  |                |
+
|                o  **  o      o                |
|                | /  \  ***  \ |                |
+
|                |\  ***/ \    /|                |
|                |/    \ /***  \|                |
+
|                | \  ***  \  / |                |
|        o      X      Y  **\  Z      o        |
+
|                |  \ /***  \ /  |                |
|        |\      \      |  *\\/      /|        |
+
|                |  \  ***  /  |                |
|        | \      \    |    \\\      / |        |
+
|                |  / \  ***/ \  |                |
|        |  \      \    |    /\\\    /  |        |
+
|                | /  \  ***  \ |                |
|        |  \      \  |  /  \\\  /  |        |
+
|                |/    \ /***  \|                |
|        |    \      \  |  /    \\\/    |        |
+
|        o      X      Y  **\  Z      o        |
|        |    \      \ | /      \/\    |        |
+
|        |\      \      |  *\\/      /|        |
|        |  *  \      \|/      /\\*  |        |
+
|        | \      \    |    \\\      / |        |
|        X  *  Y      o      Y  \*  Z        |
+
|        |  \      \    |    /\\\    /  |        |
|        \  *  |              |  *  /        |
+
|        |  \      \  |  /  \\\  /  |        |
|          \ G  |              |  H /          |
+
|        |    \      \  |  /    \\\/    |        |
|          \    |              |    /          |
+
|        |    \      \ | /      \/\    |        |
|            \  |              |  /            |
+
|        |  *  \      \|/      /\\*  |        |
|            \  |              |  /            |
+
|        X  *  Y      o      Y  \*  Z        |
|              \ |              | /              |
+
|        \  *  |              |  *  /        |
|              \|              |/              |
+
|          \ G  |              |  H /          |
|                o              o                |
+
|          \    |              |    /          |
|                                                |
+
|            \  |              |  /            |
o-------------------------------------------------o
+
|            \  |              |  /            |
Figure 5.  Tacit Extension of H to X x Y x Z
+
|              \ |              | /              |
 +
|              \|              |/              |
 +
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 5.  Tacit Extension of H to X x Y x Z
 +
</pre>
 +
|}
  
 
A geometric interpretation can now be given that fleshes out in graphic form the meaning of a formula like the following:
 
A geometric interpretation can now be given that fleshes out in graphic form the meaning of a formula like the following:
  
:* ''F''(''x'', ''y'', ''z'') = ''G''(''x'', ''y'') &and; ''H''(''y'', ''z'').
+
:* <math>F(x, y, z) ~=~ G(x, y) \land H(y, z).\!</math>
  
The conjunction that is indicated by "&and;" corresponds as usual to an intersection of two sets, however, in this case it is the intersection of the tacit extensions ''te''(''G'') and ''te''(''H'').
+
The conjunction that is indicated by &ldquo;<math>\land\!</math>&rdquo; corresponds as usual to an intersection of two sets, however, in this case it is the intersection of the tacit extensions <math>\mathrm{te}(G)\!</math> and <math>\mathrm{te}(H).\!</math>
  
o-------------------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                                |
+
|
|                        o                        |
+
<pre>
|                      /|\                      |
+
o-------------------------------------------------o
|                      / | \                      |
+
|                                                |
|                    /  |  \                    |
+
|                        o                        |
|                    /  |  \                    |
+
|                      /|\                      |
|                  /    |    \                  |
+
|                      / | \                      |
|                  /    |    \                  |
+
|                    /  |  \                    |
|                /      |      \                |
+
|                    /  |  \                    |
|                o      o      o                |
+
|                  /    |    \                  |
|                |\    / \    /|                |
+
|                  /    |    \                  |
|                | \  / F \  / |                |
+
|                /      |      \                |
|                |  \ /  *  \ /  |                |
+
|                o      o      o                |
|                |  \  /*\  /  |                |
+
|                |\    / \    /|                |
|                |  / \//*\\/ \  |                |
+
|                | \  / F \  / |                |
|                | /  /\/ \/\  \ |                |
+
|                |  \ /  *  \ /  |                |
|                |/  ///\ /\\\  \|                |
+
|                |  \  /*\  /  |                |
|        o      X  ///  Y  \\\  Z      o        |
+
|                |  / \//*\\/ \  |                |
|        |\      \///  |  \\\/      /|        |
+
|                | /  /\/ \/\  \ |                |
|        | \      ///    |    \\\      / |        |
+
|                |/  ///\ /\\\  \|                |
|        |  \    ///\    |    /\\\    /  |        |
+
|        o      X  ///  Y  \\\  Z      o        |
|        |  \  ///  \  |  /  \\\  /  |        |
+
|        |\      \///  |  \\\/      /|        |
|        |    \///    \  |  /    \\\/    |        |
+
|        | \      ///    |    \\\      / |        |
|        |    /\/      \ | /      \/\    |        |
+
|        |  \    ///\    |    /\\\    /  |        |
|        |  *//\      \|/      /\\*  |        |
+
|        |  \  ///  \  |  /  \\\  /  |        |
|        X  */  Y      o      Y  \*  Z        |
+
|        |    \///    \  |  /    \\\/    |        |
|        \  *  |              |  *  /        |
+
|        |    /\/      \ | /      \/\    |        |
|          \ G  |              |  H /          |
+
|        |  *//\      \|/      /\\*  |        |
|          \    |              |    /          |
+
|        X  */  Y      o      Y  \*  Z        |
|            \  |              |  /            |
+
|        \  *  |              |  *  /        |
|            \  |              |  /            |
+
|          \ G  |              |  H /          |
|              \ |              | /              |
+
|          \    |              |    /          |
|              \|              |/              |
+
|            \  |              |  /            |
|                o              o                |
+
|            \  |              |  /            |
|                                                |
+
|              \ |              | /              |
o-------------------------------------------------o
+
|              \|              |/              |
Figure 6.  F as the Intersection of te(G) and te(H)
+
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 6.  F as the Intersection of te(G) and te(H)
 +
</pre>
 +
|}
  
 
==Algebraic construction==
 
==Algebraic construction==
  
The transition from a geometric picture of relation composition to an algebraic formulation is accomplished through the introduction of coordinates, in other words, identifiable names for the objects that are related through the various forms of relations, 2-adic and 3-adic in the present case.  Adding coordinates to the running Example produces the following Figure:
+
The transition from a geometric picture of relation composition to an algebraic formulation is accomplished through the introduction of coordinates, in other words, identifiable names for the objects that are related through the various forms of relations, dyadic and triadic in the present case.  Adding coordinates to the running Example produces the following Figure:
  
o-------------------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                                |
+
|
|                        o                        |
+
<pre>
|                      /|\                      |
+
o-------------------------------------------------o
|                      / | \                      |
+
|                                                |
|                    /  |  \                    |
+
|                        o                        |
|                    /  |  \                    |
+
|                      /|\                      |
|                  /    |    \                  |
+
|                      / | \                      |
|                  /    |    \                  |
+
|                    /  |  \                    |
|                /      |      \                |
+
|                    /  |  \                    |
|                o      o      o                |
+
|                  /    |    \                  |
|                |\    / \    /|                |
+
|                  /    |    \                  |
|                | \  / F \  / |                |
+
|                /      |      \                |
|                |  \ /  *  \ /  |                |
+
|                o      o      o                |
|                |  \  /*\  /  |                |
+
|                |\    / \    /|                |
|                |  / \//*\\/ \  |                |
+
|                | \  / F \  / |                |
|                | /  /\/ \/\  \ |                |
+
|                |  \ /  *  \ /  |                |
|                |/  ///\ /\\\  \|                |
+
|                |  \  /*\  /  |                |
|        o      X  ///  Y  \\\  Z      o        |
+
|                |  / \//*\\/ \  |                |
|        |\      7\///  |  \\\/7      /|        |
+
|                | /  /\/ \/\  \ |                |
|        | \      6//    |    \\6      / |        |
+
|                |/  ///\ /\\\  \|                |
|        |  \    //5\    |    /5\\    /  |        |
+
|        o      X  ///  Y  \\\  Z      o        |
|        |  \  /// 4\  |  /4 \\\  /  |        |
+
|        |\      7\///  |  \\\/7      /|        |
|        |    \///  3\  |  /3  \\\/    |        |
+
|        | \      6//    |    \\6      / |        |
|        |  G/\/    2\ | /2    \/\H  |        |
+
|        |  \    //5\    |    /5\\    /  |        |
|        |  *//\      1\|/1      /\\*  |        |
+
|        |  \  /// 4\  |  /4 \\\  /  |        |
|        X  *\  Y      o      Y  /*  Z        |
+
|        |    \///  3\  |  /3  \\\/    |        |
|        7\  *\\ |7            7| //*  /7        |
+
|        |  G/\/    2\ | /2    \/\H  |        |
|        6\ |\\\|6            6|///| /6        |
+
|        |  *//\      1\|/1      /\\*  |        |
|          5\| \\@5            5@// |/5          |
+
|        X  *\  Y      o      Y  /*  Z        |
|          4@  \@4            4@/  @4          |
+
|        7\  *\\ |7            7| //*  /7        |
|            3\  @3            3@  /3            |
+
|        6\ |\\\|6            6|///| /6        |
|            2\ |2            2| /2            |
+
|          5\| \\@5            5@// |/5          |
|              1\|1            1|/1              |
+
|          4@  \@4            4@/  @4          |
|                o              o                |
+
|            3\  @3            3@  /3            |
|                                                |
+
|            2\ |2            2| /2            |
o-------------------------------------------------o
+
|              1\|1            1|/1              |
Figure 7.  F as the Intersection of te(G) and te(H)
+
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 7.  F as the Intersection of te(G) and te(H)
 +
</pre>
 +
|}
  
Thinking of relations in operational terms is facilitated by using a variant notation for tuples and sets of tuples, namely, the ordered pair (''x'',&nbsp;''y'') is written ''x'':''y'', the ordered triple (''x'',&nbsp;''y'',&nbsp;''z'') is written ''x'':''y'':''z'', and so on, and a set of tuples is conceived as a logical-algebraic sum, which can be written out in the smaller finite cases in forms like ''a'':''b''&nbsp;+&nbsp;''b'':''c''&nbsp;+&nbsp;''c'':''d'' and so on.
+
Thinking of relations in operational terms is facilitated by using variant notations for ordered tuples and sets of ordered tuples, namely, the ordered pair <math>(x, y)\!</math> is written <math>x\!:\!y,\!</math> the ordered triple <math>(x, y, z)\!</math> is written <math>x\!:\!y\!:\!z,\!</math> and so on, and a set of tuples is conceived as a logical-algebraic sum, which can be written out in the smaller finite cases in forms like <math>a\!:\!b ~+~ b\!:\!c ~+~ c\!:\!d\!</math> and so on.
  
For example, translating the relations ''F''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'', ''G''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'', ''H''&nbsp;&sube;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'' into this notation produces the following summary of the data:
+
For example, translating the relations <math>F \subseteq X \times Y \times Z, ~ G \subseteq X \times Y, ~ H \subseteq Y \times Z\!</math> into this notation produces the following summary of the data:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''F'' || = || 4:3:4 || + || 4:4:4 || + || 4:5:4
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || ''G'' || = ||  4:3 || + ||  4:4 || + ||  4:5
+
F & = & 4:3:4 & + & 4:4:4 & + & 4:5:4
|-
+
\\
| &nbsp; || ''H'' || = ||  3:4 || + ||  4:4 || + ||  5:4
+
G & = & 4:3 & + & 4:4 & + & 4:5
 +
\\
 +
H & = & 3:4 & + & 4:4 & + & 5:4
 +
\end{matrix}</math>
 
|}
 
|}
  
As often happens with abstract notations for functions and relations, the ''type information'', in this case, the fact that ''G'' and ''H'' live in different spaces, is left implicit in the context of use.
+
As often happens with abstract notations for functions and relations, the ''type information'', in this case, the fact that <math>G\!</math> and <math>H\!</math> live in different spaces, is left implicit in the context of use.
  
Let us now verify that all of the proposed definitions, formulas, and other relationships check out against the concrete data of the current composition example.  The ultimate goal is to develop a clearer picture of what is going on in the formula that expresses the relational composition of a couple of 2-adic relations in terms of the medial projection of the intersection of their tacit extensions:
+
Let us now verify that all of the proposed definitions, formulas, and other relationships check out against the concrete data of the current composition example.  The ultimate goal is to develop a clearer picture of what is going on in the formula that expresses the relational composition of a couple of dyadic relations in terms of the medial projection of the intersection of their tacit extensions:
  
: ''G'' &omicron; ''H'' = ''proj''<sub>''XZ''</sub>(''te''<sub>''XY''</sub><sup>''Z''</sup>(''G'') &cap; ''te''<sub>''YZ''</sub><sup>''X''</sup>(''H'')).
+
{| align="center" cellpadding="8" width="90%"
 +
|
 +
<math>G \circ H ~=~ \mathrm{proj}_{XZ} (\mathrm{te}_{XY}^Z (G) ~\cap~ \mathrm{te}_{YZ}^X (H)).\!</math>
 +
|}
  
Here is the big picture, with all of the pieces in place:
+
Here is the big picture, with all the pieces in place:
  
o-------------------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                                |
+
|
|                        o                        |
+
<pre>
|                      / \                      |
+
o-------------------------------------------------o
|                      /  \                      |
+
|                                                |
|                    /    \                    |
+
|                        o                        |
|                    /      \                    |
+
|                      / \                      |
|                  /        \                  |
+
|                      /  \                      |
|                  /          \                  |
+
|                    /    \                    |
|                /    G o H    \                |
+
|                    /      \                    |
|                X      *      Z                |
+
|                  /        \                  |
|                7\    /|\    /7                |
+
|                  /          \                  |
|                6\  / | \  /6                |
+
|                /    G o H    \                |
|                  5\ /  |  \ /5                  |
+
|                X      *      Z                |
|                  4@  |  @4                  |
+
|                7\    /|\    /7                |
|                    3\  |  /3                    |
+
|                6\  / | \  /6                |
|                    2\ | /2                    |
+
|                  5\ /  |  \ /5                  |
|                      1\|/1                      |
+
|                  4@  |  @4                  |
|                        |                        |
+
|                    3\  |  /3                    |
|                        |                        |
+
|                    2\ | /2                    |
|                        |                        |
+
|                      1\|/1                      |
|                      /|\                      |
+
|                        |                        |
|                      / | \                      |
+
|                        |                        |
|                    /  |  \                    |
+
|                        |                        |
|                    /  |  \                    |
+
|                      /|\                      |
|                  /    |    \                  |
+
|                      / | \                      |
|                  /    |    \                  |
+
|                    /  |  \                    |
|                /      |      \                |
+
|                    /  |  \                    |
|                o      |      o                |
+
|                  /    |    \                  |
|                |\    /|\    /|                |
+
|                  /    |    \                  |
|                | \  / F \  / |                |
+
|                /      |      \                |
|                |  \ /  *  \ /  |                |
+
|                o      |      o                |
|                |  \  /*\  /  |                |
+
|                |\    /|\    /|                |
|                |  / \//*\\/ \  |                |
+
|                | \  / F \  / |                |
|                | /  /\/ \/\  \ |                |
+
|                |  \ /  *  \ /  |                |
|                |/  ///\ /\\\  \|                |
+
|                |  \  /*\  /  |                |
|        o      X  ///  Y  \\\  Z      o        |
+
|                |  / \//*\\/ \  |                |
|        |\      \///  |  \\\/      /|        |
+
|                | /  /\/ \/\  \ |                |
|        | \      ///    |    \\\      / |        |
+
|                |/  ///\ /\\\  \|                |
|        |  \    ///\    |    /\\\    /  |        |
+
|        o      X  ///  Y  \\\  Z      o        |
|        |  \  ///  \  |  /  \\\  /  |        |
+
|        |\      \///  |  \\\/      /|        |
|        |    \///    \  |  /    \\\/    |        |
+
|        | \      ///    |    \\\      / |        |
|        |  G/\/      \ | /      \/\H  |        |
+
|        |  \    ///\    |    /\\\    /  |        |
|        |  *//\      \|/      /\\*  |        |
+
|        |  \  ///  \  |  /  \\\  /  |        |
|        X  *\  Y      o      Y  /*  Z        |
+
|        |    \///    \  |  /    \\\/    |        |
|        7\  *\\ |7            7| //*  /7        |
+
|        |  G/\/      \ | /      \/\H  |        |
|        6\ |\\\|6            6|///| /6        |
+
|        |  *//\      \|/      /\\*  |        |
|          5\| \\@5            5@// |/5          |
+
|        X  *\  Y      o      Y  /*  Z        |
|          4@  \@4            4@/  @4          |
+
|        7\  *\\ |7            7| //*  /7        |
|            3\  @3            3@  /3            |
+
|        6\ |\\\|6            6|///| /6        |
|            2\ |2            2| /2            |
+
|          5\| \\@5            5@// |/5          |
|              1\|1            1|/1              |
+
|          4@  \@4            4@/  @4          |
|                o              o                |
+
|            3\  @3            3@  /3            |
|                                                |
+
|            2\ |2            2| /2            |
o-------------------------------------------------o
+
|              1\|1            1|/1              |
Figure 8.  G o H  =  proj_XZ (te(G) |^| te(H))
+
|                o              o                |
 +
|                                                |
 +
o-------------------------------------------------o
 +
Figure 8.  G o H  =  proj_XZ (te(G) |^| te(H))
 +
</pre>
 +
|}
  
All that remains is to check the following collection of data and derivations against the situation represented in Figure 8.
+
All that remains is to check the following collection of data and derivations against the situation represented in Figure&nbsp;8.
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''F'' || = || 4:3:4 || + || 4:4:4 || + || 4:5:4
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || ''G'' || = ||  4:3 || + ||  4:4 || + ||  4:5
+
F & = & 4:3:4 & + & 4:4:4 & + & 4:5:4
|-
+
\\
| &nbsp; || ''H'' || = ||  3:4 || + ||  4:4 || + ||  5:4
+
G & = & 4:3 & + & 4:4 & + & 4:5
 +
\\
 +
H & = & 3:4 & + & 4:4 & + & 5:4
 +
\end{matrix}</math>
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' &omicron; ''H'' || = || (4:3 + 4:4 + 4:5)(3:4 + 4:4 + 5:4)
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp;                || = || 4:4
+
G \circ H & = & (4\!:\!3 ~+~ 4\!:\!4 ~+~ 4\!:\!5)(3\!:\!4 ~+~ 4\!:\!4 ~+~ 5\!:\!4)
 +
\\[6pt]
 +
& = & 4:4
 +
\end{matrix}</math>
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''te''(''G'') || = || ''te''<sub>''XY''</sub><sup>''Z''</sup>(''G'')
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp;        || = || &sum;<sub>''z''=1..7</sub> (4:3:''z'' + 4:4:''z'' + 4:5:''z'')
+
\mathrm{te}(G) & = & \mathrm{te}_{XY}^Z (G)
 +
\\[4pt]
 +
& = & \displaystyle\sum_{z=1}^7 (4\!:\!3\!:\!z ~+~ 4\!:\!4\!:\!z ~+~ 4\!:\!5\!:\!z)
 +
\end{matrix}</math>
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''te''(''G'') || = || 4:3:1 || + || 4:4:1 || + || 4:5:1 || +
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp;   || &nbsp; || 4:3:2 || + || 4:4:2 || + || 4:5:2 || +
+
\mathrm{te}(G)
|-
+
& = & 4:3:1 & + & 4:4:1 & + & 4:5:1 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 4:3:3 || + || 4:4:3 || + || 4:5:3 || +
+
&  & 4:3:2 & + & 4:4:2 & + & 4:5:2 & + \\
|-
+
&  & 4:3:3 & + & 4:4:3 & + & 4:5:3 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 4:3:4 || + || 4:4:4 || + || 4:5:4 || +
+
&  & 4:3:4 & + & 4:4:4 & + & 4:5:4 & + \\
|-
+
&  & 4:3:5 & + & 4:4:5 & + & 4:5:5 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 4:3:5 || + || 4:4:5 || + || 4:5:5 || +
+
&  & 4:3:6 & + & 4:4:6 & + & 4:5:6 & + \\
|-
+
&  & 4:3:7 & + & 4:4:7 & + & 4:5:7
| &nbsp; || &nbsp;   || &nbsp; || 4:3:6 || + || 4:4:6 || + || 4:5:6 || +
+
\end{matrix}</math>
|-
 
| &nbsp; || &nbsp;   || &nbsp; || 4:3:7 || + || 4:4:7 || + || 4:5:7
 
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''te''(''H'') || = || ''te''<sub>''YZ''</sub><sup>''X''</sup>(''H'')
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp;        || = || &sum;<sub>''x''=1..7</sub> (''x'':3:4 + ''x'':4:4 + ''x'':5:4)
+
\mathrm{te}(H) & = & \mathrm{te}_{YZ}^X (H)
 +
\\[4pt]
 +
& = & \displaystyle\sum_{x=1}^7 (x\!:\!3\!:\!4 ~+~ x\!:\!4\!:\!4 ~+~ x\!:\!5\!:\!4)
 +
\end{matrix}</math>
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''te''(''H'') || = || 1:3:4 || + || 1:4:4 || + || 1:5:4 || +
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp;   || &nbsp; || 2:3:4 || + || 2:4:4 || + || 2:5:4 || +
+
\mathrm{te}(H)
|-
+
& = & 1:3:4 & + & 1:4:4 & + & 1:5:4 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 3:3:4 || + || 3:4:4 || + || 3:5:4 || +
+
&  & 2:3:4 & + & 2:4:4 & + & 2:5:4 & + \\
|-
+
&  & 3:3:4 & + & 3:4:4 & + & 3:5:4 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 4:3:4 || + || 4:4:4 || + || 4:5:4 || +
+
&  & 4:3:4 & + & 4:4:4 & + & 4:5:4 & + \\
|-
+
&  & 5:3:4 & + & 5:4:4 & + & 5:5:4 & + \\
| &nbsp; || &nbsp;   || &nbsp; || 5:3:4 || + || 5:4:4 || + || 5:5:4 || +
+
&  & 6:3:4 & + & 6:4:4 & + & 6:5:4 & + \\
|-
+
&  & 7:3:4 & + & 7:4:4 & + & 7:5:4
| &nbsp; || &nbsp;   || &nbsp; || 6:3:4 || + || 6:4:4 || + || 6:5:4 || +
+
\end{matrix}</math>
|-
 
| &nbsp; || &nbsp;   || &nbsp; || 7:3:4 || + || 7:4:4 || + || 7:5:4
 
 
|}
 
|}
  
{|
+
{| align="center" cellpadding="8" width="90%"
|-
+
|
| align="center" | ''te''(''G'') &cap; ''te''(''H'')
+
<math>\begin{array}{ccl}
| =
+
\mathrm{te}(G) \cap \mathrm{te}(H)
| 4:3:4 + 4:4:4 + 4:5:4
+
& = & 4\!:\!3:\!4 ~+~ 4\!:\!4\!:\!4 ~+~ 4\!:\!5\!:\!4
|-
+
\\[4pt]
| align="center" | ''G'' &omicron; ''H''
+
G \circ H
| =
+
& = & \mathrm{proj}_{XZ} (\mathrm{te}(G) \cap \mathrm{te}(H))
| ''proj''<sub>''XZ''</sub>(''te''(''G'') &cap; ''te''(''H''))
+
\\[4pt]
|-
+
& = & \mathrm{proj}_{XZ} (4\!:\!3:\!4 ~+~ 4\!:\!4\!:\!4 ~+~ 4\!:\!5\!:\!4)
| &nbsp;
+
\\[4pt]
| =
+
& = & 4:4
| ''proj''<sub>''XZ''</sub>(4:3:4 + 4:4:4 + 4:5:4)
+
\end{array}</math>
|-
 
| &nbsp;
 
| =
 
| 4:4
 
 
|}
 
|}
  
 
==Matrix representation==
 
==Matrix representation==
  
We have it within our reach to pick up another way of representing 2-adic relations, namely, the representation as [[logical matrix|logical matrices]], and also to grasp the analogy between relational composition and ordinary [[matrix multiplication]] as it appears in [[linear algebra]].
+
We have it within our reach to pick up another way of representing dyadic relations, namely, the representation as ''[[logical matrix|logical matrices]]'', and also to grasp the analogy between relational composition and ordinary [[matrix multiplication]] as it appears in linear algebra.
  
First of all, while we still have the data of a very simple concrete case in mind, let us reflect on what we did in our last Example in order to find the composition ''G''&nbsp;&omicron;&nbsp;''H'' of the 2-adic relations ''G''&nbsp;and&nbsp;''H''.
+
First of all, while we still have the data of a very simple concrete case in mind, let us reflect on what we did in our last Example in order to find the composition <math>G \circ H\!</math> of the dyadic relations <math>G\!</math> and <math>H.\!</math>
  
 
Here is the setup that we had before:
 
Here is the setup that we had before:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''X'' || = || {1, 2, 3, 4, 5, 6, 7}
+
| <math>\begin{matrix}X & = & \{ 1, 2, 3, 4, 5, 6, 7 \}\end{matrix}</math>
 
|}
 
|}
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' || = || 4:3 || + || 4:4 || + || 4:5 || &sube; || ''X'' &times; ''X''
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || ''H'' || = || 3:4 || + || 4:4 || + || 5:4 || &sube; || ''X'' &times; ''X ''
+
G & = & 4:3 & + & 4:4 & + & 4:5 & \subseteq & X \times X
 +
\\
 +
H & = & 3:4 & + & 4:4 & + & 5:4 & \subseteq & X \times X
 +
\end{matrix}</math>
 
|}
 
|}
  
Let us recall the rule for finding the relational composition of a pair of 2-adic relations.  Given the 2-adic relations ''P''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''Y'', ''Q''&nbsp;&sube;&nbsp;''Y''&nbsp;&times;&nbsp;''Z'', the relational composition of ''P'' and ''Q'', in that order, is written as ''P''&nbsp;&omicron;&nbsp;''Q'' or more simply as ''PQ'' and obtained as follows:
+
Let us recall the rule for finding the relational composition of a pair of dyadic relations.  Given the dyadic relations <math>P \subseteq X \times Y\!</math> and <math>Q \subseteq Y \times Z,\!</math> the composition of <math>P ~\text{on}~ Q\!</math> is written as <math>P \circ Q,\!</math> or more simply as <math>PQ,\!</math> and obtained as follows:
  
To compute ''PQ'', in general, where ''P'' and ''Q'' are 2-adic relations, simply multiply out the two sums in the ordinary distributive algebraic way, but subject to the following rule for finding the product of two elementary relations of shapes ''a'':''b'' and ''c'':''d''.
+
To compute <math>PQ,\!</math> in general, where <math>P\!</math> and <math>Q\!</math> are dyadic relations, simply multiply out the two sums in the ordinary distributive algebraic way, but subject to the following rule for finding the product of two elementary relations of shapes <math>a:b\!</math> and <math>c:d.\!</math>
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || (a:b)(c:d) || = || (a:d) || if b = c
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || (a:b)(c:d) || = ||   0  || otherwise
+
(a:b)(c:d) & = & (a:d) & \text{if}~ b = c
 +
\\
 +
(a:b)(c:d) & = &   0  & \text{otherwise}
 +
\end{matrix}</math>
 
|}
 
|}
  
To find the relational composition ''G'' &omicron; ''H'', one may begin by writing it as a quasi-algebraic product:
+
To find the relational composition <math>G \circ H,\!</math> one may begin by writing it as a quasi-algebraic product:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' &omicron; ''H'' || = || (4:3 + 4:4 + 4:5)(3:4 + 4:4 + 5:4)
+
|
 +
<math>\begin{matrix}
 +
G \circ H & = & (4\!:\!3 ~+~ 4\!:\!4 ~+~ 4\!:\!5)(3\!:\!4 ~+~ 4\!:\!4 ~+~ 5\!:\!4)
 +
\end{matrix}</math>
 
|}
 
|}
  
 
Multiplying this out in accord with the applicable form of distributive law one obtains the following expansion:
 
Multiplying this out in accord with the applicable form of distributive law one obtains the following expansion:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' &omicron; ''H'' || = || (4:3)(3:4) || + || (4:3)(4:4) || + || (4:3)(5:4) || +
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp; || &nbsp;          || (4:4)(3:4) || + || (4:4)(4:4) || + || (4:4)(5:4) || +
+
G \circ H
|-
+
& = & (4:3)(3:4) & + & (4:3)(4:4) & + & (4:3)(5:4) & +
| &nbsp; || &nbsp; || &nbsp;          ||(4:5)(3:4) || + || (4:5)(4:4) || + || (4:5)(5:4)
+
\\
 +
&   & (4:4)(3:4) & + & (4:4)(4:4) & + & (4:4)(5:4) & +
 +
\\
 +
&   & (4:5)(3:4) & + & (4:5)(4:4) & + & (4:5)(5:4)
 +
\end{matrix}</math>
 
|}
 
|}
  
 
Applying the rule that determines the product of elementary relations produces the following array:
 
Applying the rule that determines the product of elementary relations produces the following array:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' &omicron; ''H'' || = || (4:4) || + ||  0   || + ||  0   || +
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || &nbsp; || &nbsp;          ||  0  || + || (4:4) || + ||  0   || +
+
G \circ H
|-
+
& = & 4:4 & + 0 & + 0 & +
| &nbsp; || &nbsp; || &nbsp;          ||  0  || + ||  0   || + || (4:4)
+
\\
 +
&   & & + & 4:4 & + 0 & +
 +
\\
 +
&   & & + 0 & + & 4:4
 +
\end{matrix}</math>
 
|}
 
|}
  
 
Since the plus sign in this context represents an operation of logical disjunction or set-theoretic aggregation, all of the positive multiplicites count as one, and this gives the ultimate result:
 
Since the plus sign in this context represents an operation of logical disjunction or set-theoretic aggregation, all of the positive multiplicites count as one, and this gives the ultimate result:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' &omicron; ''H'' || = || (4:4)
+
| <math>\begin{matrix}G \circ H & = & 4:4\end{matrix}</math>
 
|}
 
|}
  
With an eye toward extracting a general formula for relation composition, viewed here on analogy to algebraic multiplication, let us examine what we did in multiplying the 2-adic relations ''G'' and ''H'' together to obtain their relational composite ''G'' o ''H''.
+
With an eye toward extracting a general formula for relation composition, viewed here on analogy to algebraic multiplication, let us examine what we did in multiplying the dyadic relations <math>G\!</math> and <math>H\!</math> together to obtain their relational composite <math>G \circ H.\!</math>
  
Given the space ''X'' = {1, 2, 3, 4, 5, 6, 7}, whose cardinality |''X''| is 7, there are |''X'' &times; ''X''| = |''X''| &middot; |''X''| = 7 &middot; 7 = 49 elementary relations of the form ''i'':''j'', where ''i'' and ''j'' range over the space ''X''.  Although they might be organized in many different ways, it is convenient to regard the collection of elementary relations as being arranged in a lexicographic block of the following form:
+
Given the space <math>X = \{ 1, 2, 3, 4, 5, 6, 7 \},\!</math> whose cardinality <math>|X|\!</math> is <math>7,\!</math> there are <math>|X \times X| = |X| \cdot |X|\!</math> <math>=\!</math> <math>7 \cdot 7 = 49\!</math> elementary relations of the form <math>i:j,\!</math> where <math>i\!</math> and <math>j\!</math> range over the space <math>X.\!</math> Although they might be organized in many different ways, it is convenient to regard the collection of elementary relations as arranged in a lexicographic block of the following form:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || 1:1 || 1:2 || 1:3 || 1:4 || 1:5 || 1:6 || 1:7
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || 2:1 || 2:2 || 2:3 || 2:4 || 2:5 || 2:6 || 2:7
+
1\!:\!1 & 1\!:\!2 & 1\!:\!3 & 1\!:\!4 & 1\!:\!5 & 1\!:\!6 & 1\!:\!7
|-
+
\\
| &nbsp; || 3:1 || 3:2 || 3:3 || 3:4 || 3:5 || 3:6 || 3:7
+
2\!:\!1 & 2\!:\!2 & 2\!:\!3 & 2\!:\!4 & 2\!:\!5 & 2\!:\!6 & 2\!:\!7
|-
+
\\
| &nbsp; || 4:1 || 4:2 || 4:3 || 4:4 || 4:5 || 4:6 || 4:7
+
3\!:\!1 & 3\!:\!2 & 3\!:\!3 & 3\!:\!4 & 3\!:\!5 & 3\!:\!6 & 3\!:\!7
|-
+
\\
| &nbsp; || 5:1 || 5:2 || 5:3 || 5:4 || 5:5 || 5:6 || 5:7
+
4\!:\!1 & 4\!:\!2 & 4\!:\!3 & 4\!:\!4 & 4\!:\!5 & 4\!:\!6 & 4\!:\!7
|-
+
\\
| &nbsp; || 6:1 || 6:2 || 6:3 || 6:4 || 6:5 || 6:6 || 6:7
+
5\!:\!1 & 5\!:\!2 & 5\!:\!3 & 5\!:\!4 & 5\!:\!5 & 5\!:\!6 & 5\!:\!7
|-
+
\\
| &nbsp; || 7:1 || 7:2 || 7:3 || 7:4 || 7:5 || 7:6 || 7:7
+
6\!:\!1 & 6\!:\!2 & 6\!:\!3 & 6\!:\!4 & 6\!:\!5 & 6\!:\!6 & 6\!:\!7
 +
\\
 +
7\!:\!1 & 7\!:\!2 & 7\!:\!3 & 7\!:\!4 & 7\!:\!5 & 7\!:\!6 & 7\!:\!7
 +
\end{matrix}</math>
 
|}
 
|}
  
The relations ''G'' and ''H'' may then be regarded as logical sums of the following forms:
+
The relations <math>G\!</math> and <math>H\!</math> may then be regarded as logical sums of the following forms:
  
{| cellpadding=8 style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| &nbsp; || ''G'' || = || &sum;<sub>''ij''</sub> ''G''<sub>''ij''</sub>(''i'':''j'')
+
|
|-
+
<math>\begin{matrix}
| &nbsp; || ''H'' || = || &sum;<sub>''ij''</sub> ''H''<sub>''ij''</sub>(''i'':''j'')
+
G & = & \displaystyle\sum_{ij} G_{ij} (i\!:\!j)
 +
\\[20pt]
 +
H & = & \displaystyle\sum_{ij} H_{ij} (i\!:\!j)
 +
\end{matrix}\!</math>
 
|}
 
|}
  
The notation &sum;<sub>''ij''</sub> indicates a logical sum over the collection of elementary relations ''i'':''j'', while the factors ''G''<sub>''ij''</sub> and ''H''<sub>''ij''</sub> are values in the boolean domain '''B''' = {0,&nbsp;1} that are known as the ''coefficients'' of the relations ''G'' and ''H'', respectively, with regard to the corresponding elementary relations ''i'':''j''.
+
The notation <math>\textstyle\sum_{ij}\!</math> indicates a logical sum over the collection of elementary relations <math>i\!:\!j\!</math> while the factors <math>G_{ij}\!</math> and <math>H_{ij}\!</math> are values in the ''[[boolean domain]]'' <math>\mathbb{B} = \{ 0, 1 \}~\!</math> that are called the ''coefficients'' of the relations <math>G\!</math> and <math>H,\!</math> respectively, with regard to the corresponding elementary relations <math>i\!:\!j.\!</math>
  
In general, for a 2-adic relation ''L'', the coefficient ''L''<sub>''ij''</sub> of the elementary relation ''i'':''j'' in the relation ''L'' will be 0 or 1, respectively, as ''i'':''j'' is excluded from or included in ''L''.
+
In general, for a dyadic relation <math>L,\!</math> the coefficient <math>L_{ij}\!</math> of the elementary relation <math>i\!:\!j\!</math> in the relation <math>L\!</math> will be <math>0\!</math> or <math>1,\!</math> respectively, as <math>i\!:\!j\!</math> is excluded from or included in <math>L.\!</math>
  
With these conventions in place, the expansions of ''G'' and ''H'' may be written out as follows:
+
With these conventions in place, the expansions of <math>G\!</math> and <math>H\!</math> may be written out as follows:
  
{| cellpadding=6 style="text-align:center"
+
{| align="center" cellpadding="4" width="90%"
| &nbsp; || ''G'' || = || 4:3 || + || 4:4 || + || 4:5 || =
+
|
|}
+
<math>\begin{matrix}G & = & 4:3 & + & 4:4 & + & 4:5 & =\end{matrix}</math>
{|
 
| style="width:20px" | &nbsp;
 
| 0(1:1) +
 
| 0(1:2) +
 
| 0(1:3) +
 
| 0(1:4) +
 
| 0(1:5) +
 
| 0(1:6) +
 
| 0(1:7) +
 
 
|-
 
|-
| &nbsp;
+
|
| 0(2:1) +
+
<math>\begin{smallmatrix}
| 0(2:2) +
+
0 \cdot (1:1) & + & 0 \cdot (1:2) & + & 0 \cdot (1:3) & + & 0 \cdot (1:4) & + & 0 \cdot (1:5) & + & 0 \cdot (1:6) & + & 0 \cdot (1:7) & +
| 0(2:3) +
+
\\
| 0(2:4) +
+
0 \cdot (2:1) & + & 0 \cdot (2:2) & + & 0 \cdot (2:3) & + & 0 \cdot (2:4) & + & 0 \cdot (2:5) & + & 0 \cdot (2:6) & + & 0 \cdot (2:7) & +
| 0(2:5) +
+
\\
| 0(2:6) +
+
0 \cdot (3:1) & + & 0 \cdot (3:2) & + & 0 \cdot (3:3) & + & 0 \cdot (3:4) & + & 0 \cdot (3:5) & + & 0 \cdot (3:6) & + & 0 \cdot (3:7) & +
| 0(2:7) +
+
\\
|-
+
0 \cdot (4:1) & + & 0 \cdot (4:2) & + & \mathbf{1} \cdot (4:3) & + & \mathbf{1} \cdot (4:4) & + & \mathbf{1} \cdot (4:5) & + & 0 \cdot (4:6) & + & 0 \cdot (4:7) & +
| &nbsp;
+
\\
| 0(3:1) +
+
0 \cdot (5:1) & + & 0 \cdot (5:2) & + & 0 \cdot (5:3) & + & 0 \cdot (5:4) & + & 0 \cdot (5:5) & + & 0 \cdot (5:6) & + & 0 \cdot (5:7) & +
| 0(3:2) +
+
\\
| 0(3:3) +
+
0 \cdot (6:1) & + & 0 \cdot (6:2) & + & 0 \cdot (6:3) & + & 0 \cdot (6:4) & + & 0 \cdot (6:5) & + & 0 \cdot (6:6) & + & 0 \cdot (6:7) & +
| 0(3:4) +
+
\\
| 0(3:5) +
+
0 \cdot (7:1) & + & 0 \cdot (7:2) & + & 0 \cdot (7:3) & + & 0 \cdot (7:4) & + & 0 \cdot (7:5) & + & 0 \cdot (7:6) & + & 0 \cdot (7:7)
| 0(3:6) +
+
\end{smallmatrix}</math>
| 0(3:7) +
 
|-
 
| &nbsp;
 
| 0(4:1) +
 
| 0(4:2) +
 
| '''1'''(4:3) +
 
| '''1'''(4:4) +
 
| '''1'''(4:5) +
 
| 0(4:6) +
 
| 0(4:7) +
 
|-
 
| &nbsp;
 
| 0(5:1) +
 
| 0(5:2) +
 
| 0(5:3) +
 
| 0(5:4) +
 
| 0(5:5) +
 
| 0(5:6) +
 
| 0(5:7) +
 
|-
 
| &nbsp;
 
| 0(6:1) +
 
| 0(6:2) +
 
| 0(6:3) +
 
| 0(6:4) +
 
| 0(6:5) +
 
| 0(6:6) +
 
| 0(6:7) +
 
|-
 
| &nbsp;
 
| 0(7:1) +
 
| 0(7:2) +
 
| 0(7:3) +
 
| 0(7:4) +
 
| 0(7:5) +
 
| 0(7:6) +
 
| 0(7:7)
 
 
|}
 
|}
<br>
 
  
{| cellpadding=6 style="text-align:center"
+
{| align="center" cellpadding="4" width="90%"
| &nbsp; || ''H'' || = || 3:4 || + || 4:4 || + || 5:4 || =
+
|
|}
+
<math>\begin{matrix}H & = & 3:4 & + & 4:4 & + & 5:4 & =\end{matrix}</math>
{|
 
| style="width:20px" | &nbsp;
 
| 0(1:1) +
 
| 0(1:2) +
 
| 0(1:3) +
 
| 0(1:4) +
 
| 0(1:5) +
 
| 0(1:6) +
 
| 0(1:7) +
 
 
|-
 
|-
| &nbsp;
+
|
| 0(2:1) +
+
<math>\begin{smallmatrix}
| 0(2:2) +
+
0 \cdot (1:1) & + & 0 \cdot (1:2) & + & 0 \cdot (1:3) & + & 0 \cdot (1:4) & + & 0 \cdot (1:5) & + & 0 \cdot (1:6) & + & 0 \cdot (1:7) & +
| 0(2:3) +
+
\\
| 0(2:4) +
+
0 \cdot (2:1) & + & 0 \cdot (2:2) & + & 0 \cdot (2:3) & + & 0 \cdot (2:4) & + & 0 \cdot (2:5) & + & 0 \cdot (2:6) & + & 0 \cdot (2:7) & +
| 0(2:5) +
+
\\
| 0(2:6) +
+
0 \cdot (3:1) & + & 0 \cdot (3:2) & + & 0 \cdot (3:3) & + & \mathbf{1} \cdot (3:4) & + & 0 \cdot (3:5) & + & 0 \cdot (3:6) & + & 0 \cdot (3:7) & +
| 0(2:7) +
+
\\
|-
+
0 \cdot (4:1) & + & 0 \cdot (4:2) & + & 0 \cdot (4:3) & + & \mathbf{1} \cdot (4:4) & + & 0 \cdot (4:5) & + & 0 \cdot (4:6) & + & 0 \cdot (4:7) & +
| &nbsp;
+
\\
| 0(3:1) +
+
0 \cdot (5:1) & + & 0 \cdot (5:2) & + & 0 \cdot (5:3) & + & \mathbf{1} \cdot (5:4) & + & 0 \cdot (5:5) & + & 0 \cdot (5:6) & + & 0 \cdot (5:7) & +
| 0(3:2) +
+
\\
| 0(3:3) +
+
0 \cdot (6:1) & + & 0 \cdot (6:2) & + & 0 \cdot (6:3) & + & 0 \cdot (6:4) & + & 0 \cdot (6:5) & + & 0 \cdot (6:6) & + & 0 \cdot (6:7) & +
| '''1'''(3:4) +
+
\\
| 0(3:5) +
+
0 \cdot (7:1) & + & 0 \cdot (7:2) & + & 0 \cdot (7:3) & + & 0 \cdot (7:4) & + & 0 \cdot (7:5) & + & 0 \cdot (7:6) & + & 0 \cdot (7:7)
| 0(3:6) +
+
\end{smallmatrix}</math>
| 0(3:7) +
 
|-
 
| &nbsp;
 
| 0(4:1) +
 
| 0(4:2) +
 
| 0(4:3) +
 
| '''1'''(4:4) +
 
| 0(4:5) +
 
| 0(4:6) +
 
| 0(4:7) +
 
|-
 
| &nbsp;
 
| 0(5:1) +
 
| 0(5:2) +
 
| 0(5:3) +
 
| '''1'''(5:4) +
 
| 0(5:5) +
 
| 0(5:6) +
 
| 0(5:7) +
 
|-
 
| &nbsp;
 
| 0(6:1) +
 
| 0(6:2) +
 
| 0(6:3) +
 
| 0(6:4) +
 
| 0(6:5) +
 
| 0(6:6) +
 
| 0(6:7) +
 
|-
 
| &nbsp;
 
| 0(7:1) +
 
| 0(7:2) +
 
| 0(7:3) +
 
| 0(7:4) +
 
| 0(7:5) +
 
| 0(7:6) +
 
| 0(7:7)
 
 
|}
 
|}
  
Stripping down to the bare essentials, one obtains the following matrices of coefficients for the relations ''G''&nbsp;and&nbsp;''H''.
+
Stripping down to the bare essentials, one obtains the following matrices of coefficients for the relations <math>G\!</math> and <math>H.\!</math>
  
{| style="text-align:center; width=30%"
+
{| align="center" cellpadding="8" width="90%"
| style="width:20px" | &nbsp; || ''G'' || =
+
|
|-
+
<math>G ~=~ \begin{pmatrix}
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 1 || 1 || 1 || 0 || 0
+
0 & 0 & 1 & 1 & 1 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
 +
\end{pmatrix}</math>
 
|}
 
|}
<br>
 
  
{| style="text-align:center; width=30%"
+
{| align="center" cellpadding="8" width="90%"
| style="width:20px" | &nbsp; || ''H'' || =
+
|
|-
+
<math>H ~=~ \begin{pmatrix}
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
 +
\end{pmatrix}</math>
 
|}
 
|}
  
These are the logical matrix representations of the 2-adic relations ''G''&nbsp;and&nbsp;''H''.
+
These are the logical matrix representations of the dyadic relations <math>G\!</math> and <math>H.\!</math>
  
If the 2-adic relations ''G'' and ''H'' are viewed as logical sums, then their relational composition ''G''&nbsp;&omicron;&nbsp;''H'' can be regarded as a product of sums, a fact that can be indicated as follows:
+
If the dyadic relations <math>G\!</math> and <math>H\!</math> are viewed as logical sums then their relational composition <math>G \circ H\!</math> can be regarded as a product of sums, a fact that can be indicated as follows:
  
: ''G''&nbsp;&omicron;&nbsp;''H'' = (&sum;<sub>''ij''</sub> ''G''<sub>''ij''</sub>(''i'':''j''))(&sum;<sub>''ij''</sub> ''H''<sub>''ij''</sub>(''i'':''j'')).
+
{| align="center" cellpadding="8" width="90%"
 +
| <math>G \circ H ~=~ (\sum_{ij} G_{ij} (i\!:\!j))(\sum_{ij} H_{ij} (i\!:\!j)).\!</math>
 +
|}
  
The composite relation ''G''&nbsp;&omicron;&nbsp;''H'' is itself a 2-adic relation over the same space ''X'', in other words, ''G''&nbsp;&omicron;&nbsp;''H''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'', and this means that ''G''&nbsp;&omicron;&nbsp;''H'' must be amenable to being written as a logical sum of the following form:
+
The composite relation <math>G \circ H\!</math> is itself a dyadic relation over the same space <math>X,\!</math> in other words, <math>G \circ H \subseteq X \times X,\!</math> and this means that <math>G \circ H\!</math> must be amenable to being written as a logical sum of the following form:
  
: ''G''&nbsp;&omicron;&nbsp;''H'' = &sum;<sub>''ij''</sub> (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub>(''i'':''j'').
+
{| align="center" cellpadding="8" width="90%"
 +
| <math>G \circ H ~=~ \sum_{ij} (G \circ H)_{ij} (i\!:\!j).\!</math>
 +
|}
  
In this formula, (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub> is the coefficient of ''G''&nbsp;&omicron;&nbsp;''H'' with respect to the elementary relation ''i'':''j''.
+
In this formula, <math>(G \circ H)_{ij}\!</math> is the coefficient of <math>G \circ H\!</math> with respect to the elementary relation <math>i\!:\!j.\!</math>
  
One of the best ways to reason out what ''G''&nbsp;&omicron;&nbsp;''H'' should be is to ask oneself what its coefficient (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub> should be for each of the elementary relations ''i'':''j'' in turn.
+
One of the best ways to reason out what <math>G \circ H\!</math> should be is to ask oneself what its coefficient <math>(G \circ H)_{ij}\!</math> should be for each of the elementary relations <math>i\!:\!j\!</math> in turn.
  
 
So let us pose the question:
 
So let us pose the question:
  
: (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub> = ?
+
{| align="center" cellpadding="8" width="90%"
 +
| <math>(G \circ H)_{ij} ~=~ ?\!</math>
 +
|}
  
 
In order to answer this question, it helps to realize that the indicated product given above can be written in the following equivalent form:
 
In order to answer this question, it helps to realize that the indicated product given above can be written in the following equivalent form:
  
: ''G''&nbsp;&omicron;&nbsp;''H'' = (&sum;<sub>''ik''</sub> ''G''<sub>''ik''</sub>(''i'':''k''))(&sum;<sub>''kj''</sub> ''H''<sub>''kj''</sub>(''k'':''j'')).
+
{| align="center" cellpadding="8" width="90%"
 +
| <math>G \circ H ~=~ (\sum_{ik} G_{ik} (i\!:\!k))(\sum_{kj} H_{kj} (k\!:\!j)).\!</math>
 +
|}
  
A moment's thought will tell us that (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub>&nbsp;=&nbsp;1 if and only if there is an element ''k'' in ''X'' such that ''G''<sub>''ik''</sub>&nbsp;=&nbsp;1 and ''H''<sub>''kj''</sub>&nbsp;=&nbsp;1.
+
A moment's thought will tell us that <math>(G \circ H)_{ij} = 1\!</math> if and only if there is an element <math>k\!</math> in <math>X\!</math> such that <math>G_{ik} = 1\!</math> and <math>H_{kj} = 1.\!</math>
  
 
Consequently, we have the result:
 
Consequently, we have the result:
  
: (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub> = &sum;<sub>k</sub> ''G''<sub>''ik''</sub>''H''<sub>''kj''</sub>.
+
{| align="center" cellpadding="8" width="90%"
 +
| <math>(G \circ H)_{ij} ~=~ \sum_{k} G_{ik} H_{kj}.\!</math>
 +
|}
  
This follows from the properties of boolean arithmetic, specifically, from the fact that the product ''G''<sub>''ik''</sub>''H''<sub>''kj''</sub> is 1 if and only if both ''G''<sub>''ik''</sub> and ''H''<sub>''kj''</sub> are 1, and from the fact that &sum;<sub>''k''</sub> ''F''<sub>''k''</sub> is equal to 1 just in case some ''F''<sub>''k''</sub> is 1.
+
This follows from the properties of boolean arithmetic, specifically, from the fact that the product <math>G_{ik} H_{kj}\!</math> is <math>1\!</math> if and only if both <math>G_{ik}\!</math> and <math>H_{kj}\!</math> are <math>1\!</math> and from the fact that <math>\textstyle\sum_{k} F_{k}\!</math> is equal to <math>1\!</math> just in case some <math>F_{k}\!</math> is <math>1.\!</math>
  
All that remains in order to obtain a computational formula for the relational composite ''G''&nbsp;&omicron;&nbsp;''H'' of the 2-adic relations ''G'' and ''H'' is to collect the coefficients (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub> over the appropriate basis of elementary relations ''i'':''j'', as ''i'' and ''j'' range through ''X''.
+
All that remains in order to obtain a computational formula for the relational composite <math>G \circ H\!</math> of the dyadic relations <math>G\!</math> and <math>H\!</math> is to collect the coefficients <math>(G \circ H)_{ij}\!</math> as <math>i\!</math> and <math>j\!</math> range over <math>X.\!</math>
  
: ''G''&nbsp;&omicron;&nbsp;''H'' = &sum;<sub>''ij''</sub> (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub>(''i'':''j'') = &sum;<sub>''ij''</sub>(&sum;<sub>''k''</sub> ''G''<sub>''ik''</sub>''H''<sub>''kj''</sub>)(''i'':''j'').
+
{| align="center" cellpadding="8" width="90%"
 +
|
 +
<math>\begin{matrix}G \circ H
 +
& = & \displaystyle \sum_{ij} (G \circ H)_{ij} (i\!:\!j)
 +
& = & \displaystyle \sum_{ij} (\sum_{k} G_{ik} H_{kj}) (i\!:\!j).
 +
\end{matrix}</math>
 +
|}
  
 
This is the logical analogue of matrix multiplication in linear algebra, the difference in the logical setting being that all of the operations performed on coefficients take place in a system of boolean arithmetic where summation corresponds to logical disjunction and multiplication corresponds to logical conjunction.
 
This is the logical analogue of matrix multiplication in linear algebra, the difference in the logical setting being that all of the operations performed on coefficients take place in a system of boolean arithmetic where summation corresponds to logical disjunction and multiplication corresponds to logical conjunction.
  
By way of disentangling this formula, one may notice that the form &sum;<sub>''k''</sub> (''G''<sub>''ik''</sub>''H''<sub>''kj''</sub>) is what is usually called a "scalar product".  In this case it is the scalar product of the ''i''<sup>th</sup> row of ''G'' with the ''j''<sup>th</sup> column of ''H''.
+
By way of disentangling this formula, one may notice that the form <math>\textstyle \sum_{k} G_{ik} H_{kj}\!</math> is what is usually called a ''scalar product''.  In this case it is the scalar product of the <math>i^\text{th}\!</math> row of <math>G\!</math> with the <math>j^\text{th}\!</math> column of <math>H.\!</math>
  
To make this statement more concrete, let us go back to the particular examples of ''G'' and ''H'' that we came in with:
+
To make this statement more concrete, let us go back to the examples of <math>G\!</math> and <math>H\!</math> we came in with:
  
{| style="text-align:center; width=30%"
+
{| align="center" cellpadding="8" width="90%"
| style="width:20px" | &nbsp; || ''G'' || =
+
|
|-
+
<math>G ~=~ \begin{pmatrix}
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 1 || 1 || 1 || 0 || 0
+
0 & 0 & 1 & 1 & 1 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
 +
\end{pmatrix}</math>
 
|}
 
|}
<br>
 
  
{| style="text-align:center; width=30%"
+
{| align="center" cellpadding="8" width="90%"
| style="width:20px" | &nbsp; || ''H'' || =
+
|
|-
+
<math>H ~=~ \begin{pmatrix}
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 1 || 0 || 0 || 0
+
0 & 0 & 0 & 1 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp; || 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
 +
\end{pmatrix}</math>
 
|}
 
|}
  
The formula for computing ''G''&nbsp;&omicron;&nbsp;''H'' says the following:
+
The formula for computing <math>G \circ H\!</math> says the following:
  
{| cellpadding="2"
+
{| align="center" cellpadding="8" width="90%"
|-
+
|
| style="width:20px" | &nbsp;
+
<math>\begin{array}{ccl}
| align="center" | (''G''&nbsp;&omicron;&nbsp;''H'')<sub>''ij''</sub>
+
(G \circ H)_{ij}
| &nbsp;
+
& = & \text{the}~ {ij}^\text{th} ~\text{entry in the matrix representation for}~ G \circ H
|-
+
\\[2pt]
| &nbsp;
+
& = & \text{the entry in the}~ {i}^\text{th} ~\text{row and the}~ {j}^\text{th} ~\text{column of}~ G \circ H
| align="center" | =
+
\\[2pt]
| the ''ij''<sup>th</sup> entry in the matrix representation for ''G''&nbsp;&omicron;&nbsp;''H''
+
& = & \text{the scalar product of the}~ {i}^\text{th} ~\text{row of}~ G ~\text{with the}~ {j}^\text{th} ~\text{column of}~ H
|-
+
\\[2pt]
| &nbsp;
+
& = & \sum_{k} G_{ik} H_{kj}
| align="center" | =
+
\end{array}</math>
| the entry in the ''i''<sup>th</sup> row and the ''j''<sup>th</sup> column of ''G''&nbsp;&omicron;&nbsp;''H''
 
|-
 
| &nbsp;
 
| align="center" | =
 
| the scalar product of the ''i''<sup>th</sup> row of ''G'' with the ''j''<sup>th</sup> column of ''H''
 
|-
 
| &nbsp;
 
| align="center" | =
 
| &sum;<sub>''k''</sub> ''G''<sub>''ik''</sub>''H''<sub>''kj''</sub>
 
 
|}
 
|}
  
As it happens, it is possible to make exceedingly light work of this example, since there is only one row of ''G'' and one column of ''H'' that are not all zeroes.  Taking the scalar product, in a logical way, of the fourth row of ''G'' with the fourth column of ''H'' produces the sole non-zero entry for the matrix of ''G''&nbsp;&omicron;&nbsp;''H''.
+
As it happens, it is possible to make exceedingly light work of this example, since there is only one row of <math>G\!</math> and one column of <math>H\!</math> that are not all zeroes.  Taking the scalar product, in a logical way, of the fourth row of <math>G\!</math> with the fourth column of <math>H\!</math> produces the sole non-zero entry for the matrix of <math>G \circ H.\!</math>
  
{| cellpadding="2px" style="text-align:center"
+
{| align="center" cellpadding="8" width="90%"
| style="width:20px" | &nbsp;
+
|
| ''G''&nbsp;&omicron;&nbsp;''H''
+
<math>G \circ H ~=~ \begin{pmatrix}
| =
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|}
+
\\
{| style="text-align:center; width=30%"
+
0 & 0 & 0 & 0 & 0 & 0 & 0
| style="width:20px" | &nbsp;
+
\\
| 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp;
+
0 & 0 & 0 & 1 & 0 & 0 & 0
| 0 || 0 || 0 || 0 || 0 || 0 || 0
+
\\
|-
+
0 & 0 & 0 & 0 & 0 & 0 & 0
| &nbsp;
+
\\
| 0 || 0 || 0 || 0 || 0 || 0 || 0
+
0 & 0 & 0 & 0 & 0 & 0 & 0
|-
+
\\
| &nbsp;
+
0 & 0 & 0 & 0 & 0 & 0 & 0
| 0 || 0 || 0 || 1 || 0 || 0 || 0
+
\end{pmatrix}</math>
|-
 
| &nbsp;
 
| 0 || 0 || 0 || 0 || 0 || 0 || 0
 
|-
 
| &nbsp;
 
| 0 || 0 || 0 || 0 || 0 || 0 || 0
 
|-
 
| &nbsp;
 
| 0 || 0 || 0 || 0 || 0 || 0 || 0
 
 
|}
 
|}
  
 
==Graph-theoretic picture==
 
==Graph-theoretic picture==
  
There is another form of representation for 2-adic relations that is useful to keep in mind, especially for its ability to render the logic of many complex formulas almost instantly understandable to the mind's eye.  This is the representation in terms of ''[[bipartite graph]]s'', or ''bigraphs'' for short.
+
There is another form of representation for dyadic relations that is useful to keep in mind, especially for its ability to render the logic of many complex formulas almost instantly understandable to the mind's eye.  This is the representation in terms of ''bipartite graphs'', or ''bigraphs'' for short.
  
Here is what ''G'' and ''H'' look like in the bigraph picture:
+
Here is what <math>G\!</math> and <math>H\!</math> look like in the bigraph picture:
  
o---------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                      |
+
|
|    1  2  3  4  5  6  7        |
+
<pre>
|    o  o  o  o  o  o  o    X    |
+
o---------------------------------------o
|                /|\                    |
+
|                                      |
|              / | \              G    |
+
|    1  2  3  4  5  6  7        |
|              /  |  \                  |
+
|    o  o  o  o  o  o  o    X    |
|    o  o  o  o  o  o  o    X    |
+
|                /|\                    |
|    1  2  3  4  5  6  7        |
+
|              / | \              G    |
|                                      |
+
|              /  |  \                  |
o---------------------------------------o
+
|    o  o  o  o  o  o  o    X    |
Figure 9.  G = 4:3 + 4:4 + 4:5
+
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 9.  G = 4:3 + 4:4 + 4:5
 +
</pre>
 +
|-
 +
|
 +
<pre>
 +
o---------------------------------------o
 +
|                                      |
 +
|    1  2  3  4  5  6  7        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|              \  |  /                  |
 +
|              \ | /              H    |
 +
|                \|/                    |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 10.  H = 3:4 + 4:4 + 5:4
 +
</pre>
 +
|}
  
o---------------------------------------o
+
These graphs may be read to say:
|                                      |
 
|    1  2  3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|              \  |  /                  |
 
|              \ | /              H    |
 
|                \|/                    |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 10.  H = 3:4 + 4:4 + 5:4
 
  
These graphs may be read to say:
+
{| align="center" cellpadding="8" width="90%"
:* ''G'' puts 4 in relation to 3, 4, 5.
+
|
:* ''H'' puts 3, 4, 5 in relation to 4.
+
<math>\begin{matrix}
 +
G ~\text{puts}~ 4 ~\text{in relation to}~ 3, 4, 5.
 +
\\[2pt]
 +
H ~\text{puts}~ 3, 4, 5 ~\text{in relation to}~ 4.
 +
\end{matrix}</math>
 +
|}
  
To form the composite relation ''G''&nbsp;&omicron;&nbsp;''H'', one simply follows the bigraph for ''G'' by the bigraph for ''H'', here arranging the bigraphs in order down the page, and then treats any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those nodes in the composite bigraph for ''G''&nbsp;&omicron;&nbsp;''H''.
+
To form the composite relation <math>G \circ H,\!</math> one simply follows the bigraph for <math>G\!</math> by the bigraph for <math>H,\!</math> here arranging the bigraphs in order down the page, and then treats any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those nodes in the composite bigraph for <math>G \circ H.\!</math>
  
 
Here's how it looks in pictures:
 
Here's how it looks in pictures:
  
o---------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                      |
+
|
|    1  2  3  4  5  6  7        |
+
<pre>
|    o  o  o  o  o  o  o    X    |
+
o---------------------------------------o
|                /|\                    |
+
|                                      |
|              / | \              G    |
+
|    1  2  3  4  5  6  7        |
|              /  |  \                  |
+
|    o  o  o  o  o  o  o    X    |
|    o  o  o  o  o  o  o    X    |
+
|                /|\                    |
|              \  |  /                  |
+
|              / | \              G    |
|              \ | /              H    |
+
|              /  |  \                  |
|                \|/                    |
+
|    o  o  o  o  o  o  o    X    |
|    o  o  o  o  o  o  o    X    |
+
|              \  |  /                  |
|    1  2  3  4  5  6  7        |
+
|              \ | /              H    |
|                                      |
+
|                \|/                    |
o---------------------------------------o
+
|    o  o  o  o  o  o  o    X    |
Figure 11.  G Followed By H
+
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 11.  G Followed By H
 +
</pre>
 +
|-
 +
|
 +
<pre>
 +
o---------------------------------------o
 +
|                                      |
 +
|    1  2  3  4  5  6  7        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|                |                    |
 +
|                |              G o H  |
 +
|                |                    |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 12.  G Composed With H
 +
</pre>
 +
|}
 +
 
 +
Once again we find that <math>G \circ H = 4:4.\!</math>
  
  o---------------------------------------o
+
We have now seen three different representations of dyadic relations. If one has a strong preference for letters, or numbers, or pictures, then one may be tempted to take one or another of these as being canonical, but each of them will be found to have its peculiar advantages and disadvantages in any given application, and the maximum advantage is therefore approached by keeping all three of them in mind.
|                                      |
 
|    1  2  3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|                |                    |
 
|                |              G o H  |
 
|                |                    |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 12. G Composed With H
 
  
Once again we find that ''G''&nbsp;&omicron;&nbsp;''H'' = 4:4.
+
To see the promised utility of the bigraph picture of dyadic relations, let us devise a slightly more complex example of a composition problem, and use it to illustrate the logic of the matrix multiplication formula.
  
We have now seen three different representations of 2-adic relations.  If one has a strong preference for letters, or numbers, or pictures, then one may be tempted to take one or another of these as being canonical, but each of them will be found to have its peculiar advantages and disadvantages in any given application, and the maximum advantage is therefore approached by keeping all three of them in mind.
+
Keeping to the same space <math>X = \{ 1, 2, 3, 4, 5, 6, 7 \},\!</math> define the dyadic relations <math>M, N \subseteq X \times X\!</math> as follows:
  
To see the promised utility of the bigraph picture of 2-adic relations, let us devise a slightly more complex example of a composition problem, and use it to illustrate the logic of the matrix multiplication formula.
+
{| align="center" cellpadding="8" width="90%"
 +
|
 +
<math>\begin{array}{*{19}{c}}
 +
M & = &
 +
2\!:\!1 & + & 2\!:\!2 & + & 2\!:\!3 & + & 4\!:\!3 & + & 4\!:\!4 & + & 4\!:\!5 & + & 6\!:\!5 & + & 6\!:\!6 & + & 6\!:\!7
 +
\\[2pt]
 +
N & = &
 +
1\!:\!1 & + & 2\!:\!1 & + & 3\!:\!3 & + & 4\!:\!3 & ~ &    +    & ~ & 4\!:\!5 & + & 5\!:\!5 & + & 6\!:\!7 & + & 7\!:\!7
 +
\end{array}</math>
 +
|}
  
Keeping to the same space ''X'' = {1, 2, 3, 4, 5, 6, 7}, define the 2-adic relations ''M'',&nbsp;''N''&nbsp;&sube;&nbsp;''X''&nbsp;&times;&nbsp;''X'' as follows:
+
Here are the bigraph pictures:
  
{| cellpadding="2px" style="text-align:center"  
+
{| align="center" border="0" cellpadding="10"
| style="width:20px" | &nbsp;
+
|
| ''M''
+
<pre>
| &nbsp;
+
o---------------------------------------o
| =
+
|                                       |
| &nbsp;
+
|     1  2   3  4  5  6  7        |
| 2:1
+
|     o  o  o  o  o  o  o    X    |
| +
+
|       /|\    /|\    /|\            |
| 2:2
+
|       / | \  / | \  / | \      M    |
| +
+
|     /  |  \ /  | \ /  | \          |
| 2:3
+
|     o  o  o  o  o  o  o    X    |
| +
+
|     1  2  3  4   5   6  7        |
| 4:3
+
|                                       |
| +
+
o---------------------------------------o
| 4:4
+
Figure 13.  Dyadic Relation M
| +
+
</pre>
| 4:5
 
| +
 
| 6:5
 
| +
 
| 6:6
 
| +
 
| 6:7
 
 
|-
 
|-
| &nbsp;
+
|
| ''N''
+
<pre>
| &nbsp;
+
o---------------------------------------o
| =
+
|                                       |
| &nbsp;
+
|     1   2  3  4  5  6  7        |
| 1:1
+
|     o  o  o  o  o  o  o    X    |
| +
+
|     |  /    |  / \  |    \  |        |
| 2:1
+
|     | /    | /  \ |    \ |    N    |
| +
+
|     |/      |/    \|     \|         |
| 3:3
+
|     o  o  o  o  o  o  o    X    |
| +
+
|     1  2  3  4   5   6  7        |
| 4:3
+
|                                       |
| &nbsp;
+
o---------------------------------------o
| +
+
Figure 14.  Dyadic Relation N
| &nbsp;
+
</pre>
| 4:5
 
| +
 
| 5:5
 
| +
 
| 6:7
 
| +
 
| 7:7
 
 
|}
 
|}
  
Here are the bigraph pictures:
+
To form the composite relation <math>M \circ N,\!</math> one simply follows the bigraph for <math>M\!</math> by the bigraph for <math>N,\!</math> arranging the bigraphs in order down the page, and then counts any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those two nodes in the composite bigraph for <math>M \circ N.\!</math>
  
o---------------------------------------o
+
Here's how it looks in pictures:
|                                      |
 
|    1  2  3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|        /|\    /|\    /|\            |
 
|      / | \  / | \  / | \      M    |
 
|      /  |  \ /  |  \ /  |  \          |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 13.  Dyadic Relation M
 
  
o---------------------------------------o
+
{| align="center" border="0" cellpadding="10"
|                                      |
+
|
|    1  2  3  4  5  6  7        |
+
<pre>
  |    o  o  o  o  o  o  o    X    |
+
o---------------------------------------o
|    |  /    |  / \  |    \  |        |
+
|                                      |
|    | /    | /  \ |    \ |    N    |
+
|    1  2  3  4  5  6  7        |
|    |/      |/    \|      \|        |
+
|    o  o  o  o  o  o  o    X    |
  |    o  o  o  o  o  o  o    X    |
+
|        /|\    /|\    /|\            |
  |    1  2  3  4  5  6  7        |
+
|      / | \  / | \  / | \      M    |
|                                      |
+
|      /  |  \ / |  \ /  |  \          |
o---------------------------------------o
+
|    o  o  o  o  o  o  o    X    |
Figure 14Dyadic Relation N
+
|    |  /    |  / \  |    \  |        |
 +
|    | /    | /  \ |    \ |    N    |
 +
|    |/      |/    \|      \|        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 15. M Followed By N
 +
</pre>
 +
|-
 +
|
 +
<pre>
 +
o---------------------------------------o
 +
|                                      |
 +
|    1  2  3  4  5  6  7        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|        / \    / \    / \            |
 +
|      /  \  /  \  /  \    M o N |
 +
|      /    \ /    \ /    \          |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 16M Composed With N
 +
</pre>
 +
|}
  
To form the composite relation ''M''&nbsp;&omicron;&nbsp;''N'', one simply follows the bigraph for ''M'' by the bigraph for ''N'', here arranging the bigraphs in order down the page, and then  counts any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those two nodes in the composite bigraph for ''M''&nbsp;&omicron;&nbsp;''N''.
+
Let us hark back to that mysterious matrix multiplication formula, and see how it appears in the light of the bigraph representation.
  
Here's how it looks in pictures:
+
The coefficient of the composition <math>M \circ N\!</math> between <math>i\!</math> and <math>j\!</math> in <math>X\!</math> is given as follows:
  
o---------------------------------------o
+
{| align="center" cellpadding="8" width="90%"
|                                      |
+
| <math>(M \circ N)_{ij} ~=~ \sum_{k} M_{ik} N_{kj}\!</math>
|    1  2  3  4  5  6  7        |
+
|}
|    o  o  o  o  o  o  o    X    |
 
|        /|\    /|\    /|\            |
 
|      / | \  / | \  / | \      M   |
 
|      /  |  \ /  |  \ /  |  \         |
 
|    o  o  o  o  o  o  o    X    |
 
|    |  /    |  / \  |    \  |        |
 
|    | /    | /   \ |    \ |    N    |
 
|     |/      |/    \|      \|        |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 15.  M Followed By N
 
  
  o---------------------------------------o
+
Graphically interpreted, this is a ''sum over paths''. Starting at the node <math>i,\!</math> <math>M_{ik}\!</math> being <math>1\!</math> indicates that there is an edge in the bigraph of <math>M\!</math> from node <math>i\!</math> to node <math>k\!</math> and <math>N_{kj}\!</math> being <math>1\!</math> indicates that there is an edge in the bigraph of <math>N\!</math> from node <math>k\!</math> to node <math>j.\!</math> So the <math>\textstyle\sum_{k}\!</math> ranges over all possible intermediaries <math>k,\!</math> ascending from <math>0\!</math> to <math>1\!</math> just as soon as there happens to be a path of length two between nodes <math>i\!</math> and <math>j.\!</math>
|                                      |
 
|    1   2  3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|        / \     / \     / \           |
 
|      /   \   /   \   /   \   M o N |
 
|      /     \ /     \ /     \         |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 16. M Composed With N
 
  
Let us hark back to that mysterious matrix multiplication formula, and see how it appears in the light of the bigraph representation.
+
It is instructive at this point to compute the other possible composition that can be formed from <math>M\!</math> and <math>N,\!</math> namely, the composition <math>N \circ M,\!</math> that takes <math>M\!</math> and <math>N\!</math> in the opposite order.  Here is the graphic computation:
  
The coefficient of the composition ''M''&nbsp;&omicron;&nbsp;''N'' between ''i'' and ''j'' in ''X'' is given as follows:
+
{| align="center" border="0" cellpadding="10"
 +
|
 +
<pre>
 +
o---------------------------------------o
 +
|                                      |
 +
|    1  2  3  4  5  6  7        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    |  /    |  / \  |    \  |        |
 +
|    | /    | /  \ |    \ |    N    |
 +
|    |/      |/    \|      \|        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|        /|\    /|\    /|\            |
 +
|      / | \  / | \  / | \      M    |
 +
|      /  |  \ /  |  \ /  |  \          |
 +
|    o  o  o  o  o  o  o    X    |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 17.  N Followed By M
 +
</pre>
 +
|-
 +
|
 +
<pre>
 +
o---------------------------------------o
 +
|                                      |
 +
|    1  2  3  4  5  6  7        |
 +
|    o  o  o  o  o  o  o    X    |
 +
|                                      |
 +
|                                N o M  |
 +
|                                      |
 +
|    o  o  o  o  o  o  o    X   |
 +
|    1  2  3  4  5  6  7        |
 +
|                                      |
 +
o---------------------------------------o
 +
Figure 18.  N Composed With M
 +
</pre>
 +
|}
  
: (''M''&nbsp;&omicron;&nbsp;''N'')<sub>''ij''</sub> = &sum;<sub>''k''</sub>(''M''<sub>''ik''</sub>''N''<sub>''kj''</sub>)
+
In sum, <math>N \circ M = 0.\!</math> This example affords sufficient evidence that relational composition, just like its kindred, matrix multiplication, is a ''non-commutative'' algebraic operation.
  
Graphically interpreted, this is a ''sum over paths''.  Starting at the node ''i'', ''M''<sub>''ik''</sub> being 1 indicates that there is an edge in the bigraph of ''M'' from node ''i'' to node ''k'', and ''N''<sub>''kj''</sub> being 1 indicates that there is an edge in the bigraph of ''N'' from node ''k'' to node ''j''.  So the &sum;<sub>''k''</sub> ranges over all possible intermediaries ''k'', ascending from 0 to 1 just as soon as there happens to be some path of length two between nodes ''i'' and ''j''.
+
==References==
  
It is instructive at this point to compute the other possible composition that can be formed from ''M'' and ''N'', namely, the composition ''N''&nbsp;&omicron;&nbsp;''M'', that takes ''M'' and ''N'' in the opposite order. Here is the graphic computation:
+
* Ulam, S.M., and Bednarek, A.R., &ldquo;On the Theory of Relational Structures and Schemata for Parallel Computation&rdquo; (1977), pp. 477&ndash;508 in A.R. Bednarek and Françoise Ulam (eds.), ''Analogies Between Analogies : The Mathematical Reports of S.M. Ulam and His Los&nbsp;Alamos Collaborators'', University of California Press, Berkeley, CA, 1990.
  
o---------------------------------------o
+
==Bibliography==
|                                      |
 
|    1  2  3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|    |  /    |  / \  |    \  |        |
 
|    | /    | /  \ |    \ |    N    |
 
|    |/      |/    \|      \|        |
 
|    o  o  o  o  o  o  o    X    |
 
|        /|\    /|\    /|\            |
 
|      / | \  / | \  / | \      M    |
 
|      /  |  \ /  |  \ /  |  \          |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 17.  N Followed By M
 
  
o---------------------------------------o
+
* Mathematical Society of Japan, ''Encyclopedic Dictionary of Mathematics'', 2nd edition, 2&nbsp;volumes., Kiyosi Itô (ed.), MIT Press, Cambridge, MA, 1993.
|                                      |
 
|    1  2   3  4  5  6  7        |
 
|    o  o  o  o  o  o  o    X    |
 
|                                      |
 
|                                N o M  |
 
|                                      |
 
|    o  o  o  o  o  o  o    X    |
 
|    1  2  3  4  5  6  7        |
 
|                                      |
 
o---------------------------------------o
 
Figure 18. N Composed With M
 
  
In sum, ''N''&nbsp;&omicron;&nbsp;''M'' = 0. This example affords sufficient evidence that relational composition, just like its kindred, matrix multiplication, is a ''[[non-commutative]]'' algebraic operation.
+
* Mili, A., Desharnais, J., Mili, F., with Frappier, M., ''Computer Program Construction'', Oxford University Press, New York, NY, 1994.
  
==Reduction==
+
* Ulam, S.M., ''Analogies Between Analogies : The Mathematical Reports of S.M. Ulam and His Los&nbsp;Alamos Collaborators'', A.R. Bednarek and Françoise Ulam (eds.), University of California Press, Berkeley, CA, 1990.
: ''Main article : [[Relation reduction]]''
 
  
==References==
+
==Syllabus==
  
* [[Stanislaw Marcin Ulam|Ulam, S.M.]] and [[Al Bednarek|Bednarek, A.R.]], "On the Theory of Relational Structures and Schemata for Parallel Computation" (1977), 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, 1990.
+
===Focal nodes===
  
==Bibliography==
+
* [[Inquiry Live]]
 +
* [[Logic Live]]
  
* [[Mathematical Society of Japan]], ''Encyclopedic Dictionary of Mathematics'', 2nd edition, 2 vols., Kiyosi Itô (ed.), MIT Press, Cambridge, MA, 1993.
+
===Peer nodes===
  
* Mili, A., Desharnais, J., Mili, F., with Frappier, M., ''Computer Program Construction'', Oxford University Press, New York, NY, 1994. — Introduction to Tarskian relation theory and its applications within the relational programming paradigm.
+
* [http://intersci.ss.uci.edu/wiki/index.php/Relation_composition Relation Composition @ InterSciWiki]
 +
* [http://mywikibiz.com/Relation_composition Relation Composition @ MyWikiBiz]
 +
* [http://ref.subwiki.org/wiki/Relation_composition Relation Composition @ Subject Wikis]
 +
* [http://en.wikiversity.org/wiki/Relation_composition Relation Composition @ Wikiversity]
 +
* [http://beta.wikiversity.org/wiki/Relation_composition Relation Composition @ Wikiversity Beta]
  
* [[Stanislaw Marcin Ulam|Ulam, S.M.]], ''Analogies Between Analogies:  The Mathematical Reports of S.M. Ulam and His Los Alamos Collaborators'', A.R. Bednarek and Françoise Ulam (eds.), University of California Press, Berkeley, CA, 1990.
+
===Logical operators===
  
==See also==
+
{{col-begin}}
 +
{{col-break}}
 +
* [[Exclusive disjunction]]
 +
* [[Logical conjunction]]
 +
* [[Logical disjunction]]
 +
* [[Logical equality]]
 +
{{col-break}}
 +
* [[Logical implication]]
 +
* [[Logical NAND]]
 +
* [[Logical NNOR]]
 +
* [[Logical negation|Negation]]
 +
{{col-end}}
  
===History===
+
===Related topics===
  
* [[George Boole|Boole, George]]
+
{{col-begin}}
* [[Augustus De Morgan|De Morgan, Augustus]]
+
{{col-break}}
* [[Charles Sanders Peirce|Peirce, Charles Sanders]]
+
* [[Ampheck]]
* [[Alfred Tarski|Tarski, Alfred]]
+
* [[Boolean domain]]
 +
* [[Boolean function]]
 +
* [[Boolean-valued function]]
 +
* [[Differential logic]]
 +
{{col-break}}
 +
* [[Logical graph]]
 +
* [[Minimal negation operator]]
 +
* [[Multigrade operator]]
 +
* [[Parametric operator]]
 +
* [[Peirce's law]]
 +
{{col-break}}
 +
* [[Propositional calculus]]
 +
* [[Sole sufficient operator]]
 +
* [[Truth table]]
 +
* [[Universe of discourse]]
 +
* [[Zeroth order logic]]
 +
{{col-end}}
  
===Related topics===
+
===Relational concepts===
  
 
{{col-begin}}
 
{{col-begin}}
 
{{col-break}}
 
{{col-break}}
* [[Binary relation]]
+
* [[Continuous predicate]]
* [[Function composition]]
+
* [[Hypostatic abstraction]]
* [[Inverse relation]]
 
 
* [[Logic of relatives]]
 
* [[Logic of relatives]]
 
* [[Logical matrix]]
 
* [[Logical matrix]]
* [[Projection (set theory)|Projection]]
+
{{col-break}}
 
* [[Relation (mathematics)|Relation]]
 
* [[Relation (mathematics)|Relation]]
 +
* [[Relation composition]]
 
* [[Relation construction]]
 
* [[Relation construction]]
 +
* [[Relation reduction]]
 
{{col-break}}
 
{{col-break}}
* [[Relation reduction]]
+
* [[Relation theory]]
* [[Relational algebra]]
+
* [[Relative term]]
* [[Relational database]]
+
* [[Sign relation]]
* [[Relational model]]
 
* [[Tacit extension]]
 
* [[Theory of relations]]
 
 
* [[Triadic relation]]
 
* [[Triadic relation]]
* [[Types of relations]]
 
 
{{col-end}}
 
{{col-end}}
 +
 +
===Information, Inquiry===
 +
 +
{{col-begin}}
 +
{{col-break}}
 +
* [[Inquiry]]
 +
* [[Dynamics of inquiry]]
 +
{{col-break}}
 +
* [[Semeiotic]]
 +
* [[Logic of information]]
 +
{{col-break}}
 +
* [[Descriptive science]]
 +
* [[Normative science]]
 +
{{col-break}}
 +
* [[Pragmatic maxim]]
 +
* [[Truth theory]]
 +
{{col-end}}
 +
 +
===Related articles===
 +
 +
{{col-begin}}
 +
{{col-break}}
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Cactus_Language Cactus Language]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Futures_Of_Logical_Graphs Futures Of Logical Graphs]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Propositional_Equation_Reasoning_Systems Propositional Equation Reasoning Systems]
 +
{{col-break}}
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Differential_Logic_:_Introduction Differential Logic : Introduction]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Differential_Propositional_Calculus Differential Propositional Calculus]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Differential_Logic_and_Dynamic_Systems_2.0 Differential Logic and Dynamic Systems]
 +
{{col-break}}
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Introduction_to_Inquiry_Driven_Systems Introduction to Inquiry Driven Systems]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Prospects_for_Inquiry_Driven_Systems Prospects for Inquiry Driven Systems]
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Inquiry_Driven_Systems Inquiry Driven Systems : Inquiry Into Inquiry]
 +
{{col-end}}
 +
 +
==Document history==
 +
 +
Portions of the above article were adapted from the following sources under the [[GNU Free Documentation License]], under other applicable licenses, or by permission of the copyright holders.
 +
 +
* [http://intersci.ss.uci.edu/wiki/index.php/Relation_composition Relation Composition], [http://intersci.ss.uci.edu/ InterSciWiki]
 +
* [http://mywikibiz.com/Relation_composition Relation Composition], [http://mywikibiz.com/ MyWikiBiz]
 +
* [http://semanticweb.org/wiki/Relation_composition Relation Composition], [http://semanticweb.org/ Semantic Web]
 +
* [http://ref.subwiki.org/wiki/Relation_composition Relation Composition], [http://ref.subwiki.org/ Subject Wikis]
 +
* [http://wikinfo.org/w/index.php/Relation_composition Relation Composition], [http://wikinfo.org/w/ Wikinfo]
 +
* [http://en.wikiversity.org/wiki/Relation_composition Relation Composition], [http://en.wikiversity.org/ Wikiversity]
 +
* [http://beta.wikiversity.org/wiki/Relation_composition Relation Composition], [http://beta.wikiversity.org/ Wikiversity Beta]
 +
* [http://en.wikipedia.org/w/index.php?title=Relation_composition&oldid=43467878 Relation Composition], [http://en.wikipedia.org/ Wikipedia]
 +
 +
[[Category:Combinatorics]]
 +
[[Category:Computer Science]]
 +
[[Category:Database Theory]]
 +
[[Category:Discrete Mathematics]]
 +
[[Category:Formal Sciences]]
 +
[[Category:Inquiry]]
 +
[[Category:Logic]]
 +
[[Category:Mathematics]]
 +
[[Category:Relation Theory]]
 +
[[Category:Set Theory]]

Latest revision as of 18:14, 14 November 2015

This page belongs to resource collections on Logic and Inquiry.

Relation composition, or the composition of relations, is the generalization of function composition, or the composition of functions.  The following treatment of relation composition takes the “strongly typed” approach to relations that is outlined in the article on relation theory.

Preliminaries

There are several ways to formalize the subject matter of relations. Relations and their combinations may be described in the logic of relative terms, in set theories of various kinds, and through a broadening of category theory from functions to relations in general.

The first order of business is to define the operation on relations that is variously known as the composition of relations, relational composition, or relative multiplication. In approaching the more general constructions, it pays to begin with the composition of dyadic and triadic relations.

As an incidental observation on usage, there are many different conventions of syntax for denoting the application and composition of relations, with perhaps even more options in general use than are common for the application and composition of functions. In this case there is little chance of standardization, since the convenience of conventions is relative to the context of use, and the same writers use different styles of syntax in different settings, depending on the ease of analysis and computation.

The first dimension of variation in syntax has to do with the correspondence between the order of operation and the linear order of terms on the page.

The second dimension of variation in syntax has to do with the automatic assumptions in place about the associations of terms in the absence of associations marked by parentheses. This becomes a significant factor with relations in general because the usual property of associativity is lost as both the complexities of compositions and the dimensions of relations increase.

These two factors together generate the following four styles of syntax:

LALA = left application, left association.
LARA = left application, right association.
RALA = right application, left association.
RARA = right application, right association.

Definition

A notion of relational composition is to be defined that generalizes the usual notion of functional composition:

Composing on the right, \(f : X \to Y\) followed by \(g : Y \to Z\)

results in a composite function formulated as \(fg : X \to Z.\)

Composing on the left, \(f : X \to Y\) followed by \(g : Y \to Z\)

results in a composite function formulated as \(gf : X \to Z.\)

Note on notation. The ordinary symbol for functional composition is the composition sign, a small circle "\(\circ\)" written between the names of the functions being composed, as \(f \circ g,\) but the sign is often omitted if there is no risk of confusing the composition of functions with their algebraic product. In contexts where both compositions and products occur, either the composition is marked on each occasion or else the product is marked by means of a center dot “\(\cdot\)”, as \(f \cdot g.\)

Generalizing the paradigm along parallel lines, the composition of a pair of dyadic relations is formulated in the following two ways:

Composing on the right, \(P \subseteq X \times Y\) followed by \(Q \subseteq Y \times Z\)

results in a composite relation formulated as \(PQ \subseteq X \times Z.\)

Composing on the left, \(P \subseteq X \times Y\) followed by \(Q \subseteq Y \times Z\)

results in a composite relation formulated as \(QP \subseteq X \times Z.\)

Geometric construction

There is a neat way of defining relational compositions in geometric terms, not only showing their relationship to the projection operations that come with any cartesian product, but also suggesting natural directions for generalizing relational compositions beyond the dyadic case, and even beyond relations that have any fixed arity, in effect, to the general case of formal languages as generalized relations.

This way of looking at relational compositions is sometimes referred to as Tarski's Trick, on account of his having put it to especially good use in his work (Ulam and Bednarek, 1977). It supplies the imagination with a geometric way of visualizing the relational composition of a pair of dyadic relations, doing this by attaching concrete imagery to the basic set-theoretic operations, namely, intersections, projections, and a certain class of operations inverse to projections, here called tacit extensions.

The stage is set for Tarski's trick by highlighting the links between two topics that are likely to appear wholly unrelated at first, namely:

  • The use of logical conjunction, as denoted by the symbol \(\land,\!\) in expressions of the form \(F(x, y, z) = G(x, y) \land H(y, z),\!\) to define a triadic relation \(F\!\) in terms of a pair of dyadic relations \(G\!\) and \(H.\!\)
  • The concepts of dyadic projection and projective determination, that are invoked in the “weak” notion of projective reducibility.

The relational composition \(G \circ H\!\) of a pair of dyadic relations \(G\!\) and \(H\!\) will be constructed in three stages, first, by taking the tacit extensions of \(G\!\) and \(H\!\) to triadic relations that reside in the same space, next, by taking the intersection of these extensions, tantamount to the maximal triadic relation that is consistent with the prima facie dyadic relation data, finally, by projecting this intersection on a suitable plane to form a third dyadic relation, constituting in fact the relational composition \(G \circ H\!\) of the relations \(G\!\) and \(H.\!\)

The construction of a relational composition in a specifically mathematical setting normally begins with mathematical relations at a higher level of abstraction than the corresponding objects in linguistic or logical settings. This is due to the fact that mathematical objects are typically specified only up to isomorphism as the conventional saying goes, that is, any objects that have the “same form” are generally regarded as the being the same thing, for most all intents and mathematical purposes. Thus the mathematical construction of a relational composition begins by default with a pair of dyadic relations that reside, without loss of generality, in the same plane, say, \(G, H \subseteq X \times Y,\!\) as shown in Figure 1.

o-------------------------------------------------o
|                                                 |
|        o                       o                |
|        |\                      |\               |
|        | \                     | \              |
|        |  \                    |  \             |
|        |   \                   |   \            |
|        |    \                  |    \           |
|        |     \                 |     \          |
|        |   *  \                |   *  \         |
|        X   *   Y               X   *   Y        |
|         \  *   |                \  *   |        |
|          \ G   |                 \ H   |        |
|           \    |                  \    |        |
|            \   |                   \   |        |
|             \  |                    \  |        |
|              \ |                     \ |        |
|               \|                      \|        |
|                o                       o        |
|                                                 |
o-------------------------------------------------o
Figure 1.  Dyadic Relations G, H c X x Y

The dyadic relations \(G\!\) and \(H\!\) cannot be composed at all at this point, not without additional information or further stipulation. In order for their relational composition to be possible, one of two types of cases has to happen:

  • The first type of case occurs when \(X = Y.\!\) In this case, both of the compositions \(G \circ H\!\) and \(H \circ G\!\) are defined.
  • The second type of case occurs when \(X\!\) and \(Y\!\) are distinct, but when it nevertheless makes sense to speak of a dyadic relation \(\hat{H}\!\) that is isomorphic to \(H,\!\) but living in the plane \(YZ,\!\) that is, in the space of the cartesian product \(Y \times Z,\!\) for some set \(Z.\!\)

Whether you view isomorphic things to be the same things or not, you still have to specify the exact isomorphisms that are needed to transform any given representation of a thing into a required representation of the same thing. Let us imagine that we have done this, and say how later:

o-------------------------------------------------o
|                                                 |
|        o                               o        |
|        |\                             /|        |
|        | \                           / |        |
|        |  \                         /  |        |
|        |   \                       /   |        |
|        |    \                     /    |        |
|        |     \                   /     |        |
|        |   *  \                 /  *   |        |
|        X   *   Y               Y   *   Z        |
|         \  *   |               |   *  /         |
|          \ G   |               |   Ĥ /          |
|           \    |               |    /           |
|            \   |               |   /            |
|             \  |               |  /             |
|              \ |               | /              |
|               \|               |/               |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 2.  Dyadic Relations G c X x Y and Ĥ c Y x Z

With the required spaces carefully swept out, the stage is set for the presentation of Tarski's trick, and the invocation of the following symbolic formula, claimed to be a definition of the relational composition \(P \circ Q\!\) of a pair of dyadic relations \(P, Q \subseteq X \times X.\!\)

Definition. \(P \circ Q = \mathrm{proj}_{13} (P \times X ~\cap~ X \times Q).\!\)

To get this drift of this definition one needs to understand that it comes from a point of view that regards all dyadic relations as covered well enough by subsets of a suitable cartesian square and thus of the form \(L \subseteq X \times X.\!\) So, if one has started out with a dyadic relation of the shape \(L \subseteq U \times V,\!\) one merely lets \(X = U \cup V,\!\) trading in the initial \(L\!\) for a new \(L \subseteq X \times X\!\) as need be.

The projection \(\mathrm{proj}_{13}\!\) is just the projection of the cartesian cube \(X \times X \times X\!\) on the space of shape \(X \times X\!\) that is spanned by the first and the third domains, but since they now have the same names and the same contents it is necessary to distinguish them by numbering their relational places.

Finally, the notation of the cartesian product sign “\(\times\!\)” is extended to signify two other products with respect to a dyadic relation \(L \subseteq X \times X\!\) and a subset \(W \subseteq X,\!\) as follows:

Definition. \(L \times W ~=~ \{ (x, y, z) \in X^3 ~:~ (x, y) \in L ~\mathrm{and}~ z \in W \}.\!\)
Definition. \(W \times L ~=~ \{ (x, y, z) \in X^3 ~:~ x \in W ~\mathrm{and}~ (y, z) \in L \}.\!\)

Applying these definitions to the case \(P, Q \subseteq X \times X,\!\) the two dyadic relations whose relational composition \(P \circ Q \subseteq X \times X\!\) is about to be defined, one finds:

\[P \times X ~=~ \{ (x, y, z) \in X^3 ~:~ (x, y) \in P ~\mathrm{and}~ z \in X \},\!\]

\[X \times Q ~=~ \{ (x, y, z) \in X^3 ~:~ x \in X ~\mathrm{and}~ (y, z) \in Q \}.\!\]

These are just the appropriate special cases of the tacit extensions already defined.

\[P \times X ~=~ \mathrm{te}_{12}^3 (P),~\!\]

\[X \times Q ~=~ \mathrm{te}_{23}^1 (Q).~\!\]

In summary, then, the expression:

\[\mathrm{proj}_{13} (P \times X ~\cap~ X \times Q)\!\]

is equivalent to the expression:

\[\mathrm{proj}_{13} (\mathrm{te}_{12}^3 (P) ~\cap~ \mathrm{te}_{23}^1 (Q))\!\]

and this form is generalized — although, relative to one's school of thought, perhaps inessentially so — by the form that was given above as follows:

Definition. \(P \circ Q ~=~ \mathrm{proj}_{XZ} (\mathrm{te}_{XY}^Z (P) ~\cap~ \mathrm{te}_{YZ}^X (Q)).\!\)

Figure 3 presents a geometric picture of what is involved in formulating a definition of the triadic relation \(F \subseteq X \times Y \times Z\!\) by way of a conjunction between the dyadic relation \(G \subseteq X \times Y\!\) and the dyadic relation \(H \subseteq Y \times Z,\!\) as done for example by means of an expression of the following form:

  • \(F(x, y, z) ~=~ G(x, y) \land H(y, z).\!\)
o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /      |      \                 |
|                o       o       o                |
|                |\     / \     /|                |
|                | \   / F \   / |                |
|                |  \ /  *  \ /  |                |
|                |   \  /*\  /   |                |
|                |  / \//*\\/ \  |                |
|                | /  /\/ \/\  \ |                |
|                |/  ///\ /\\\  \|                |
|        o       X  ///  Y  \\\  Z       o        |
|        |\       \///   |   \\\/       /|        |
|        | \      ///    |    \\\      / |        |
|        |  \    ///\    |    /\\\    /  |        |
|        |   \  ///  \   |   /  \\\  /   |        |
|        |    \///    \  |  /    \\\/    |        |
|        |    /\/      \ | /      \/\    |        |
|        |   *//\       \|/       /\\*   |        |
|        X   */  Y       o       Y  \*   Z        |
|         \  *   |               |   *  /         |
|          \ G   |               |   H /          |
|           \    |               |    /           |
|            \   |               |   /            |
|             \  |               |  /             |
|              \ |               | /              |
|               \|               |/               |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 3.  Projections of F onto G and H

To interpret the Figure, visualize the triadic relation \(F \subseteq X \times Y \times Z\!\) as a body in \(XYZ\!\)-space, while \(G\!\) is a figure in \(XY\!\)-space and \(H\!\) is a figure in \(YZ\!\)-space.

The dyadic projections that accompany a triadic relation over \(X, Y, Z\!\) are defined as follows:

  • \(\mathrm{proj}_{XY} (L) ~=~ \{ (x, y) \in X \times Y : (x, y, z) \in L ~\text{for some}~ z \in Z) \},\!\)
  • \(\mathrm{proj}_{XZ} (L) ~=~ \{ (x, z) \in X \times Z : (x, y, z) \in L ~\text{for some}~ y \in Y) \},\!\)
  • \(\mathrm{proj}_{YZ} (L) ~=~ \{ (y, z) \in Y \times Z : (x, y, z) \in L ~\text{for some}~ x \in X) \}.\!\)

For many purposes it suffices to indicate the dyadic projections of a triadic relation \(L\!\) by means of the briefer equivalents listed next:

  • \(L_{XY} ~=~ \mathrm{proj}_{XY}(L),\!\)
  • \(L_{XZ} ~=~ \mathrm{proj}_{XZ}(L),\!\)
  • \(L_{YZ} ~=~ \mathrm{proj}_{YZ}(L).\!\)

In light of these definitions, \(\mathrm{proj}_{XY}\!\) is a mapping from the set \(\mathcal{L}_{XYZ}\!\) of triadic relations over the domains \(X, Y, Z\!\) to the set \(\mathcal{L}_{XY}\!\) of dyadic relations over the domains \(X, Y,\!\) with similar relationships holding for the other projections. To formalize these relationships in a concise but explicit manner, it serves to add a few more definitions.

The set \(\mathcal{L}_{XYZ},~\!\) whose members are just the triadic relations over \(X, Y, Z,\!\) can be recognized as the set of all subsets of the cartesian product \(X \times Y \times Z,\!\) also known as the power set of \(X \times Y \times Z,\!\) and notated here as \(\mathrm{Pow} (X \times Y \times Z).\!\)

  • \(\mathcal{L}_{XYZ} ~=~ \{ L : L \subseteq X \times Y \times Z \} ~=~ \mathrm{Pow} (X \times Y \times Z).\!\)

Likewise, the power sets of the pairwise cartesian products encompass all the dyadic relations on pairs of distinct domains that can be chosen from \(\{ X, Y, Z \}.\!\)

  • \(\mathcal{L}_{XY} ~=~ \{L : L \subseteq X \times Y \} ~=~ \mathrm{Pow} (X \times Y),~\!\)
  • \(\mathcal{L}_{XZ} ~=~ \{L : L \subseteq X \times Z \} ~=~ \mathrm{Pow} (X \times Z),~\!\)
  • \(\mathcal{L}_{YZ} ~=~ \{L : L \subseteq Y \times Z \} ~=~ \mathrm{Pow} (Y \times Z).~\!\)

In mathematics, the inverse relation corresponding to a projection map is usually called an extension. To avoid confusion with other senses of the word, however, it is probably best for the sake of this discussion to stick with the more specific term tacit extension.

Given three sets, \(X, Y, Z,\!\) and three dyadic relations,

  • \(U \subseteq X \times Y,~\!\)
  • \(V \subseteq X \times Z,~\!\)
  • \(W \subseteq Y \times Z,~\!\)

the tacit extensions, \(\mathrm{te}_{XY}^Z, \mathrm{te}_{XZ}^Y, \mathrm{te}_{YZ}^X,~\!\) of \(U, V, W,\!\) respectively, are defined as follows:

  • \(\mathrm{te}_{XY}^Z (U) ~=~ \{ (x, y, z) : (x, y) \in U \},\!\)
  • \(\mathrm{te}_{XZ}^Y (V) ~=~ \{ (x, y, z) : (x, z) \in V \},\!\)
  • \(\mathrm{te}_{YZ}^X (W) ~=~ \{ (x, y, z) : (y, z) \in W \}.\!\)

So long as the intended indices attaching to the tacit extensions can be gathered from context, it is usually clear enough to use the abbreviated forms, \(\mathrm{te}(U), \mathrm{te}(V), \mathrm{te}(W).\!\)

The definition and illustration of relational composition presently under way makes use of the tacit extension of \(G \subseteq X \times Y\!\) to \(\mathrm{te}(G) \subseteq X \times Y \times Z\!\) and the tacit extension of \(H \subseteq Y \times Z\!\) to \(\mathrm{te}(H) \subseteq X \times Y \times Z,\!\) only.

Geometric illustrations of \(\mathrm{te}(G)\!\) and \(\mathrm{te}(H)\!\) are afforded by Figures 4 and 5, respectively.

o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /      |   *  \                 |
|                o       o  **   o                |
|                |\     / \***  /|                |
|                | \   /  ***  / |                |
|                |  \ /  ***\ /  |                |
|                |   \  ***  /   |                |
|                |  / \***  / \  |                |
|                | /  ***  /   \ |                |
|                |/  ***\ /     \|                |
|        o       X  /**  Y       Z       o        |
|        |\       \//*   |      /       /|        |
|        | \      ///    |     /       / |        |
|        |  \    ///\    |    /       /  |        |
|        |   \  ///  \   |   /       /   |        |
|        |    \///    \  |  /       /    |        |
|        |    /\/      \ | /       /     |        |
|        |   *//\       \|/       /  *   |        |
|        X   */  Y       o       Y   *   Z        |
|         \  *   |               |   *  /         |
|          \ G   |               |   H /          |
|           \    |               |    /           |
|            \   |               |   /            |
|             \  |               |  /             |
|              \ |               | /              |
|               \|               |/               |
|                o               o                |
|                                                 |
o-------------------------------------------------o
 Figure 4.  Tacit Extension of G to X x Y x Z
o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /  *   |      \                 |
|                o   **  o       o                |
|                |\  ***/ \     /|                |
|                | \  ***  \   / |                |
|                |  \ /***  \ /  |                |
|                |   \  ***  /   |                |
|                |  / \  ***/ \  |                |
|                | /   \  ***  \ |                |
|                |/     \ /***  \|                |
|        o       X       Y  **\  Z       o        |
|        |\       \      |   *\\/       /|        |
|        | \       \     |    \\\      / |        |
|        |  \       \    |    /\\\    /  |        |
|        |   \       \   |   /  \\\  /   |        |
|        |    \       \  |  /    \\\/    |        |
|        |     \       \ | /      \/\    |        |
|        |   *  \       \|/       /\\*   |        |
|        X   *   Y       o       Y  \*   Z        |
|         \  *   |               |   *  /         |
|          \ G   |               |   H /          |
|           \    |               |    /           |
|            \   |               |   /            |
|             \  |               |  /             |
|              \ |               | /              |
|               \|               |/               |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 5.  Tacit Extension of H to X x Y x Z

A geometric interpretation can now be given that fleshes out in graphic form the meaning of a formula like the following:

  • \(F(x, y, z) ~=~ G(x, y) \land H(y, z).\!\)

The conjunction that is indicated by “\(\land\!\)” corresponds as usual to an intersection of two sets, however, in this case it is the intersection of the tacit extensions \(\mathrm{te}(G)\!\) and \(\mathrm{te}(H).\!\)

o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /      |      \                 |
|                o       o       o                |
|                |\     / \     /|                |
|                | \   / F \   / |                |
|                |  \ /  *  \ /  |                |
|                |   \  /*\  /   |                |
|                |  / \//*\\/ \  |                |
|                | /  /\/ \/\  \ |                |
|                |/  ///\ /\\\  \|                |
|        o       X  ///  Y  \\\  Z       o        |
|        |\       \///   |   \\\/       /|        |
|        | \      ///    |    \\\      / |        |
|        |  \    ///\    |    /\\\    /  |        |
|        |   \  ///  \   |   /  \\\  /   |        |
|        |    \///    \  |  /    \\\/    |        |
|        |    /\/      \ | /      \/\    |        |
|        |   *//\       \|/       /\\*   |        |
|        X   */  Y       o       Y  \*   Z        |
|         \  *   |               |   *  /         |
|          \ G   |               |   H /          |
|           \    |               |    /           |
|            \   |               |   /            |
|             \  |               |  /             |
|              \ |               | /              |
|               \|               |/               |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 6.  F as the Intersection of te(G) and te(H)

Algebraic construction

The transition from a geometric picture of relation composition to an algebraic formulation is accomplished through the introduction of coordinates, in other words, identifiable names for the objects that are related through the various forms of relations, dyadic and triadic in the present case. Adding coordinates to the running Example produces the following Figure:

o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /      |      \                 |
|                o       o       o                |
|                |\     / \     /|                |
|                | \   / F \   / |                |
|                |  \ /  *  \ /  |                |
|                |   \  /*\  /   |                |
|                |  / \//*\\/ \  |                |
|                | /  /\/ \/\  \ |                |
|                |/  ///\ /\\\  \|                |
|        o       X  ///  Y  \\\  Z       o        |
|        |\      7\///   |   \\\/7      /|        |
|        | \      6//    |    \\6      / |        |
|        |  \    //5\    |    /5\\    /  |        |
|        |   \  /// 4\   |   /4 \\\  /   |        |
|        |    \///   3\  |  /3   \\\/    |        |
|        |   G/\/     2\ | /2     \/\H   |        |
|        |   *//\      1\|/1      /\\*   |        |
|        X   *\  Y       o       Y  /*   Z        |
|        7\  *\\ |7             7| //*  /7        |
|         6\ |\\\|6             6|///| /6         |
|          5\| \\@5             5@// |/5          |
|           4@  \@4             4@/  @4           |
|            3\  @3             3@  /3            |
|             2\ |2             2| /2             |
|              1\|1             1|/1              |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 7.  F as the Intersection of te(G) and te(H)

Thinking of relations in operational terms is facilitated by using variant notations for ordered tuples and sets of ordered tuples, namely, the ordered pair \((x, y)\!\) is written \(x\!:\!y,\!\) the ordered triple \((x, y, z)\!\) is written \(x\!:\!y\!:\!z,\!\) and so on, and a set of tuples is conceived as a logical-algebraic sum, which can be written out in the smaller finite cases in forms like \(a\!:\!b ~+~ b\!:\!c ~+~ c\!:\!d\!\) and so on.

For example, translating the relations \(F \subseteq X \times Y \times Z, ~ G \subseteq X \times Y, ~ H \subseteq Y \times Z\!\) into this notation produces the following summary of the data:

\(\begin{matrix} F & = & 4:3:4 & + & 4:4:4 & + & 4:5:4 \\ G & = & 4:3 & + & 4:4 & + & 4:5 \\ H & = & 3:4 & + & 4:4 & + & 5:4 \end{matrix}\)

As often happens with abstract notations for functions and relations, the type information, in this case, the fact that \(G\!\) and \(H\!\) live in different spaces, is left implicit in the context of use.

Let us now verify that all of the proposed definitions, formulas, and other relationships check out against the concrete data of the current composition example. The ultimate goal is to develop a clearer picture of what is going on in the formula that expresses the relational composition of a couple of dyadic relations in terms of the medial projection of the intersection of their tacit extensions:

\(G \circ H ~=~ \mathrm{proj}_{XZ} (\mathrm{te}_{XY}^Z (G) ~\cap~ \mathrm{te}_{YZ}^X (H)).\!\)

Here is the big picture, with all the pieces in place:

o-------------------------------------------------o
|                                                 |
|                        o                        |
|                       / \                       |
|                      /   \                      |
|                     /     \                     |
|                    /       \                    |
|                   /         \                   |
|                  /           \                  |
|                 /    G o H    \                 |
|                X       *       Z                |
|                7\     /|\     /7                |
|                 6\   / | \   /6                 |
|                  5\ /  |  \ /5                  |
|                   4@   |   @4                   |
|                    3\  |  /3                    |
|                     2\ | /2                     |
|                      1\|/1                      |
|                        |                        |
|                        |                        |
|                        |                        |
|                       /|\                       |
|                      / | \                      |
|                     /  |  \                     |
|                    /   |   \                    |
|                   /    |    \                   |
|                  /     |     \                  |
|                 /      |      \                 |
|                o       |       o                |
|                |\     /|\     /|                |
|                | \   / F \   / |                |
|                |  \ /  *  \ /  |                |
|                |   \  /*\  /   |                |
|                |  / \//*\\/ \  |                |
|                | /  /\/ \/\  \ |                |
|                |/  ///\ /\\\  \|                |
|        o       X  ///  Y  \\\  Z       o        |
|        |\       \///   |   \\\/       /|        |
|        | \      ///    |    \\\      / |        |
|        |  \    ///\    |    /\\\    /  |        |
|        |   \  ///  \   |   /  \\\  /   |        |
|        |    \///    \  |  /    \\\/    |        |
|        |   G/\/      \ | /      \/\H   |        |
|        |   *//\       \|/       /\\*   |        |
|        X   *\  Y       o       Y  /*   Z        |
|        7\  *\\ |7             7| //*  /7        |
|         6\ |\\\|6             6|///| /6         |
|          5\| \\@5             5@// |/5          |
|           4@  \@4             4@/  @4           |
|            3\  @3             3@  /3            |
|             2\ |2             2| /2             |
|              1\|1             1|/1              |
|                o               o                |
|                                                 |
o-------------------------------------------------o
Figure 8.  G o H  =  proj_XZ (te(G) |^| te(H))

All that remains is to check the following collection of data and derivations against the situation represented in Figure 8.

\(\begin{matrix} F & = & 4:3:4 & + & 4:4:4 & + & 4:5:4 \\ G & = & 4:3 & + & 4:4 & + & 4:5 \\ H & = & 3:4 & + & 4:4 & + & 5:4 \end{matrix}\)

\(\begin{matrix} G \circ H & = & (4\!:\!3 ~+~ 4\!:\!4 ~+~ 4\!:\!5)(3\!:\!4 ~+~ 4\!:\!4 ~+~ 5\!:\!4) \\[6pt] & = & 4:4 \end{matrix}\)

\(\begin{matrix} \mathrm{te}(G) & = & \mathrm{te}_{XY}^Z (G) \\[4pt] & = & \displaystyle\sum_{z=1}^7 (4\!:\!3\!:\!z ~+~ 4\!:\!4\!:\!z ~+~ 4\!:\!5\!:\!z) \end{matrix}\)

\(\begin{matrix} \mathrm{te}(G) & = & 4:3:1 & + & 4:4:1 & + & 4:5:1 & + \\ & & 4:3:2 & + & 4:4:2 & + & 4:5:2 & + \\ & & 4:3:3 & + & 4:4:3 & + & 4:5:3 & + \\ & & 4:3:4 & + & 4:4:4 & + & 4:5:4 & + \\ & & 4:3:5 & + & 4:4:5 & + & 4:5:5 & + \\ & & 4:3:6 & + & 4:4:6 & + & 4:5:6 & + \\ & & 4:3:7 & + & 4:4:7 & + & 4:5:7 \end{matrix}\)

\(\begin{matrix} \mathrm{te}(H) & = & \mathrm{te}_{YZ}^X (H) \\[4pt] & = & \displaystyle\sum_{x=1}^7 (x\!:\!3\!:\!4 ~+~ x\!:\!4\!:\!4 ~+~ x\!:\!5\!:\!4) \end{matrix}\)

\(\begin{matrix} \mathrm{te}(H) & = & 1:3:4 & + & 1:4:4 & + & 1:5:4 & + \\ & & 2:3:4 & + & 2:4:4 & + & 2:5:4 & + \\ & & 3:3:4 & + & 3:4:4 & + & 3:5:4 & + \\ & & 4:3:4 & + & 4:4:4 & + & 4:5:4 & + \\ & & 5:3:4 & + & 5:4:4 & + & 5:5:4 & + \\ & & 6:3:4 & + & 6:4:4 & + & 6:5:4 & + \\ & & 7:3:4 & + & 7:4:4 & + & 7:5:4 \end{matrix}\)

\(\begin{array}{ccl} \mathrm{te}(G) \cap \mathrm{te}(H) & = & 4\!:\!3:\!4 ~+~ 4\!:\!4\!:\!4 ~+~ 4\!:\!5\!:\!4 \\[4pt] G \circ H & = & \mathrm{proj}_{XZ} (\mathrm{te}(G) \cap \mathrm{te}(H)) \\[4pt] & = & \mathrm{proj}_{XZ} (4\!:\!3:\!4 ~+~ 4\!:\!4\!:\!4 ~+~ 4\!:\!5\!:\!4) \\[4pt] & = & 4:4 \end{array}\)

Matrix representation

We have it within our reach to pick up another way of representing dyadic relations, namely, the representation as logical matrices, and also to grasp the analogy between relational composition and ordinary matrix multiplication as it appears in linear algebra.

First of all, while we still have the data of a very simple concrete case in mind, let us reflect on what we did in our last Example in order to find the composition \(G \circ H\!\) of the dyadic relations \(G\!\) and \(H.\!\)

Here is the setup that we had before:

\(\begin{matrix}X & = & \{ 1, 2, 3, 4, 5, 6, 7 \}\end{matrix}\)

\(\begin{matrix} G & = & 4:3 & + & 4:4 & + & 4:5 & \subseteq & X \times X \\ H & = & 3:4 & + & 4:4 & + & 5:4 & \subseteq & X \times X \end{matrix}\)

Let us recall the rule for finding the relational composition of a pair of dyadic relations. Given the dyadic relations \(P \subseteq X \times Y\!\) and \(Q \subseteq Y \times Z,\!\) the composition of \(P ~\text{on}~ Q\!\) is written as \(P \circ Q,\!\) or more simply as \(PQ,\!\) and obtained as follows:

To compute \(PQ,\!\) in general, where \(P\!\) and \(Q\!\) are dyadic relations, simply multiply out the two sums in the ordinary distributive algebraic way, but subject to the following rule for finding the product of two elementary relations of shapes \(a:b\!\) and \(c:d.\!\)

\(\begin{matrix} (a:b)(c:d) & = & (a:d) & \text{if}~ b = c \\ (a:b)(c:d) & = & 0 & \text{otherwise} \end{matrix}\)

To find the relational composition \(G \circ H,\!\) one may begin by writing it as a quasi-algebraic product:

\(\begin{matrix} G \circ H & = & (4\!:\!3 ~+~ 4\!:\!4 ~+~ 4\!:\!5)(3\!:\!4 ~+~ 4\!:\!4 ~+~ 5\!:\!4) \end{matrix}\)

Multiplying this out in accord with the applicable form of distributive law one obtains the following expansion:

\(\begin{matrix} G \circ H & = & (4:3)(3:4) & + & (4:3)(4:4) & + & (4:3)(5:4) & + \\ & & (4:4)(3:4) & + & (4:4)(4:4) & + & (4:4)(5:4) & + \\ & & (4:5)(3:4) & + & (4:5)(4:4) & + & (4:5)(5:4) \end{matrix}\)

Applying the rule that determines the product of elementary relations produces the following array:

\(\begin{matrix} G \circ H & = & 4:4 & + & 0 & + & 0 & + \\ & & 0 & + & 4:4 & + & 0 & + \\ & & 0 & + & 0 & + & 4:4 \end{matrix}\)

Since the plus sign in this context represents an operation of logical disjunction or set-theoretic aggregation, all of the positive multiplicites count as one, and this gives the ultimate result:

\(\begin{matrix}G \circ H & = & 4:4\end{matrix}\)

With an eye toward extracting a general formula for relation composition, viewed here on analogy to algebraic multiplication, let us examine what we did in multiplying the dyadic relations \(G\!\) and \(H\!\) together to obtain their relational composite \(G \circ H.\!\)

Given the space \(X = \{ 1, 2, 3, 4, 5, 6, 7 \},\!\) whose cardinality \(|X|\!\) is \(7,\!\) there are \(|X \times X| = |X| \cdot |X|\!\) \(=\!\) \(7 \cdot 7 = 49\!\) elementary relations of the form \(i:j,\!\) where \(i\!\) and \(j\!\) range over the space \(X.\!\) Although they might be organized in many different ways, it is convenient to regard the collection of elementary relations as arranged in a lexicographic block of the following form:

\(\begin{matrix} 1\!:\!1 & 1\!:\!2 & 1\!:\!3 & 1\!:\!4 & 1\!:\!5 & 1\!:\!6 & 1\!:\!7 \\ 2\!:\!1 & 2\!:\!2 & 2\!:\!3 & 2\!:\!4 & 2\!:\!5 & 2\!:\!6 & 2\!:\!7 \\ 3\!:\!1 & 3\!:\!2 & 3\!:\!3 & 3\!:\!4 & 3\!:\!5 & 3\!:\!6 & 3\!:\!7 \\ 4\!:\!1 & 4\!:\!2 & 4\!:\!3 & 4\!:\!4 & 4\!:\!5 & 4\!:\!6 & 4\!:\!7 \\ 5\!:\!1 & 5\!:\!2 & 5\!:\!3 & 5\!:\!4 & 5\!:\!5 & 5\!:\!6 & 5\!:\!7 \\ 6\!:\!1 & 6\!:\!2 & 6\!:\!3 & 6\!:\!4 & 6\!:\!5 & 6\!:\!6 & 6\!:\!7 \\ 7\!:\!1 & 7\!:\!2 & 7\!:\!3 & 7\!:\!4 & 7\!:\!5 & 7\!:\!6 & 7\!:\!7 \end{matrix}\)

The relations \(G\!\) and \(H\!\) may then be regarded as logical sums of the following forms:

\(\begin{matrix} G & = & \displaystyle\sum_{ij} G_{ij} (i\!:\!j) \\[20pt] H & = & \displaystyle\sum_{ij} H_{ij} (i\!:\!j) \end{matrix}\!\)

The notation \(\textstyle\sum_{ij}\!\) indicates a logical sum over the collection of elementary relations \(i\!:\!j\!\) while the factors \(G_{ij}\!\) and \(H_{ij}\!\) are values in the boolean domain \(\mathbb{B} = \{ 0, 1 \}~\!\) that are called the coefficients of the relations \(G\!\) and \(H,\!\) respectively, with regard to the corresponding elementary relations \(i\!:\!j.\!\)

In general, for a dyadic relation \(L,\!\) the coefficient \(L_{ij}\!\) of the elementary relation \(i\!:\!j\!\) in the relation \(L\!\) will be \(0\!\) or \(1,\!\) respectively, as \(i\!:\!j\!\) is excluded from or included in \(L.\!\)

With these conventions in place, the expansions of \(G\!\) and \(H\!\) may be written out as follows:

\(\begin{matrix}G & = & 4:3 & + & 4:4 & + & 4:5 & =\end{matrix}\)

\(\begin{smallmatrix} 0 \cdot (1:1) & + & 0 \cdot (1:2) & + & 0 \cdot (1:3) & + & 0 \cdot (1:4) & + & 0 \cdot (1:5) & + & 0 \cdot (1:6) & + & 0 \cdot (1:7) & + \\ 0 \cdot (2:1) & + & 0 \cdot (2:2) & + & 0 \cdot (2:3) & + & 0 \cdot (2:4) & + & 0 \cdot (2:5) & + & 0 \cdot (2:6) & + & 0 \cdot (2:7) & + \\ 0 \cdot (3:1) & + & 0 \cdot (3:2) & + & 0 \cdot (3:3) & + & 0 \cdot (3:4) & + & 0 \cdot (3:5) & + & 0 \cdot (3:6) & + & 0 \cdot (3:7) & + \\ 0 \cdot (4:1) & + & 0 \cdot (4:2) & + & \mathbf{1} \cdot (4:3) & + & \mathbf{1} \cdot (4:4) & + & \mathbf{1} \cdot (4:5) & + & 0 \cdot (4:6) & + & 0 \cdot (4:7) & + \\ 0 \cdot (5:1) & + & 0 \cdot (5:2) & + & 0 \cdot (5:3) & + & 0 \cdot (5:4) & + & 0 \cdot (5:5) & + & 0 \cdot (5:6) & + & 0 \cdot (5:7) & + \\ 0 \cdot (6:1) & + & 0 \cdot (6:2) & + & 0 \cdot (6:3) & + & 0 \cdot (6:4) & + & 0 \cdot (6:5) & + & 0 \cdot (6:6) & + & 0 \cdot (6:7) & + \\ 0 \cdot (7:1) & + & 0 \cdot (7:2) & + & 0 \cdot (7:3) & + & 0 \cdot (7:4) & + & 0 \cdot (7:5) & + & 0 \cdot (7:6) & + & 0 \cdot (7:7) \end{smallmatrix}\)

\(\begin{matrix}H & = & 3:4 & + & 4:4 & + & 5:4 & =\end{matrix}\)

\(\begin{smallmatrix} 0 \cdot (1:1) & + & 0 \cdot (1:2) & + & 0 \cdot (1:3) & + & 0 \cdot (1:4) & + & 0 \cdot (1:5) & + & 0 \cdot (1:6) & + & 0 \cdot (1:7) & + \\ 0 \cdot (2:1) & + & 0 \cdot (2:2) & + & 0 \cdot (2:3) & + & 0 \cdot (2:4) & + & 0 \cdot (2:5) & + & 0 \cdot (2:6) & + & 0 \cdot (2:7) & + \\ 0 \cdot (3:1) & + & 0 \cdot (3:2) & + & 0 \cdot (3:3) & + & \mathbf{1} \cdot (3:4) & + & 0 \cdot (3:5) & + & 0 \cdot (3:6) & + & 0 \cdot (3:7) & + \\ 0 \cdot (4:1) & + & 0 \cdot (4:2) & + & 0 \cdot (4:3) & + & \mathbf{1} \cdot (4:4) & + & 0 \cdot (4:5) & + & 0 \cdot (4:6) & + & 0 \cdot (4:7) & + \\ 0 \cdot (5:1) & + & 0 \cdot (5:2) & + & 0 \cdot (5:3) & + & \mathbf{1} \cdot (5:4) & + & 0 \cdot (5:5) & + & 0 \cdot (5:6) & + & 0 \cdot (5:7) & + \\ 0 \cdot (6:1) & + & 0 \cdot (6:2) & + & 0 \cdot (6:3) & + & 0 \cdot (6:4) & + & 0 \cdot (6:5) & + & 0 \cdot (6:6) & + & 0 \cdot (6:7) & + \\ 0 \cdot (7:1) & + & 0 \cdot (7:2) & + & 0 \cdot (7:3) & + & 0 \cdot (7:4) & + & 0 \cdot (7:5) & + & 0 \cdot (7:6) & + & 0 \cdot (7:7) \end{smallmatrix}\)

Stripping down to the bare essentials, one obtains the following matrices of coefficients for the relations \(G\!\) and \(H.\!\)

\(G ~=~ \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}\)

\(H ~=~ \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}\)

These are the logical matrix representations of the dyadic relations \(G\!\) and \(H.\!\)

If the dyadic relations \(G\!\) and \(H\!\) are viewed as logical sums then their relational composition \(G \circ H\!\) can be regarded as a product of sums, a fact that can be indicated as follows:

\(G \circ H ~=~ (\sum_{ij} G_{ij} (i\!:\!j))(\sum_{ij} H_{ij} (i\!:\!j)).\!\)

The composite relation \(G \circ H\!\) is itself a dyadic relation over the same space \(X,\!\) in other words, \(G \circ H \subseteq X \times X,\!\) and this means that \(G \circ H\!\) must be amenable to being written as a logical sum of the following form:

\(G \circ H ~=~ \sum_{ij} (G \circ H)_{ij} (i\!:\!j).\!\)

In this formula, \((G \circ H)_{ij}\!\) is the coefficient of \(G \circ H\!\) with respect to the elementary relation \(i\!:\!j.\!\)

One of the best ways to reason out what \(G \circ H\!\) should be is to ask oneself what its coefficient \((G \circ H)_{ij}\!\) should be for each of the elementary relations \(i\!:\!j\!\) in turn.

So let us pose the question:

\((G \circ H)_{ij} ~=~ ?\!\)

In order to answer this question, it helps to realize that the indicated product given above can be written in the following equivalent form:

\(G \circ H ~=~ (\sum_{ik} G_{ik} (i\!:\!k))(\sum_{kj} H_{kj} (k\!:\!j)).\!\)

A moment's thought will tell us that \((G \circ H)_{ij} = 1\!\) if and only if there is an element \(k\!\) in \(X\!\) such that \(G_{ik} = 1\!\) and \(H_{kj} = 1.\!\)

Consequently, we have the result:

\((G \circ H)_{ij} ~=~ \sum_{k} G_{ik} H_{kj}.\!\)

This follows from the properties of boolean arithmetic, specifically, from the fact that the product \(G_{ik} H_{kj}\!\) is \(1\!\) if and only if both \(G_{ik}\!\) and \(H_{kj}\!\) are \(1\!\) and from the fact that \(\textstyle\sum_{k} F_{k}\!\) is equal to \(1\!\) just in case some \(F_{k}\!\) is \(1.\!\)

All that remains in order to obtain a computational formula for the relational composite \(G \circ H\!\) of the dyadic relations \(G\!\) and \(H\!\) is to collect the coefficients \((G \circ H)_{ij}\!\) as \(i\!\) and \(j\!\) range over \(X.\!\)

\(\begin{matrix}G \circ H & = & \displaystyle \sum_{ij} (G \circ H)_{ij} (i\!:\!j) & = & \displaystyle \sum_{ij} (\sum_{k} G_{ik} H_{kj}) (i\!:\!j). \end{matrix}\)

This is the logical analogue of matrix multiplication in linear algebra, the difference in the logical setting being that all of the operations performed on coefficients take place in a system of boolean arithmetic where summation corresponds to logical disjunction and multiplication corresponds to logical conjunction.

By way of disentangling this formula, one may notice that the form \(\textstyle \sum_{k} G_{ik} H_{kj}\!\) is what is usually called a scalar product. In this case it is the scalar product of the \(i^\text{th}\!\) row of \(G\!\) with the \(j^\text{th}\!\) column of \(H.\!\)

To make this statement more concrete, let us go back to the examples of \(G\!\) and \(H\!\) we came in with:

\(G ~=~ \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}\)

\(H ~=~ \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}\)

The formula for computing \(G \circ H\!\) says the following:

\(\begin{array}{ccl} (G \circ H)_{ij} & = & \text{the}~ {ij}^\text{th} ~\text{entry in the matrix representation for}~ G \circ H \\[2pt] & = & \text{the entry in the}~ {i}^\text{th} ~\text{row and the}~ {j}^\text{th} ~\text{column of}~ G \circ H \\[2pt] & = & \text{the scalar product of the}~ {i}^\text{th} ~\text{row of}~ G ~\text{with the}~ {j}^\text{th} ~\text{column of}~ H \\[2pt] & = & \sum_{k} G_{ik} H_{kj} \end{array}\)

As it happens, it is possible to make exceedingly light work of this example, since there is only one row of \(G\!\) and one column of \(H\!\) that are not all zeroes. Taking the scalar product, in a logical way, of the fourth row of \(G\!\) with the fourth column of \(H\!\) produces the sole non-zero entry for the matrix of \(G \circ H.\!\)

\(G \circ H ~=~ \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}\)

Graph-theoretic picture

There is another form of representation for dyadic relations that is useful to keep in mind, especially for its ability to render the logic of many complex formulas almost instantly understandable to the mind's eye. This is the representation in terms of bipartite graphs, or bigraphs for short.

Here is what \(G\!\) and \(H\!\) look like in the bigraph picture:

o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|                /|\                    |
|               / | \              G    |
|              /  |  \                  |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 9.  G = 4:3 + 4:4 + 4:5
o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|              \  |  /                  |
|               \ | /              H    |
|                \|/                    |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 10.  H = 3:4 + 4:4 + 5:4

These graphs may be read to say:

\(\begin{matrix} G ~\text{puts}~ 4 ~\text{in relation to}~ 3, 4, 5. \\[2pt] H ~\text{puts}~ 3, 4, 5 ~\text{in relation to}~ 4. \end{matrix}\)

To form the composite relation \(G \circ H,\!\) one simply follows the bigraph for \(G\!\) by the bigraph for \(H,\!\) here arranging the bigraphs in order down the page, and then treats any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those nodes in the composite bigraph for \(G \circ H.\!\)

Here's how it looks in pictures:

o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|                /|\                    |
|               / | \              G    |
|              /  |  \                  |
|     o   o   o   o   o   o   o    X    |
|              \  |  /                  |
|               \ | /              H    |
|                \|/                    |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 11.  G Followed By H
o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|                 |                     |
|                 |              G o H  |
|                 |                     |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 12.  G Composed With H

Once again we find that \(G \circ H = 4:4.\!\)

We have now seen three different representations of dyadic relations. If one has a strong preference for letters, or numbers, or pictures, then one may be tempted to take one or another of these as being canonical, but each of them will be found to have its peculiar advantages and disadvantages in any given application, and the maximum advantage is therefore approached by keeping all three of them in mind.

To see the promised utility of the bigraph picture of dyadic relations, let us devise a slightly more complex example of a composition problem, and use it to illustrate the logic of the matrix multiplication formula.

Keeping to the same space \(X = \{ 1, 2, 3, 4, 5, 6, 7 \},\!\) define the dyadic relations \(M, N \subseteq X \times X\!\) as follows:

\(\begin{array}{*{19}{c}} M & = & 2\!:\!1 & + & 2\!:\!2 & + & 2\!:\!3 & + & 4\!:\!3 & + & 4\!:\!4 & + & 4\!:\!5 & + & 6\!:\!5 & + & 6\!:\!6 & + & 6\!:\!7 \\[2pt] N & = & 1\!:\!1 & + & 2\!:\!1 & + & 3\!:\!3 & + & 4\!:\!3 & ~ & + & ~ & 4\!:\!5 & + & 5\!:\!5 & + & 6\!:\!7 & + & 7\!:\!7 \end{array}\)

Here are the bigraph pictures:

o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|        /|\     /|\     /|\            |
|       / | \   / | \   / | \      M    |
|      /  |  \ /  |  \ /  |  \          |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 13.  Dyadic Relation M
o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|     |  /    |  / \  |    \  |         |
|     | /     | /   \ |     \ |    N    |
|     |/      |/     \|      \|         |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 14.  Dyadic Relation N

To form the composite relation \(M \circ N,\!\) one simply follows the bigraph for \(M\!\) by the bigraph for \(N,\!\) arranging the bigraphs in order down the page, and then counts any non-empty set of paths of length two between two nodes as being equivalent to a single directed edge between those two nodes in the composite bigraph for \(M \circ N.\!\)

Here's how it looks in pictures:

o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|        /|\     /|\     /|\            |
|       / | \   / | \   / | \      M    |
|      /  |  \ /  |  \ /  |  \          |
|     o   o   o   o   o   o   o    X    |
|     |  /    |  / \  |    \  |         |
|     | /     | /   \ |     \ |    N    |
|     |/      |/     \|      \|         |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 15.  M Followed By N
o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|        / \     / \     / \            |
|       /   \   /   \   /   \    M o N  |
|      /     \ /     \ /     \          |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 16.  M Composed With N

Let us hark back to that mysterious matrix multiplication formula, and see how it appears in the light of the bigraph representation.

The coefficient of the composition \(M \circ N\!\) between \(i\!\) and \(j\!\) in \(X\!\) is given as follows:

\((M \circ N)_{ij} ~=~ \sum_{k} M_{ik} N_{kj}\!\)

Graphically interpreted, this is a sum over paths. Starting at the node \(i,\!\) \(M_{ik}\!\) being \(1\!\) indicates that there is an edge in the bigraph of \(M\!\) from node \(i\!\) to node \(k\!\) and \(N_{kj}\!\) being \(1\!\) indicates that there is an edge in the bigraph of \(N\!\) from node \(k\!\) to node \(j.\!\) So the \(\textstyle\sum_{k}\!\) ranges over all possible intermediaries \(k,\!\) ascending from \(0\!\) to \(1\!\) just as soon as there happens to be a path of length two between nodes \(i\!\) and \(j.\!\)

It is instructive at this point to compute the other possible composition that can be formed from \(M\!\) and \(N,\!\) namely, the composition \(N \circ M,\!\) that takes \(M\!\) and \(N\!\) in the opposite order. Here is the graphic computation:

o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|     |  /    |  / \  |    \  |         |
|     | /     | /   \ |     \ |    N    |
|     |/      |/     \|      \|         |
|     o   o   o   o   o   o   o    X    |
|        /|\     /|\     /|\            |
|       / | \   / | \   / | \      M    |
|      /  |  \ /  |  \ /  |  \          |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 17.  N Followed By M
o---------------------------------------o
|                                       |
|     1   2   3   4   5   6   7         |
|     o   o   o   o   o   o   o    X    |
|                                       |
|                                N o M  |
|                                       |
|     o   o   o   o   o   o   o    X    |
|     1   2   3   4   5   6   7         |
|                                       |
o---------------------------------------o
Figure 18.  N Composed With M

In sum, \(N \circ M = 0.\!\) This example affords sufficient evidence that relational composition, just like its kindred, matrix multiplication, is a non-commutative algebraic operation.

References

  • Ulam, S.M., and Bednarek, A.R., “On the Theory of Relational Structures and Schemata for Parallel Computation” (1977), 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, 1990.

Bibliography

  • Mathematical Society of Japan, Encyclopedic Dictionary of Mathematics, 2nd edition, 2 volumes., Kiyosi Itô (ed.), MIT Press, Cambridge, MA, 1993.
  • Mili, A., Desharnais, J., Mili, F., with Frappier, M., Computer Program Construction, Oxford University Press, New York, NY, 1994.
  • Ulam, S.M., Analogies Between Analogies : The Mathematical Reports of S.M. Ulam and His Los Alamos Collaborators, A.R. Bednarek and Françoise Ulam (eds.), University of California Press, Berkeley, CA, 1990.

Syllabus

Focal nodes

Peer nodes

Logical operators

Template:Col-breakTemplate:Col-breakTemplate:Col-end

Related topics

Template:Col-breakTemplate:Col-breakTemplate:Col-breakTemplate:Col-end

Relational concepts

Template:Col-breakTemplate:Col-breakTemplate:Col-breakTemplate:Col-end

Information, Inquiry

Template:Col-breakTemplate:Col-breakTemplate:Col-breakTemplate:Col-breakTemplate:Col-end

Related articles

Template:Col-breakTemplate:Col-breakTemplate:Col-breakTemplate:Col-end

Document history

Portions of the above article were adapted from the following sources under the GNU Free Documentation License, under other applicable licenses, or by permission of the copyright holders.