Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binary function
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Function that takes two inputs}} {{distinguish|Boolean function|Indicator function}} In [[mathematics]], a '''binary function''' (also called '''bivariate function''', or '''function of two variables''') is a [[function (mathematics)|function]] that takes two inputs. Precisely stated, a function <math>f</math> is binary if there exists [[Set (mathematics)|set]]s <math>X, Y, Z</math> such that :<math>\,f \colon X \times Y \rightarrow Z</math> where <math>X \times Y</math> is the [[Cartesian product]] of <math>X</math> and <math>Y.</math> ==Alternative definitions== [[Naive set theory|Set-theoretically]], a binary function can be represented as a [[subset]] of the [[Cartesian product]] <math>X \times Y \times Z</math>, where <math>(x,y,z)</math> belongs to the subset [[if and only if]] <math>f(x,y) = z</math>. Conversely, a subset <math>R</math> defines a binary function if and only if [[universal quantification|for any]] <math>x \in X</math> and <math>y \in Y</math>, [[existential quantification|there exists]] a [[uniqueness quantification|unique]] <math>z \in Z</math> such that <math>(x,y,z)</math> belongs to <math>R</math>. <math>f(x,y)</math> is then defined to be this <math>z</math>. Alternatively, a binary function may be interpreted as simply a [[function (mathematics)|function]] from <math>X \times Y</math> to <math>Z</math>. Even when thought of this way, however, one generally writes <math>f(x,y)</math> instead of <math>f((x,y))</math>. (That is, the same pair of parentheses is used to indicate both [[function application]] and the formation of an [[ordered pair]].) ==Examples== Division of [[Integer|whole numbers]] can be thought of as a function. If <math>\Z</math> is the set of [[integer]]s, <math>\N^+</math> is the set of [[natural number]]s (except for zero), and <math>\Q</math> is the set of [[rational number]]s, then [[division (mathematics)|division]] is a binary function <math>f:\Z \times \N^+ \to \Q</math>. In a vector space ''V'' over a field ''F'', [[scalar multiplication]] is a binary function. A scalar ''a'' β ''F'' is combined with a vector ''v'' β ''V'' to produce a new vector ''av'' β ''V''. Another example is that of inner products, or more generally functions of the form <math>(x,y)\mapsto x^\mathrm{T}My</math>, where {{mvar|x}}, {{mvar|y}} are real-valued vectors of appropriate size and {{mvar|M}} is a matrix. If {{mvar|M}} is a [[positive definite matrix]], this yields an [[inner product]].<ref>{{cite book|last1=Clarke|first1=Bertrand|last2=Fokoue|first2=Ernest|last3=Zhang|first3=Hao Helen|title=Principles and Theory for Data Mining and Machine Learning|url=https://books.google.com/books?id=RQHB4_p3bJoC&q=inner+product+bivariate+function&pg=PA285|page=285|accessdate=16 August 2016|isbn=9780387981352|date=2009-07-21}}</ref> ==Functions of two real variables== Functions whose domain is a subset of <math>\mathbb{R}^2</math> are often also called functions of two variables even if their domain does not form a rectangle and thus the cartesian product of two sets.<ref>{{cite book|last1=Stewart|first1=James|title=Essentials of Multivariate Calculus|date=2011|publisher=Nelson Education|location=Toronto|page=591}}</ref> ==Restrictions to ordinary functions== In turn, one can also derive ordinary functions of one variable from a binary function. Given any element <math>x \in X</math>, there is a function <math>f^x</math>, or <math>f(x,\cdot)</math>, from <math>Y</math> to <math>Z</math>, given by <math>f^x(y) = f(x,y)</math>. Similarly, given any element <math>y \in Y</math>, there is a function <math>f_y</math>, or <math>f(\cdot,y)</math>, from <math>X</math> to <math>Z</math>, given by <math>f_y(x) = f(x,y)</math>. In computer science, this identification between a function from <math>X \times Y</math> to <math>Z</math> and a function from <math>X</math> to <math>Z^Y</math>, where <math>Z^Y</math> is the set of all functions from <math>Y</math> to <math>Z</math>, is called ''[[currying]]''. ==Generalisations== The various concepts relating to functions can also be generalised to binary functions. For example, the division example above is ''[[surjective function|surjective]]'' (or ''onto'') because every rational number may be expressed as a quotient of an integer and a natural number. This example is ''[[injective function|injective]]'' in each input separately, because the functions ''f'' <sup>''x''</sup> and ''f'' <sub>''y''</sub> are always injective. However, it's not injective in both variables simultaneously, because (for example) ''f'' (2,4) = ''f'' (1,2). One can also consider ''partial'' binary functions, which may be defined only for certain values of the inputs. For example, the division example above may also be interpreted as a partial binary function from '''Z''' and '''N''' to '''Q''', where '''N''' is the set of all natural numbers, including zero. But this function is undefined when the second input is zero. A [[binary operation]] is a binary function where the sets ''X'', ''Y'', and ''Z'' are all equal; binary operations are often used to define [[algebraic structure]]s. In [[linear algebra]], a [[bilinear operator|bilinear transformation]] is a binary function where the sets ''X'', ''Y'', and ''Z'' are all [[vector space]]s and the derived functions ''f'' <sup>''x''</sup> and ''f''<sub>''y''</sub> are all [[linear transformation]]s. A bilinear transformation, like any binary function, can be interpreted as a function from ''X'' Γ ''Y'' to ''Z'', but this function in general won't be linear. However, the bilinear transformation can also be interpreted as a single linear transformation from the [[tensor product]] <math>X \otimes Y</math> to ''Z''. ==Generalisations to ternary and other functions== {{see also|Multivariate function}} The concept of binary function generalises to ''ternary'' (or ''3-ary'') ''function'', ''quaternary'' (or ''4-ary'') ''function'', or more generally to ''n-ary function'' for any [[natural number]] ''n''. A ''0-ary function'' to ''Z'' is simply given by an element of ''Z''. One can also define an ''A-ary function'' where ''A'' is any [[Set (mathematics)|set]]; there is one input for each element of ''A''. ==Category theory== In [[category theory]], ''n''-ary functions generalise to ''n''-ary morphisms in a [[multicategory]]. The interpretation of an ''n''-ary morphism as an ordinary morphisms whose domain is some sort of product of the domains of the original ''n''-ary morphism will work in a [[monoidal category]]. The construction of the derived morphisms of one variable will work in a [[closed monoidal category]]. The category of sets is closed monoidal, but so is the category of vector spaces, giving the notion of bilinear transformation above. == See also == * [[Arity]] * [[Unary operation]] * [[Unary function]] * [[Binary operation]] * [[Iterated binary operation]] * [[Ternary operation]] ==References== {{Reflist}} {{Authority control}} {{DEFAULTSORT:Binary Function}} [[Category:Types of functions]] [[Category:2 (number)]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Authority control
(
edit
)
Template:Cite book
(
edit
)
Template:Distinguish
(
edit
)
Template:Mvar
(
edit
)
Template:Reflist
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)