and (lit. "mathematics of seeds," with "seeds"—like the seeds of plants—representing unknowns with the potential to generate, in this case, the solutions of equations). Brahmagupta, in his astronomical work (628 CE), included two chapters (12 and 18) devoted to these fields. Chapter 12, containing 66 Sanskrit verses, was divided into two sections: "basic operations" (including cube roots, fractions, ratio and proportion, and barter) and "practical mathematics" (including mixture, mathematical series, plane figures, stacking bricks, sawing of timber, and piling of grain). In the latter section, he stated his famous theorem on the diagonals of a cyclic quadrilateral: Brahmagupta's theorem: If a cyclic quadrilateral has diagonals that are perpendicular to each other, then the perpendicular line drawn from the point of intersection of the diagonals to any side of the quadrilateral always bisects the opposite side. Chapter 12 also included a formula for the area of a cyclic quadrilateral (a generalisation of Heron's formula), as well as a complete description of rational triangles (i.e. triangles with rational sides and rational areas). Brahmagupta's formula: The area, A, of a cyclic quadrilateral with sides of lengths a, b, c, d, respectively, is given by where s, the semiperimeter, given by Brahmagupta's Theorem on rational triangles: A triangle with rational sides and rational area is of the form: for some rational numbers and . Chapter 18 contained 103 Sanskrit verses which began with rules for arithmetical operations involving zero and negative numbers and is considered the first systematic treatment of the subject. The rules (which included and ) were all correct, with one exception: . Later in the chapter, he gave the first explicit (although still not completely general) solution of the quadratic equation: This is equivalent to: Also in chapter 18, Brahmagupta was able to make progress in finding (integral) solutions of Pell's equation, where is a nonsquare integer. He did this by discovering the following identity: Brahmagupta's Identity: which was a generalisation of an earlier identity of Diophantus: Brahmagupta used his identity to prove the following lemma: Lemma (Brahmagupta): If is a solution of and, is a solution of , then: is a solution of He then used this lemma to both generate infinitely many (integral) solutions of Pell's equation, given one solution, and state the following theorem: Theorem (Brahmagupta): If the equation has an integer solution for any one of then Pell's equation: also has an integer solution. Brahmagupta did not