---
tag: 0K2DMACEZ4
kind: statement
role: proposition
name: Brahmagupta–Fibonacci identity
aliases: [diophantus-identity]
msc: ["11E25"]
sources:
  - url: https://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity
    locator: lead section
  - url: https://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity
    locator: History
same_as:
  wikidata: Q279090
  wikipedia: Brahmagupta–Fibonacci identity
---

## Statement

Let $a$, $b$, $c$ and $d$ be elements of a commutative ring. Then
$$(a^2 + b^2)(c^2 + d^2) = (ac - bd)^2 + (ad + bc)^2 = (ac + bd)^2 + (ad - bc)^2.$$

## Remarks

So the product of two sums of two squares is again a sum of two squares.
For example, $5 \cdot 13 = 65$, and the identity gives $65 = 1^2 + 8^2 = 7^2 + 4^2$.
For complex numbers, the identity says $|z|^2 |w|^2 = |zw|^2$ with $z = a + bi$ and $w = c + di$.
It is a step in the proof of the [[sum of two squares theorem|04NPWJMA6H]].

## History

The identity appears in the Arithmetica of Diophantus, of the third century.
Brahmagupta found it again in the seventh century, and Fibonacci published it in Europe in 1225.

## Explanations

### L1 human

If two numbers are sums of two squares, then so is their product.
You can check the identity by expanding both sides: the cross terms $2abcd$ cancel.
