# Brahmagupta-Fibonacci Identity

### Introduction

What is now known as the Brahmagupta-Fibonacci Identity has an engagingly simple form, curious history and unexpected applications.

\begin{align} (a^{2}+b^{2})(c^{2}+d^{2})&=(ac+bd)^{2}+(ad-bc)^{2}\\ &=(ac-bd)^{2}+(ad+bc)^{2} \end{align}

It is believed that the identity was first annunciated by Diophantus (the 3rd century BC) who wrote in his Arithmetica (Book III, Problem 19) [Stillwell, p. 174]:

65 is "naturally" divided into two squares in two ways ... due to the fact that 65 is the product of 13 and 5, each of which numbers is the sum of two squares.

John Stillwell mentions that in 950 AD, the Persian mathematician al-Khazin (900-971 AD) has interpreted that statement of Diophantus in more general terms that today would have appeared as the above formula. This same interpretation appeared in Fibonacci's Liber Quadratorum of 1225. The mathematical language was yet in its infancy so that it took Fibonacci five pages to prove the formula.

Diophantus' ideas have been generalized earlier by the Indian mathematician Brahmagupta (597-668 AD) who proved

$(a^{2}+Nb^{2})(c^{2}+Nd^{2})=(ac+Nbd)^{2}+N(ad-bc)^{2}$

which he used to solving the Pell equation $x^{2} - Ny^{2} = 1.$

The formula, as it's written, is a particular case (for $n=2)$ of the Lagrange identity

$\displaystyle\big(\sum_{i=1}^{n}{a_i}^{2}\big)\big(\sum_{i=1}^{n}{b_i}^{2}\big) = \big(\sum_{i=1}^{n}{a_{i}b_{i}}\big)^2 + \sum_{1\le k \lt j \le n}(a_{k}b_{j} - a_{j}b_{k})^{2}$

which holds for any $n\ge 2$ and, say, for $n=3$ in the following form

$(a^{2} + b^{2} + c^{2})(x^{2} + y^{2} + z^{2})\\ \space\space\space = (ax + by + cz)^{2} + (bz - cy)^{2} + (cx - az)^{2} + (ay - bx)^{2}.$

is used to establish properties of the Symmedian point.

However, the Brahmagupta-Fibonacci identity ($n=2$) admits verbalization that works for neither the general Lagrange identity, nor for its $n=3$ particular case. This is how Diophantus could have formulated a generalization of his Problem 19:

The product of two integers, each of which is the sum of two squares, is the sum of two squares.

Nothing like that could be said about three squares. But in 1748 Euler reported a four-square identity:

$(a_1^2+a_2^2+a_3^2+a_4^2)(b_1^2+b_2^2+b_3^2+b_4^2)\\ \space\space\space =(a_1 b_1 - a_2 b_2 - a_3 b_3 - a_4 b_4)^2\\ \space\space\space +(a_1 b_2 + a_2 b_1 + a_3 b_4 - a_4 b_3)^2\\ \space\space\space +(a_1 b_3 - a_2 b_4 + a_3 b_1 + a_4 b_2)^2\\ \space\space\space +(a_1 b_4 + a_2 b_3 - a_3 b_2 + a_4 b_1)^2.$

The $n=2$ case underlies the theory of complex numbers where it may be expressed as "the norm (modulus, absolute value) of the product of two complex numbers is the product of their norms (moduli, absolute values)." A similar role is played by the four-square identity in the theory of quoternions, and by Degen's eight-square identity (1818) in the theory of octonions [Conway and Smith].

References

1. A. Shenitzer, J. Stillwell, Mathematical Evolutions, MAA, 2002
2. J. H. Conway, D. A. Smith, On Quoternions and Octonions, A K Peters, 2003

### Proof

Nowadays the Brahmagupta-Fibonacci identity can be proved in a few lines - a credit to modern mathematical notations. Indeed, by direct inspection,

$(a^{2}+b^{2})(c^{2}+d^{2})=(ac)^{2}+(bc)^{2}+(ad)^{2}+(bd)^{2}.$

On the other hand,

$(ac+bd)^{2}+(ad-bc)^{2}\\ \space\space\space=[(ac)^{2}+2abcd+(bd)^{2}]+[(ad)^{2}-2abcd+(bc)^{2}]\\ \space\space\space=(ac)^{2}+(bd)^{2}+(ad)^{2}+(bc)^{2}.$

### Application 1

Let $m$ and $n$ be distinct positive integers. Represent $m^{6}+n^{6}$ as the sum of two squares different from $m^6$ and $n^6.$

Solution

\begin{align} m^{6}+n^{6} &= (m^{2})^{3}+(n^{2})^{3}\\ &= (m^{2}+n^{2})(m^{4}-m^{2}n^{2}+n^{4}\\ &= (m^{2}+n^{2})[(m^{2}-n^{2})^{2}+(an)^{2}]. \end{align}

Apply now the Brahmagupta-Fibonacci identity with $a=m,$ $b=n,$ $c=m^{2}-n^{2},$ and $d=an$ to obtain

$m^{6}+n^{6} = (m^{3}-an^{2}+an^{2})^{2}+(m^{2}n-m^{2}n+n^{3})^{2}.$

Which is not very good for our purposes. However, not everything is lost due to an observation that the Brahmagupta-Fibonacci identity admits a slightly different form if $d$ is replaced with $-d:$

$(a^{2}+b^{2})(c^{2}+d^{2})=(ac-bd)^{2}+(ad+bc)^{2}.$

We then can write

\begin{align} m^{6}+n^{6} &= (m^{3}-an^{2}-an^{2})^{2}+(-m^{2}n-m^{2}n+n^{3})^{2}\\ &= (m^{3}-2mn^{2})^{2}+(n^{3}-2m^{2}n)^{2}. \end{align}

You may note that the requirement that $m$ and $n$ be positive integers is a misnomer: the identity just obtained is algebraic - it holds for variable (or indeterminate) $m$ and $n.$

References

1. S. Savchev, T. Andreescu, Mathematical Miniatures, MAA, 2003, p. 6

### Application 2

Let $P(x)$ be a polynomial with real coefficients so that $P(x)\ge 0$ for all real $x.$ Prove that there are polynomials and $Q_{2}(x)$ with real coefficients, such that

$P(x)=Q_{1}(x)^{2}+Q_{2}(x)^{2},$ for all $x.$

Solution

Since $P(x)$ is never negative it either has no real roots, or each of his real roots is double, implying that

$\displaystyle P(x)=c\prod_{k=1}^{n}(x^{2}+p_{k}x+q_{k}),$

$c$ and $p_{4},q_{k},\space k=1,\ldots,n,$ are real numbers, with $c\ge 0$ and $p_{k}^2-4q_{k}\le 0,$ for all $k=1,\ldots,n.$ But then for each $k,$ the method of completing the square shows that

$\displaystyle x^{2}+p_{k}x+q_{k} = (x+\frac{p_{k}}{2})^{2}+\bigg(\frac{\sqrt{4q_{k}-p_{k}^{2}}}{2}\bigg)^{2}$

such that

$\displaystyle P(x)=\prod_{k=1}^{n}(U_{k}^{2}(x)+V_{k}^{2}(x)).$

Now, we may apply the Brahmagupta-Fibonacci identity repeatedly to reduce the number of factors $n$ to one.

References

1. S. Savchev, T. Andreescu, Mathematical Miniatures, MAA, 2003, p. 6-7