Unlike ordinary composition of relations, demonic composition is not associative.
Definition
Suppose is a binary relation between and and is a relation between and Their right demonic composition is a relation between and Its graph is defined as
Conversely, their left demonic composition is defined by