<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tachyony.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Binary_function</id>
	<title>Binary function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tachyony.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Binary_function"/>
	<link rel="alternate" type="text/html" href="https://wiki.tachyony.co.uk/w/index.php?title=Binary_function&amp;action=history"/>
	<updated>2026-06-27T12:04:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.tachyony.co.uk/w/index.php?title=Binary_function&amp;diff=14516&amp;oldid=prev</id>
		<title>imported&gt;Divinations: Reverted edits by Porco valente (talk) to last version by 78.190.160.189: nonconstructive edits</title>
		<link rel="alternate" type="text/html" href="https://wiki.tachyony.co.uk/w/index.php?title=Binary_function&amp;diff=14516&amp;oldid=prev"/>
		<updated>2025-01-26T00:00:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=WP:ROLLBACK&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:ROLLBACK (page does not exist)&quot;&gt;Reverted&lt;/a&gt; edits by &lt;a href=&quot;/wiki/Special:Contributions/Porco_valente&quot; title=&quot;Special:Contributions/Porco valente&quot;&gt;Porco valente&lt;/a&gt; (&lt;a href=&quot;/w/index.php?title=User_talk:Porco_valente&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Porco valente (page does not exist)&quot;&gt;talk&lt;/a&gt;) to last version by 78.190.160.189: nonconstructive edits&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Function that takes two inputs}}&lt;br /&gt;
{{distinguish|Boolean function|Indicator function}}&lt;br /&gt;
&lt;br /&gt;
In [[mathematics]], a &amp;#039;&amp;#039;&amp;#039;binary function&amp;#039;&amp;#039;&amp;#039; (also called &amp;#039;&amp;#039;&amp;#039;bivariate function&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;function of two variables&amp;#039;&amp;#039;&amp;#039;) is a [[function (mathematics)|function]] that takes two inputs.&lt;br /&gt;
&lt;br /&gt;
Precisely stated, a function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is binary if there exists [[Set (mathematics)|set]]s &amp;lt;math&amp;gt;X, Y, Z&amp;lt;/math&amp;gt; such that&lt;br /&gt;
:&amp;lt;math&amp;gt;\,f \colon X \times Y \rightarrow Z&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;X \times Y&amp;lt;/math&amp;gt; is the [[Cartesian product]] of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Y.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alternative definitions==&lt;br /&gt;
[[Naive set theory|Set-theoretically]], a binary function can be represented as a [[subset]] of the [[Cartesian product]] &amp;lt;math&amp;gt;X \times Y \times Z&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;(x,y,z)&amp;lt;/math&amp;gt; belongs to the subset [[if and only if]] &amp;lt;math&amp;gt;f(x,y) = z&amp;lt;/math&amp;gt;.&lt;br /&gt;
Conversely, a subset &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; defines a binary function if and only if [[universal quantification|for any]] &amp;lt;math&amp;gt;x \in X&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y \in Y&amp;lt;/math&amp;gt;, [[existential quantification|there exists]] a [[uniqueness quantification|unique]]  &amp;lt;math&amp;gt;z \in Z&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;(x,y,z)&amp;lt;/math&amp;gt; belongs to &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; is then defined to be this &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Alternatively, a binary function may be interpreted as simply a [[function (mathematics)|function]] from &amp;lt;math&amp;gt;X \times Y&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.&lt;br /&gt;
Even when thought of this way, however, one generally writes &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;f((x,y))&amp;lt;/math&amp;gt;.&lt;br /&gt;
(That is, the same pair of parentheses is used to indicate both [[function application]] and the formation of an [[ordered pair]].)&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Division of [[Integer|whole numbers]] can be thought of as a function. If &amp;lt;math&amp;gt;\Z&amp;lt;/math&amp;gt; is the set of [[integer]]s, &amp;lt;math&amp;gt;\N^+&amp;lt;/math&amp;gt; is the set of [[natural number]]s (except for zero), and &amp;lt;math&amp;gt;\Q&amp;lt;/math&amp;gt; is the set of [[rational number]]s, then [[division (mathematics)|division]] is a binary function &amp;lt;math&amp;gt;f:\Z \times \N^+ \to \Q&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In a vector space &amp;#039;&amp;#039;V&amp;#039;&amp;#039; over a field &amp;#039;&amp;#039;F&amp;#039;&amp;#039;, [[scalar multiplication]] is a binary function. A scalar &amp;#039;&amp;#039;a&amp;#039;&amp;#039; ∈ &amp;#039;&amp;#039;F&amp;#039;&amp;#039; is combined with a vector &amp;#039;&amp;#039;v&amp;#039;&amp;#039; ∈ &amp;#039;&amp;#039;V&amp;#039;&amp;#039; to produce a new vector &amp;#039;&amp;#039;av&amp;#039;&amp;#039; ∈ &amp;#039;&amp;#039;V&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Another example is that of inner products, or more generally functions of the form &amp;lt;math&amp;gt;(x,y)\mapsto x^\mathrm{T}My&amp;lt;/math&amp;gt;, 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]].&amp;lt;ref&amp;gt;{{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&amp;amp;q=inner+product+bivariate+function&amp;amp;pg=PA285|page=285|accessdate=16 August 2016|isbn=9780387981352|date=2009-07-21}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Functions of two real variables==&lt;br /&gt;
Functions whose domain is a subset of &amp;lt;math&amp;gt;\mathbb{R}^2&amp;lt;/math&amp;gt; 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.&amp;lt;ref&amp;gt;{{cite book|last1=Stewart|first1=James|title=Essentials of Multivariate Calculus|date=2011|publisher=Nelson Education|location=Toronto|page=591}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restrictions to ordinary functions==&lt;br /&gt;
In turn, one can also derive ordinary functions of one variable from a binary function.&lt;br /&gt;
Given any element &amp;lt;math&amp;gt;x \in X&amp;lt;/math&amp;gt;, there is a function &amp;lt;math&amp;gt;f^x&amp;lt;/math&amp;gt;, or &amp;lt;math&amp;gt;f(x,\cdot)&amp;lt;/math&amp;gt;, from &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;, given by &amp;lt;math&amp;gt;f^x(y) = f(x,y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Similarly, given any element &amp;lt;math&amp;gt;y \in Y&amp;lt;/math&amp;gt;, there is a function &amp;lt;math&amp;gt;f_y&amp;lt;/math&amp;gt;, or &amp;lt;math&amp;gt;f(\cdot,y)&amp;lt;/math&amp;gt;, from &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;, given by &amp;lt;math&amp;gt;f_y(x) = f(x,y)&amp;lt;/math&amp;gt;. In computer science, this identification between a function from &amp;lt;math&amp;gt;X \times Y&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; and a function from &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z^Y&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;Z^Y&amp;lt;/math&amp;gt; is the set of all functions from &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;, is called &amp;#039;&amp;#039;[[currying]]&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Generalisations==&lt;br /&gt;
The various concepts relating to functions can also be generalised to binary functions.&lt;br /&gt;
For example, the division example above is &amp;#039;&amp;#039;[[surjective function|surjective]]&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;onto&amp;#039;&amp;#039;) because every rational number may be expressed as a quotient of an integer and a natural number.&lt;br /&gt;
This example is &amp;#039;&amp;#039;[[injective function|injective]]&amp;#039;&amp;#039; in each input separately, because the functions &amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;sup&amp;gt;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt; and &amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;sub&amp;gt;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; are always injective.&lt;br /&gt;
However, it&amp;#039;s not injective in both variables simultaneously, because (for example) &amp;#039;&amp;#039;f&amp;#039;&amp;#039; (2,4) = &amp;#039;&amp;#039;f&amp;#039;&amp;#039; (1,2).&lt;br /&gt;
&lt;br /&gt;
One can also consider &amp;#039;&amp;#039;partial&amp;#039;&amp;#039; binary functions, which may be defined only for certain values of the inputs.&lt;br /&gt;
For example, the division example above may also be interpreted as a partial binary function from &amp;#039;&amp;#039;&amp;#039;Z&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; to &amp;#039;&amp;#039;&amp;#039;Q&amp;#039;&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; is the set of all natural numbers, including zero.&lt;br /&gt;
But this function is undefined when the second input is zero.&lt;br /&gt;
&lt;br /&gt;
A [[binary operation]] is a binary function where the sets &amp;#039;&amp;#039;X&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;Z&amp;#039;&amp;#039; are all equal; binary operations are often used to define [[algebraic structure]]s.&lt;br /&gt;
&lt;br /&gt;
In [[linear algebra]], a [[bilinear operator|bilinear transformation]] is a binary function where the sets &amp;#039;&amp;#039;X&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;Z&amp;#039;&amp;#039; are all [[vector space]]s and the derived functions &amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;sup&amp;gt;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt; and &amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; are all [[linear transformation]]s.&lt;br /&gt;
A bilinear transformation, like any binary function, can be interpreted as a function from &amp;#039;&amp;#039;X&amp;#039;&amp;#039; × &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; to &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;, but this function in general won&amp;#039;t be linear.&lt;br /&gt;
However, the bilinear transformation can also be interpreted as a single linear transformation from the [[tensor product]] &amp;lt;math&amp;gt;X \otimes Y&amp;lt;/math&amp;gt; to &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Generalisations to ternary and other functions==&lt;br /&gt;
{{see also|Multivariate function}}&lt;br /&gt;
The concept of binary function generalises to &amp;#039;&amp;#039;ternary&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;3-ary&amp;#039;&amp;#039;) &amp;#039;&amp;#039;function&amp;#039;&amp;#039;, &amp;#039;&amp;#039;quaternary&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;4-ary&amp;#039;&amp;#039;) &amp;#039;&amp;#039;function&amp;#039;&amp;#039;, or more generally to &amp;#039;&amp;#039;n-ary function&amp;#039;&amp;#039; for any [[natural number]] &amp;#039;&amp;#039;n&amp;#039;&amp;#039;.&lt;br /&gt;
A &amp;#039;&amp;#039;0-ary function&amp;#039;&amp;#039; to &amp;#039;&amp;#039;Z&amp;#039;&amp;#039; is simply given by an element of &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;.&lt;br /&gt;
One can also define an &amp;#039;&amp;#039;A-ary function&amp;#039;&amp;#039; where &amp;#039;&amp;#039;A&amp;#039;&amp;#039; is any [[Set (mathematics)|set]]; there is one input for each element of &amp;#039;&amp;#039;A&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Category theory==&lt;br /&gt;
In [[category theory]], &amp;#039;&amp;#039;n&amp;#039;&amp;#039;-ary functions generalise to &amp;#039;&amp;#039;n&amp;#039;&amp;#039;-ary morphisms in a [[multicategory]].&lt;br /&gt;
The interpretation of an &amp;#039;&amp;#039;n&amp;#039;&amp;#039;-ary morphism as an ordinary morphisms whose domain is some sort of product of the domains of the original &amp;#039;&amp;#039;n&amp;#039;&amp;#039;-ary morphism will work in a [[monoidal category]].&lt;br /&gt;
The construction of the derived morphisms of one variable will work in a [[closed monoidal category]].&lt;br /&gt;
The category of sets is closed monoidal, but so is the category of vector spaces, giving the notion of bilinear transformation above.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Arity]]&lt;br /&gt;
* [[Unary operation]]&lt;br /&gt;
* [[Unary function]]&lt;br /&gt;
* [[Binary operation]]&lt;br /&gt;
* [[Iterated binary operation]]&lt;br /&gt;
* [[Ternary operation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
{{Authority control}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Binary Function}}&lt;br /&gt;
[[Category:Types of functions]]&lt;br /&gt;
[[Category:2 (number)]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Divinations</name></author>
	</entry>
</feed>