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.

For relations \(R\) and \(S\) on a set \(A\), their composed relation \(S \circ R\), in which \(R\) is applied first, then \(S\), is defined as: $$S \circ R = \set{(a, c) : (\exists b \in A)(aRb \land bSc)}$$

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.

Logic & Proofs
IntegerRational numberInequalityReal numberTheoremProofStatementProof by exhaustionUniversal generalizationCounterexampleExistence proofExistential instantiationAxiomLogicTruthPropositionCompound propositionLogical operationLogical equivalenceTautologyContradictionLogic lawPredicateDomainQuantifierArgumentRule of inferenceLogical proofDirect proofProof by contrapositiveIrrational numberProof by contradictionProof by casesSummationDisjunctive normal form
Set Theory
SetElementEmpty setUniversal setSubsetPower setCartesian productStringBinary stringEmpty stringSet operationSet identitySet proof
Functions
FunctionFloor functionCeiling functionInverse function
Algorithms
AlgorithmPseudocodeCommandAsymptotic notationTime complexityAtomic operationBrute-force algorithm
Relations
RelationReflexive relationSymmetric relationTransitive relationRelation compositionEquivalence relationEquivalence class
Number Theory
Integer divisionLinear combinationDivision algorithmModular arithmeticPrime factorizationGreatest common divisorLeast common multiplePrimality testFactoring algorithmEuclid's theoremPrime number theoremEuclidean algorithm
Induction
Proof by inductionFibonacci sequenceProof by strong inductionWell-ordering principleSequenceFactorialRecursive definition
Combinatorics
Rule of productRule of sumBijection rulePermutationCombinationComplement ruleExperimentOutcomeSample spaceEventProbabilityProbability distributionUniform distributionMultisetSixfold wayInclusion-exclusion principlePigeonhole principle
Graph Theory
GraphWalkSubgraphRegular graphComplete graphEmpty graphCycle graphHypercube graphBipartite graphComponentEulerian circuitEulerian trailHamiltonian cycleHamiltonian pathTreeHuffman treeSubstringForestPath graphStarSpanning treeWeighted graphMinimum spanning treeGreedy algorithmPrim's algorithm
Recursion
RecursionRecursive algorithmCorrectness proofDivide-and-conquer algorithmSorting algorithmMerge sort