The number of arguments to a function.

“Arity” is the number of arguments to a function, as used in the realm of mathematics and software engineering. Arity is useful for determining the complexity of a function. A reduction in arity with minimal impact is the goal of Pareto Analysis.

Note Arity is not the same term as ”Cardinality”, although they are very similar. It seems that “arity” is a more specific term referring to the cardinality of inputs to a given function. That’s a common enough consideration that it grew an independent name that we call “arity”.

Examples

  • f(x,y,z) has an arity of “3”.
  • “Distance travelled” of a flying object is primarily a function of velocity, azimuth, and drag. This is also an arity of 3.

Source