Two-variable functions play an essential role in multi-variable calculus. They are also essential in different branches of abstract algebra including linear algebra. In this post, first, we discuss two-variable functions from different points of view. Then, we proceed to introduce their role in abstract algebra.

A two-variable function is a function whose input is an ordered pair and the output is unique as all functions satisfy this property. Here is the set-theoretical definition of two-variable functions:

Let \(A\), \(B\), and \(C\) be sets. By definition, a function $$f: A \times B \rightarrow C$$ defined by $$(a,b) \mapsto f(a,b)$$ is a two-variable function from \(A \times B\) to \(C.\)

#### Examples of two-variable functions

In Euclidean geometry, we learn that we can compute the volume of a circular cone with radius \(r\) and height \(h\) by the following formula: $$V= \frac{1}{3} \pi r^2 h.$$ Note that one may consider this formula as an example of a two-variable function from \(\mathbb{R}^{\geq 0} \times \mathbb{R}^{\geq 0}\) to \(\mathbb{R}^{\geq 0}.\)

**Remark**. Let \(*:A \times B \rightarrow C\) be a function defined by $$(a,b) \mapsto *(a,b).$$ For \(a\in A\) and \(b\in B\), it is sometimes more convenient to denote \(*(a,b)\) by \(a*b\).

#### Scalar multiplications as examples of two-variable functions

Note that all scalar multiplications are, in fact, two-variable functions. We explain this by the following example:

Let \(C(\mathbb{R})\) be the set of all continuous real-valued functions on \(\mathbb{R}\). For \( r\in \mathbb{R}\) and \(f\in C(\mathbb R)\), define \(r \cdot f\) to be a function from \(\mathbb R\) to \(\mathbb R\) by $$(r \cdot f)(x) = r(f(x)).$$ From calculus, we know that \(r\cdot f\) is continuous, and so, \(r\cdot f \in C(\mathbb R).\) Thus one may consider “\(\cdot\)” a two-variable function from \(\mathbb R \times C(\mathbb R)\) to \(C(\mathbb R)\) defined by $$(r,f) \mapsto r\cdot f.$$

For other examples of scalar multiplications see the post on matrix operations.

#### Tensor products as examples of two-variable functions

Assume that $$u = (u_1, \dots, u_m) \in \mathbb R^m$$ and $$v = (v_1, \dots, v_n) \in \mathbb R^n$$ are two real vectors. In linear algebra, the tensor product $$u \otimes v$$ of the vectors \(u\) and \(v\) is, by definition, the following matrix: $$\begin{pmatrix}

u_1 v_1 & u_1 v_2 & \dots & u_1 v_n\\

u_2 v_1 & u_2 v_2 & \dots & u_2 v_n\\

\vdots & \vdots & \ddots & \vdots \\

u_m v_1 & u_m v_2 & \dots & u_m v_n

\end{pmatrix}.$$ It is clear that \(\otimes\) is a two-variable function from \(\mathbb R^m \times \mathbb R^n\) to the set of all \(m \times n\) real matrices \(M_{m \times n}(\mathbb R).\)

**Exercise**. Discuss that an inner product of vectors is an example of a two-variable function.

#### Binary operations

Finally, recall that the standard addition of real numbers is a function $$+: \mathbb R \times \mathbb R \rightarrow \mathbb R$$ defined by $$(a,b) \mapsto a+b.$$ This two-variable function is, in fact, an example of a binary operation.

By definition, a binary operation \(\star\) on a set \(S\) is a mapping that assigns to each ordered pair \((a,b)\) of elements in \(S\) an element \(a \star b\) in \(S.\) It is clear that binary operations are examples of two-variable functions. The concept of binary functions are essential in abstract algebra.

**Exercise**. Discuss that the cross product is an example of a binary operation on \(\mathbb{R}^3\).