CompositionofrelationsWikipedia,thefreeencyclopedia
Inmathematics,thecompositionofbinaryrelationsisaconceptofforminganewrelationSRfromtwogiven
relationsRandS,havingasitsbestknownspecialcasethecompositionoffunctions.
Definition[edit]
If
and
aretwobinaryrelations,thentheircomposition
istherelation
Inotherwords,
isdefinedbytherulethatsays
ifandonlyifthereisanelement
suchthat
(i.e.
and
).
Inparticularfields,authorsmightdenotebyRSwhatisdefinedheretobeSR.Theconventionchosenhere
issuchthatfunctioncomposition(withtheusualnotation)isobtainedasaspecialcase,whenRandSare
https://en.wikipedia.org/wiki/Composition_of_relations 1/3
13/09/2016 CompositionofrelationsWikipedia,thefreeencyclopedia
functionalrelations.Someauthors[1]prefertowrite
and
explicitlywhennecessary,dependingwhethertheleftortherightrelationisthefirstoneapplied.
AfurthervariationencounteredincomputerscienceistheZnotation:
isusedtodenotethetraditional(right)composition,but(afatopensemicolonwithUnicodecodepoint
U+2A3E)denotesleftcomposition.[2][3]Thisuseofsemicoloncoincideswiththenotationforfunction
compositionused(mostlybycomputerscientists)inCategorytheory,[4]aswellasthenotationfordynamic
conjunctionwithinlinguisticdynamicsemantics.[5]Thesemicolonnotation(withthissemantic)wasintroduced
byErnstSchrderin1895.[6]
Thebinaryrelations
aresometimesregardedasthemorphisms
inacategoryRelwhichhasthesetsasobjects.InRel,compositionofmorphismsisexactlycompositionof
relationsasdefinedabove.ThecategorySetofsetsisasubcategoryofRelthathasthesameobjectsbut
fewermorphisms.Ageneralizationofthisisfoundinthetheoryofallegories.
Properties[edit]
Compositionofrelationsisassociative.
TheinverserelationofSRis(SR)1=R1S1.Thispropertymakesthesetofallbinaryrelationsonaset
asemigroupwithinvolution.
Thecompositionof(partial)functions(i.e.functionalrelations)isagaina(partial)function.
IfRandSareinjective,thenSRisinjective,whichconverselyimpliesonlytheinjectivityofR.
IfRandSaresurjective,thenSRissurjective,whichconverselyimpliesonlythesurjectivityofS.
ThesetofbinaryrelationsonasetX(i.e.relationsfromXtoX)togetherwith(leftorright)relationcomposition
formsamonoidwithzero,wheretheidentitymaponXistheneutralelement,andtheemptysetisthezero
element.
Otherformsofcompositionofrelations,whichapplytogeneralnplacerelationsinsteadofbinaryrelations,are
foundinthejoinoperationofrelationalalgebra.Theusualcompositionoftwobinaryrelationsasdefinedhere
https://en.wikipedia.org/wiki/Composition_of_relations 2/3
13/09/2016 CompositionofrelationsWikipedia,thefreeencyclopedia
canbeobtainedbytakingtheirjoin,leadingtoaternaryrelation,followedbyaprojectionthatremovesthe
middlecomponent.
Compositionintermsofmatrices[edit]
If
isarelationbetweentwofinitesetsthenoneobtainsanassociatedadjacencymatrix
(seehere).Thenif
and
aretworelationswhichcanbecomposed,thematrix
isexactlythematrixproduct
,whereitisunderstoodthat
.(Notealsothereversaloforderof
and
.)
https://en.wikipedia.org/wiki/Composition_of_relations 3/3