Relation composition
Relation composition combines two relations on a set to form a new relation on that set that consists of pairs of elements in which both elements are related to some intermediate through the original relations.
If that sounded confusing, let me simplify: the new relation \(S \circ R\) is the set of all ordered pairs \((a, c)\) where a path exists from \(a\) to \(c\) via the intermediate \(b.\) This particular path connects \(a\) to \(b\) under relation \(R\), then \(b\) to \(c\) under relation \(S\), thereby linking \(a\) and \(c\) under a new composed relation.
For example, consider the two relations \(B\) "is a brother of" and \(P\) "is a parent of" on a set of people. Their composed relation \(P \circ B\) turns out to be the relation "is an uncle of." This is because an uncle is defined as the brother of a parent. Notice the order in which the relations are composed is important. An uncle is not defined as the parent of someone's brother... that's just a long-winded way of saying parent.