Brahmagupta's formula

In Euclidean geometry, Brahmagupta's formula, named after the 7th century Indian mathematician, is used to find the area of any convex cyclic quadrilateral (one that can be inscribed in a circle) given the lengths of the sides.

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.

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 a2 − b2 = (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.

Consequently, in the case of an inscribed quadrilateral, θ is 90°, whence the term giving the basic form of Brahmagupta's formula.

A related formula, which was proved by Coolidge, also gives the area of a general convex quadrilateral.

Diagram for reference