# sums of two squares

###### Theorem.

The set of the sums of two squares of integers is closed under multiplication^{}; in fact we have the identical equation

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

This was presented by Leonardo Fibonacci in 1225 (in
*Liber quadratorum*), but was known also by Brahmagupta
and already by Diophantus of Alexandria (III book of his
*Arithmetica*).

The proof of the equation may utilize Gaussian integers^{} as follows:

$({a}^{2}+{b}^{2})({c}^{2}+{d}^{2})$ | $\mathrm{\hspace{0.33em}}=(a+ib)(a-ib)(c+id)(c-id)$ | ||

$\mathrm{\hspace{0.33em}}=(a+ib)(c+id)(a-ib)(c-id)$ | |||

$\mathrm{\hspace{0.33em}}=[(ac-bd)+i(ad+bc)][(ac-bd)-i(ad+bc)]$ | |||

$\mathrm{\hspace{0.33em}}={(ac-bd)}^{2}+{(ad+bc)}^{2}$ |

Note 1. The equation (1) is the special case $n=2$
of Lagrange’s identity.

Note 2. Similarly as (1), one can derive the identity

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

Thus in most cases, we can get two different nontrivial sum forms (i.e. without a zero addend) for a given product of two sums of squares. For example, the product

$$65=5\cdot 13=({2}^{2}+{1}^{2})({3}^{2}+{2}^{2})$$ |

attains the two forms ${4}^{2}+{7}^{2}$ and ${8}^{2}+{1}^{2}$.

Title | sums of two squares |

Canonical name | SumsOfTwoSquares |

Date of creation | 2013-11-19 16:28:21 |

Last modified on | 2013-11-19 16:28:21 |

Owner | pahio (2872) |

Last modified by | pahio (2872) |

Numerical id | 33 |

Author | pahio (2872) |

Entry type | Theorem^{} |

Classification | msc 11A67 |

Classification | msc 11E25 |

Synonym | Diophantus’ identity |

Synonym | Brahmagupta’s identity |

Synonym | Fibonacci’s identity |

Related topic | EulerFourSquareIdentity |

Related topic | TheoremsOnSumsOfSquares |

Related topic | DifferenceOfSquares |