Relational operators in algebra

Purpose of relational operators

To say things such as "the name of the owner", we want to string together multiple relations (viz. name and owner). Relational operators allow us to make such statements.

There are two relational operators: the converse (\smallsmile) and the composition (semicolon ;; ). This page discusses the most important laws about these operators.

Converse

There are two things you should know about the converse operator. The first is that the converse of the converse gives you the relation itself, whatever that relation may be:

r = r{r\smallsmile}\smallsmile\ =\ r

The second thing you should know is that arguments switch places if the converse is brought outside (or inside) brackets

r;s = (s;r)r\smallsmile ; s\smallsmile\ =\ (s;r)\smallsmile

Composition

The composition operator is denoted by a semicolon (;) between two terms. It is pronounced as 'composed with', in this case: rr composed with ss.

Composition is associative, which means:

r;(s;t) = (r;s);tr;(s;t)\ =\ (r;s);t

The meaning stays the same, no matter how you place the brackets. So Ampersand lets you omit brackets entirely. You may write r;s;tr;s;t instead of r;(s;t)r;(s;t) or (r;s);t(r;s);t.

Composition has a left and a right identity. Let r[A×B]r_{[A\times B]} be a relation, then

IA;r = r   and   r;IB = rI_A;r\ =\ r\ \ \ \text{and}\ \ \ r;I_B\ =\ r

How to type relational operators in your script

This page shows how you can write these things in your Ampersand script.

Other explanation

Would you like a different explanation of the semantics of the relational operators? Click here for an explanation in sets. This page explains them in natural language. This page explains the relational operators in logic.

Last updated