# Brahmagupta-Fibonacci Identity

## Theorem

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

Then:

$\paren {a^2 + b^2} \paren {c^2 + d^2} = \paren {a c + b d}^2 + \paren {a d - b c}^2$

### Corollary

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

### General result

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

$\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$

### Extension

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

Then:

$\displaystyle \prod_{j \mathop = 1}^n \paren { {a_j}^2 + {b_j}^2} = c^2 + d^2$

where $c, d \in \Z$.

That is: the product of any number of sums of two squares is also a sum of two squares.

## Proof 1

 $\displaystyle$  $\displaystyle \left({a c + b d}\right)^2 + \left({a d - b c}\right)^2$ $\displaystyle$ $=$ $\displaystyle \left({\left({a c}\right)^2 + 2 \left({a c}\right) \left({b d}\right) + \left({b d}\right)^2}\right) + \left({\left({a d}\right)^2 - 2 \left({a b}\right) \left({c d}\right) + \left({b c}\right)^2}\right)$ Square of Sum, Square of Difference $\displaystyle$ $=$ $\displaystyle a^2 c^2 + 2 a b c d + b^2 d^2 + a^2 d^2 - 2 a b c d + b^2 c^2$ multiplying out $\displaystyle$ $=$ $\displaystyle a^2 c^2 + a^2 d^2 + b^2 c^2 + b^2 d^2$ simplifying $\displaystyle$ $=$ $\displaystyle \left({a^2 + b^2}\right) \left({c^2 + d^2}\right)$

$\blacksquare$

## Proof 2

$\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 result follows by setting $n = 1$.

$\blacksquare$

## Proof 3

Lagrange's Identity gives:

$\displaystyle \left({\sum_{k \mathop = 1}^n {a_k}^2}\right) \left({\sum_{k \mathop = 1}^n {b_k}^2}\right) - \left({\sum_{k \mathop = 1}^n a_k b_k}\right)^2 = \sum_{i \mathop = 1}^{n - 1} \sum_{j \mathop = i + 1}^n \left({a_i b_j - a_j b_i}\right)^2$

Setting $n = 2$:

 $\displaystyle \left({\sum_{k \mathop = 1}^2 {a_k}^2}\right) \left({\sum_{k \mathop = 1}^2 {b_k}^2}\right) - \left({\sum_{k \mathop = 1}^2 a_k b_k}\right)^2$ $=$ $\displaystyle \sum_{i \mathop = 1}^1 \sum_{j \mathop = i + 1}^2 \left({a_i b_j - a_j b_i}\right)^2$ $\displaystyle \leadsto \ \$ $\displaystyle \left({ {a_1}^2 + {a_2}^2}\right) \left({ {b_1}^2 + {b_2}^2}\right) - \left({a_1 b_1 + a_2 b_2}\right)^2$ $=$ $\displaystyle \left({a_1 b_2 - a_2 b_1}\right)^2$ expanding out summations $\displaystyle \leadsto \ \$ $\displaystyle \left({a^2 + b^2}\right) \left({c^2 + d^2}\right) - \left({a c + b d}\right)^2$ $=$ $\displaystyle \left({a d - b c}\right)^2$ renaming $a_1 \to a, a_2 \to b, b_1 \to c, b_2 \to d$ $\displaystyle \leadsto \ \$ $\displaystyle \left({a^2 + b^2}\right) \left({c^2 + d^2}\right)$ $=$ $\displaystyle \left({a c + b d}\right)^2 + \left({a d - b c}\right)^2$

$\blacksquare$

## Proof 4

Let $z_1 = a + b i, z_2 = c + d i$ be complex numbers.

Let $\left\lvert{z}\right\rvert$ denote the complex modulus of a given complex number $z \in \C$.

By definition of complex multiplication:

$(1): \quad z_1 z_2 = \left({a c - b d}\right) + \left({a d + b c}\right) i$

Then we have:

 $\displaystyle \left\lvert{z_1 z_2}\right\rvert$ $=$ $\displaystyle \left\lvert{z_1}\right\rvert \cdot \left\lvert{z_2}\right\rvert$ Complex Modulus of Product of Complex Numbers $\displaystyle \leadsto \ \$ $\displaystyle \left\lvert{\left({a + b i}\right) \left({c + d i}\right)}\right\rvert^2$ $=$ $\displaystyle \left\lvert{a + b i}\right\rvert^2 \cdot \left\lvert{c + d i}\right\rvert^2$ $\displaystyle \leadsto \ \$ $\displaystyle \left({a c - b d}\right)^2 + \left({a d + b c}\right)^2$ $=$ $\displaystyle \left({a^2 + b^2}\right) \left({c^2 + d^2}\right)$ Definition of Complex Modulus, and from $(1)$

$\blacksquare$

## Also see

Lagrange's Identity, of which this the case where $n = 2$.

## Source of Name

This entry was named for Brahmagupta‎ and Leonardo Fibonacci‎.

## Also known as

This identity is also known as Diophantus's Identity, for Diophantus of Alexandria.

Some sources also give it as as Fibonacci's Identity.

## Historical Note

Both Brahmagupta‎ and Leonardo Fibonacci‎ described what is now known as the Brahmagupta-Fibonacci Identity in their writings:

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

However, it appeared earlier than either of those in Diophantus of Alexandria's Arithmetica of the third century C.E.