For a number field , let be its ring of integers of a number field, the number of real embeddings and the number of conjugate pairs of nonreal complex embeddings, so . The Dirichlet unit theorem says
where is the finite group of roots of unity in . Thus an imaginary quadratic number field has only roots of unity as units: usually , with four for and six for . A real quadratic number field has units for a fundamental unit and integers .
For , and the field norm is . The element has norm and is a unit. It is the smallest positive unit greater than one. Indeed for , its conjugate is , so the coefficient is a positive integer less than two. Therefore , and forces , giving , a contradiction. The Dirichlet unit theorem now gives . Its least positive norm-one generator is .
For the generalized Pell equation, write with norm . Change the sign if necessary and multiply by a power of to place it in . These operations preserve integrality and the absolute norm, though the latter operation can change the norm's sign. Since , we have and . The upper bound gives . Checking in leaves only . Both reduced elements lie in the chosen interval. Therefore all integral solutions of either sign are
Negative powers are integral because . In the first family the norm is and in the second it is , so this also separates the two equations. The reduction proves exhaustion rather than merely generating examples.