Brahmagupta-Fibonacci Identity

Theorem
Let $$a, b, c, d$$ be numbers.

Then:

$$ $$

This is an example of a more general identity:

$$ $$

Corollary
Let $$a_1, a_2, \ldots, a_n, b_1, b_2, \ldots, b_n$$ be integers.

Then:
 * $$\prod_{j=1}^n \left({a_j^2 + b_j^2}\right) = c^2 + d^2$$

where $$c, d \in \Z$$.

What this says is that the product of any number of sums of two squares is also a sum of two squares.

More generally:
 * $$\prod_{j=1}^n \left({a_j^2 + n b_j^2}\right) = c^2 + n d^2$$

where $$c, d \in \Z$$.

That is, the set of all numbers of the form $$x^2 + n y^2$$ is closed under multiplication.

Proof
$$ $$ $$

Setting $$b = -b$$ in the above gives the identity:


 * $$\left({a^2 + n b^2}\right) \left({c^2 + n d^2}\right) = \left({a c - n b d}\right)^2 + n \left({a d + b c}\right)^2$$

The identities:

$$ $$

follow from the above by setting $$n = 1$$.

Proof of Corollary
Follows by induction from the main result.

Note
This identity is also known as Fibonacci's Identity, and is a special case for $$n = 2$$ of Lagrange's Identity.

Both of these described this identity in their writings:


 * 628: Brahmagupta: Brahmasphutasiddhanta (The Opening of the Universe)
 * 1225: Fibonacci: Liber quadratorum (The Book of Squares)