In Euclidean geometry, Brahmagupta's formula, named after the 7th century Indian mathematician, is used to find the area of any cyclic quadrilateral (one that can be inscribed in a circle) given the lengths of the sides. Its generalized version, Bretschneider's formula, can be used with non-cyclic quadrilateral.
Heron's formula can be thought as a special case of the Brahmagupta's formula for triangles.
Brahmagupta's formula gives the area K of a cyclic quadrilateral whose sides have lengths a, b, c, d as
where s, the semiperimeter, is defined to be
This formula generalizes Heron's formula for the area of a triangle. A triangle may be regarded as a quadrilateral with one side of length zero. From this perspective, as d approaches zero, a cyclic quadrilateral converges into a cyclic triangle (all triangles are cyclic), and Brahmagupta's formula simplifies to Heron's formula.
If the semiperimeter is not used, Brahmagupta's formula is
Another equivalent version is
Here the notations in the figure to the right are used. The area K of the cyclic quadrilateral equals the sum of the areas of △ADB and △BDC:
But since □ABCD is a cyclic quadrilateral, ∠DAB = 180° − ∠DCB. Hence sin A = sin C. Therefore,
(using the trigonometric identity).
Solving for common side DB, in △ADB and △BDC, the law of cosines gives
Substituting cos C = −cos A (since angles A and C are supplementary) and rearranging, we have
Substituting this in the equation for the area,
The right-hand side is of the form a^2 − b^2 = (a − b)(a + b) and hence can be written as
which, upon rearranging the terms in the square brackets, yields
that can be factored again into
Introducing the semiperimeter S = p + q + r + s/2 yields
Taking the square root, we get
An alternative, non-trigonometric proof utilizes two applications of Heron's triangle area formula on similar triangles.
In the case of non-cyclic quadrilaterals, Brahmagupta's formula can be extended by considering the measures of two opposite angles of the quadrilateral:
where θ is half the sum of any two opposite angles.