In logic, mathematics, an computer science, the arity (synonyms include type, adicity, and rank) of a function or operation is the number of arguments or operands that the function takes. The arity of a relation is the number of domains in the corresponding Cartesian product. The term springs from such words as unary, binary, ternary, etc.