Brahmagupta's Identity
Brahmagupta's identity states that for integers
Thus, the product of two integers that can both be written in the form for a given integer can be written in the same form for the same value of .
Proof
We expand the left side:
Adding and then subtracting to the result yields while subtracting and then adding yields
Application to the Pell equation
Substituting , the forms involved in Brahmagupta's identity lend themselves to use with solutions to the Pell equation
Composition of solutions
If and are both solution pairs to the Pell equation for a given value of , then and likewise Thus, and are two (not necessarily distinct) solutions to the same equation.