# Law of composition

I understood up to now that the term 'law of composition' was an older alternative to 'binary operation'. But according to this Wikipedia disambiguation page it is an alternative to 'binary function'. Which is correct? Also, which term is preferred, out of 'law of composition' and 'binary operation', if any?

-
Both functions and relations can be composed (see en.wikipedia.org/wiki/Function_composition - there's a paragraph about relations), as long domains and codomains match: if $f: X \to Y$ and $g: Y \to Z$, then $g \circ f: X \to Z$. $f, g$ can be interpreted as either functions in $\bf Set$ or relations in $\bf Rel$ – alancalvitti Jan 25 at 13:12

## 1 Answer

A binary function is a function that takes two inputs and produces an output; a binary operation is the same except that the inputs and output are all supposed to come from the same set. "Law of composition" is indeed an older term, and I don't recall having seen it used for anything more general than binary operations. Nevertheless, if someone were to use "law of composition" to refer to a binary function whose inputs and outputs come from different sets, I would not be shocked and would not object; the same applies if someone were to use "law of composition" to refer to a function with more than two arguments.

-
 Would you then say that "law of composition" is probably too general a term, so in effect it means just the same as function really? – user50229 Jan 25 at 18:16