Two-Input Function

From GM-RKB
Jump to navigation Jump to search

A two-input function is a formal function with two function arguments.



References

2011

  • http://en.wikipedia.org/wiki/Binary_function
    • In mathematics, a binary function, or function of two variables, is a function which takes two inputs.

      Precisely stated, a function [math]\displaystyle{ f }[/math] is binary if there exists sets [math]\displaystyle{ X, Y, Z }[/math] such that [math]\displaystyle{ \,f \colon X \times Y \rightarrow Z }[/math] where [math]\displaystyle{ X \times Y }[/math] is the Cartesian product of [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y. }[/math]

      For example, if Z is the set of integers, N+ is the set of natural numbers (except for zero), and Q is the set of rational numbers, then division is a binary function from Z and N+ to Q.

      Set-theoretically, one may represent a binary function as a subset of the Cartesian product X × Y × Z, where (x,y,z) belongs to the subset if and only if f(x,y) = z.

      Conversely, a subset R defines a binary function if and only if, for any x in X and y in Y, there exists a unique z in Z such that (x,y,z) belongs to R. We then define f (x,y) to be this z.

      Alternatively, a binary function may be interpreted as simply a function from X × Y to Z.Even when thought of this way, however, one generally writes f (x,y) instead of f((x,y)).

(That is, the same pair of parentheses is used to indicate both function application and the formation of an ordered pair.)