# Bhaskara's lemma

Bhaskara's Lemma is an identity used as a lemma during the chakravala method. It states that:

${\displaystyle \,Nx^{2}+k=y^{2}\implies \,N\left({\frac {mx+y}{k}}\right)^{2}+{\frac {m^{2}-N}{k}}=\left({\frac {my+Nx}{k}}\right)^{2}}$

for integers ${\displaystyle m,\,x,\,y,\,N,}$ and non-zero integer ${\displaystyle k}$.

## Proof

The proof follows from simple algebraic manipulations as follows: multiply both sides of the equation by ${\displaystyle m^{2}-N}$ , add ${\displaystyle N^{2}x^{2}+2Nmxy+Ny^{2}}$ , factor, and divide by ${\displaystyle k^{2}}$ .

${\displaystyle \,Nx^{2}+k=y^{2}\implies Nm^{2}x^{2}-N^{2}x^{2}+k(m^{2}-N)=m^{2}y^{2}-Ny^{2}}$
${\displaystyle \implies Nm^{2}x^{2}+2Nmxy+Ny^{2}+k(m^{2}-N)=m^{2}y^{2}+2Nmxy+N^{2}x^{2}}$
${\displaystyle \implies N(mx+y)^{2}+k(m^{2}-N)=(my+Nx)^{2}}$
${\displaystyle \implies \,N\left({\frac {mx+y}{k}}\right)^{2}+{\frac {m^{2}-N}{k}}=\left({\frac {my+Nx}{k}}\right)^{2}.}$

So long as neither ${\displaystyle k}$  nor ${\displaystyle m^{2}-N}$  are zero, the implication goes in both directions. (The lemma holds for real or complex numbers as well as integers.)

## References

• C. O. Selenius, "Rationale of the chakravala process of Jayadeva and Bhaskara II", Historia Mathematica, 2 (1975), 167-184.
• C. O. Selenius, Kettenbruch theoretische Erklarung der zyklischen Methode zur Losung der Bhaskara-Pell-Gleichung, Acta Acad. Abo. Math. Phys. 23 (10) (1963).
• George Gheverghese Joseph, The Crest of the Peacock: Non-European Roots of Mathematics (1975).