Definitions

# Brahmagupta's formula

In geometry, Brahmagupta's formula finds the area of any quadrilateral given the lengths of the sides and some of their angles. In its most common form, it yields the area of quadrilaterals that can be inscribed in a circle.

## Basic form

In its basic and easiest-to-remember form, Brahmagupta's formula gives the area of a cyclic quadrilateral whose sides have lengths a, b, c, d as

$sqrt\left\{\left(s-a\right)\left(s-b\right)\left(s-c\right)\left(s-d\right)\right\}$

where s, the semiperimeter, is determined by

$s=frac\left\{a+b+c+d\right\}\left\{2\right\}.$

This formula generalizes Heron's formula for the area of a triangle.

The area of a cyclic quadrilateral is the maximum possible area for any quadrilateral with the given side lengths.

## Proof of Brahmagupta's formula

Area of the cyclic quadrilateral = Area of $triangle ADB$ + Area of $triangle BDC$

$= frac\left\{1\right\}\left\{2\right\}pqsin A + frac\left\{1\right\}\left\{2\right\}rssin C.$

But since $ABCD$ is a cyclic quadrilateral, $angle DAB = 180^circ - angle DCB.$ Hence $sin A = sin C.$ Therefore

$mbox\left\{Area\right\} = frac\left\{1\right\}\left\{2\right\}pqsin A + frac\left\{1\right\}\left\{2\right\}rssin A$

$\left(mbox\left\{Area\right\}\right)^2 = frac\left\{1\right\}\left\{4\right\}sin^2 A \left(pq + rs\right)^2$

$4\left(mbox\left\{Area\right\}\right)^2 = \left(1 - cos^2 A\right)\left(pq + rs\right)^2 ,$

$4\left(mbox\left\{Area\right\}\right)^2 = \left(pq + rs\right)^2 - cos^2 A \left(pq + rs\right)^2. ,$

Applying law of cosines for $triangle ADB$ and $triangle BDC$ and equating the expressions for side $DB,$ we have

$p^2 + q^2 - 2pqcos A = r^2 + s^2 - 2rscos C. ,$

Substituting $cos C = -cos A$ (since angles $A$ and $C$ are supplementary) and rearranging, we have

$2cos A \left(pq + rs\right) = p^2 + q^2 - r^2 - s^2. ,$

Substituting this in the equation for area,

$4\left(mbox\left\{Area\right\}\right)^2 = \left(pq + rs\right)^2 - frac\left\{1\right\}\left\{4\right\}\left(p^2 + q^2 - r^2 - s^2\right)^2$

$16\left(mbox\left\{Area\right\}\right)^2 = 4\left(pq + rs\right)^2 - \left(p^2 + q^2 - r^2 - s^2\right)^2, ,$

which is of the form $a^2-b^2$ and hence can be written in the form $\left(a+b\right)\left(a-b\right)$ as

$\left(2\left(pq + rs\right) + p^2 + q^2 -r^2 - s^2\right)\left(2\left(pq + rs\right) - p^2 - q^2 + r^2 +s^2\right) ,$

$= \left(\left(p+q\right)^2 - \left(r-s\right)^2 \right)\left(\left(r+s\right)^2 - \left(p-q\right)^2 \right) ,$

$= \left(p+q+r-s\right)\left(p+q+s-r\right)\left(p+r+s-q\right)\left(q+r+s-p\right). ,$

Introducing $S = frac\left\{p+q+r+s\right\}\left\{2\right\},$

$16\left(mbox\left\{Area\right\}\right)^2 = 16\left(S-p\right)\left(S-q\right)\left(S-r\right)\left(S-s\right). ,$

Taking square root, we get

$mbox\left\{Area\right\} = sqrt\left\{\left(S-p\right)\left(S-q\right)\left(S-r\right)\left(S-s\right)\right\}.$

In the case of non-cyclic quadrilaterals, Brahmagupta's formula can be extended by considering the measures of two opposite angles of the quadrilateral:

$sqrt\left\{\left(s-a\right)\left(s-b\right)\left(s-c\right)\left(s-d\right)-abcdcos^2theta\right\}$

where θ is half the sum of two opposite angles. (The pair is irrelevant: if the other two angles are taken, half their sum is the supplement of θ. Since cos(180° − θ) = −cosθ, we have cos²(180° − θ) = cos²θ.)

This more general formula is sometimes known as Bretschneider's formula, but according to MathWorld is apparently due to Coolidge in this form, Bretschneider's expression having been

$sqrt\left\{\left(s-a\right)\left(s-b\right)\left(s-c\right)\left(s-d\right)-textstyle\left\{1over4\right\}\left(ac+bd+pq\right)\left(ac+bd-pq\right)\right\},$

where p and q are the lengths of the diagonals of the quadrilateral.

It is a property of cyclic quadrilaterals (and ultimately of inscribed angles) that opposite angles of a quadrilateral sum to 180°. Consequently, in the case of an inscribed quadrilateral, θ = 90°, whence the term

$abcdcos^2theta=abcdcos^2 left\left(90^circright\right)=abcdcdot0=0, ,$

giving the basic form of Brahmagupta's formula.

## Related theorems

Heron's formula for the area of a triangle is the special case obtained by taking d = 0.

The relationship between the general and extended form of Brahmagupta's formula is similar to how the law of cosines extends the Pythagorean theorem.