Brahmagupta–Fibonacci Identity Explained with Worked Examples

The product of two sums of two squares is again a sum of two squares: .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Brahmagupta–Fibonacci identity means

Expanding both sides gives the same eight terms: the cross terms cancel in the sum on the right. The identity is the statement that the moduli multiply when complex numbers multiply: ; see the modulus and argument of a product and the modulus of a complex number.

Replacing by gives a second expression, , so a product of two such numbers can often be written as a sum of two squares in two different ways. For instance works in two ways. This is part of the sum of two squares theorem.

It is used to build Pythagorean triples and to factorise numbers, together with the Sophie Germain identity. The related inequality Cauchy–Schwarz follows because the second square is non-negative. A similar product rule generates the solutions of the Pell equation.

What is it used for?

The product of two numbers that are sums of two squares is again a sum of two squares.

How to use brahmagupta–fibonacci identity

  1. Write each factor as a sum of two squares.
  2. Compute and .
  3. Square and add them.
  4. Compare with the product of the two original numbers.

Graph

A product of moduli: 5 × 5 = 25 gives 125 = 5² + 10²distance √125024681012024681012A product of moduli: 5 × 5 = 25 gives 125 = 5² + 10²xyGraph with x from 0 to 12 and y from 0 to 12. Shows right triangle with legs 5 and 10 (4); point distance √125 at (5, 10).

The hypotenuse squared is 25 + 100 = 125, which is 5 times 25.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: 125

Write as a sum of two squares.

Worked example
Answer
125=52+102125=5^{2}+10^{2}
  1. a = 1, b = 2, c = 3, d = 4
  2. Sum of squares

Example 2: 26

Write as a sum of two squares.

Worked example
Answer
26=12+5226=1^{2}+5^{2}
  1. a = 2, b = 3, c = 1, d = 1
  2. Sum

Example 3: two ways

Write as a sum of two squares in two ways.

Worked example
Answer
65=42+72=82+1265=4^{2}+7^{2}=8^{2}+1^{2}
  1. First choice
  2. Swap the sign of d

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

(1² + 2²)(3² + 4²)

5 × 25

125.

(ac − bd)² + (ad + bc)²

(3 − 8)² + (4 + 6)²

125.

(2² + 3²)(1² + 1²)

13 × 2

26.

(2 − 3)² + (2 + 3)²

1 + 25

26.

Word problems

(a² + b²)(c² + d²) = (ac − bd)² + (ad + bc)² = (ac + bd)² + (ad − bc)². It is |z₁|²|z₂|² = |z₁z₂|².

Product

(1² + 2²)(3² + 4²).

  1. 5 × 25
  2. Check: ✓125

As a sum of squares

(ac − bd)² + (ad + bc)² with a, b, c, d = 1, 2, 3, 4.

  1. (−5)² + 10²
  2. Check: 125 ✓125

Second example Higher

(2² + 3²)(1² + 1²).

  1. 13 × 2
  2. Check: ✓26

Its form Higher

(ac − bd)² + (ad + bc)² for (2, 3, 1, 1).

  1. 1 + 25
  2. Check: 26 ✓26

Common mistakes

Sum of squares of sums

(a + c)² + (b + d)² ✗

cross formula ✓

Different.

Wrong signs

(ac + bd)² + (ad + bc)² ✗

one minus ✓

Check.

Only integers

restricted ✗

any reals ✓

General.

Unique representation

one way ✗

two ways (±) ✓

Both forms.

Exam tips

  1. (ac − bd)² + (ad + bc)².
  2. Two forms (± signs).
  3. Complex moduli.
  4. Products of sums of squares are sums of squares.
  5. Check numerically.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. (1² + 1²)(2² + 3²) Foundation

26

2. (1·2 − 1·3)² + (1·3 + 1·2)² Foundation

26

3. (2² + 5²)(1² + 2²) Foundation

145

4. (2·1 − 5·2)² + (2·2 + 5·1)² Higher

145

5. (3² + 4²)(5² + 12²) Higher

4225

6. (3·5 − 4·12)² + (3·12 + 4·5)² Higher

4225

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Brahmagupta–Fibonacci identity
Product of sums of two squares.
Sum of two squares
a² + b².
Complex modulus
Gaussian integer
a + bi.
Composition
Multiplying forms.
Identity
Always true.

Frequently asked questions

What is the Brahmagupta–Fibonacci identity?

(a² + b²)(c² + d²) = (ac − bd)² + (ad + bc)².

Why is it true?

|z₁|²|z₂|² = |z₁z₂|².

Is there a second form?

Yes, (ac + bd)² + (ad − bc)².

What does it show?

Products of sums of two squares are sums of two squares.

Which page covers the sum of two squares theorem?

sum of two squares theorem.

Which page covers Sophie Germain?

Sophie Germain identity.

More in Competition and admissions maths and the formula sheets.