# What's the term for the number of outputs a function has?

That is, if a function's arity is the number of inputs it has, its __ is the number of outputs it has. (Fill in the blank.)

-
One. That is what you call the number of outputs a function has. It is sometimes written in symbols as 1. :) –  Omar Antolín-Camarena Aug 2 '12 at 17:03
In the usual definition, of course, functions have a single input and a single output, but if all elements of the domain are $k$-tuples for the same value of $k$, you might say you have a "function of $k$ variables" or a "$k$-ary operation" (though I don't think people usually use the words "arity" and "function" together, prefering to call functions "operations" when talking about arities), and you might want a term for the dual case, but I haven't heard any such name (if I had to make one up I'd say co-arity). It's not as popular an idea somehow, e.g., people prefer operads to PROPs. –  Omar Antolín-Camarena Aug 2 '12 at 17:09

A function is a mapping from elements in one set to another set. The "from" set is called the domain, and the "to" set is called the range.

f: Z -> Z (f maps integers to integers)
f: R -> C (f maps reals to complex numbers)
f: R -> {0,1} (f maps real numbers to either 0 or 1)
f: R -> {red, green, blue} (f maps real numbers to either red, green or blue)


We can also combine sets to create multi-dimensional sets

Z x Z := two tuple of integers (1,1) ; ( 2,2) , (1,3)
R x R x R := three tuple of real numbers (1.2, 1.5, 3.14159...) ; etc....


It also makes sense to talk about functions mapping from a set of tuples to a set of tuples.

f: Z x Z -> Z (mapping two tuples of integers to integer)
f: Z -> Z x Z ( mapping integers to two tuples)


tl;dr When you talk about functions which outputs mulitple arguments, you're really talking about functions which outputs a single element which is an n-tuple.

-

I am pretty sure, based on a Google search, that at least some people call this notion "coarity" (or "co-arity" if you want the pronunciation to be clearer).

-
Aha! That makes sense –  rossmeissl Jul 28 '11 at 19:13
@ross: I don't believe there's a term for that. I'd just say function so-and-so returns an $n$-vector or an $n$-dimensional array or whatever... –  Ｊ. Ｍ. Jul 28 '11 at 19:00