Expression for bilinear function

Theorem
Let $f$ be a real function of two independent variables, $f \in \R \times \R \to \R$.

Then:
 * $\map f {x, y}$ is a linear function of $x$ when $y$ is equal to a real constant


 * $\map f {x, y}$ is a linear function of $y$ when $x$ is equal to a real constant

$f$ has the form:
 * $\exists {a, b, c, d} \in \R: \forall {x, y} \in \R: \map f {x, y} = axy + bx + cy + d$

Sufficient Condition
Let:
 * $\map f {x, y}$ be a linear function of $x$ when $y$ is equal to a real constant


 * $\map f {x, y}$ be a linear function of $y$ when $x$ is equal to a real constant

We need to show that:
 * $\exists {a, b, c, d} \in \R: \forall {x, y} \in \R: \map f {x, y} = axy + bx + cy + d$

Expressions for $\map f {x, y}$ when either $x$ or $y$ is constant
We have:
 * $\map f {x, y}$ is a linear function of $x$ when $y$ is equal to a real constant.

This means that:
 * $\exists y \in \R: \forall x \in \R: \map f {x, y} = \alpha x + \beta$

where $\alpha$ and $\beta$ are real numbers.

The real constants $\alpha$ and $\beta$ may depend on $y$ as $y$ is constant.

In other words:
 * $\forall {x, y} \in \R: \map f {x, y} = \map {a_1} y x + \map {a_2} y$

where $a_1$ and $a_2$ are real functions, $a_1, a_2 \in \R \to \R$.

By symmetry, we find from:
 * $\map f {x, y}$ is a linear function of $y$ when $x$ is equal to a real constant

that:
 * $\forall {x, y} \in \R: \map f {x, y} = \map {b_1} x y + \map {b_2} x$

where $b_1$ and $b_2$ are real functions, $b_1, b2 \in \R \to \R$.

Expression for $\map f {x, y}$ for every value of $x$ and $y$
We have:

In other words, $b_2$ is a linear function of $x$.

We have:

In other words, $b_1$ is a linear function of $x$.

In conclusion, we have:

This expression for $\map f {x, y}$ is of the sought for form:
 * $\exists {a, b, c, d} \in \R: \forall {x, y} \in \R: \map f {x, y} = axy + bx + cy + d$

Necessary Condition
Let:
 * $\exists {a, b, c, d} \in \R: \forall {x, y} \in \R: \map f {x, y} = axy + bx + cy + d$

We need to show that:
 * $\map f {x, y}$ is a linear function of $x$ when $y$ is equal to a real constant


 * $\map f {x, y}$ is a linear function of $y$ when $x$ is equal to a real constant

Let:
 * $y$ be equal to a real constant.

We have:

So, $\map f {x, y}$ is a linear function of $x$ as $ay + b$ and $cy + d$ are constant.

Now, let:
 * $x$ be equal to a real constant.

We have:

So, $\map f {x, y}$ is a linear function of $y$ as $ax + c$ and $bx + d$ are constant.

Hence the result.