
Brahmagupta's formula provides the area A of a cyclic quadrilateral (i.e., a simple quadrilateral that is inscribed in a circle) with sides of length a, b, c, and d as
A = sqrt((sa)(sb)(sc)(sd)),
where s is the semiperimeter (a+b+c+d)/2
If the quadrilateral ABCD is a rectangle, then s=a+b, so A=sqrt((b)(a)(b)(a))=ab, so the formula is true in that special case. If one of the sides goes to zero, then ABCD is a triangle, and the formula become's Heron's Formula, so it's true in that special case as well. Here on this page, I will demonstrate that the formula is true of any other cyclic quadrilateral. Brahmagupta first published this result in 628 in a book that included many other groundbreaking mathematical results.
You can see that opposite angles are supplementary by drawing a diagonal, AC.
Angle D subtends the arc ABC, so the measure of angle D is half the measure
of arc ABC;
Angle B subtends the arc ADC, so the measure of angle B is half the measure of
arc ADC;
The sum of the measures of arcs ABC and ADC is 360�, so the sum of the measures
of angles B and D is 180�.
Having shown Brahmagupta's formula true for rectangles, we assume this cyclic quadrilateral is not a rectangle, so WLOG we assume AB and CD are not parallel. Extend AB and DC until they meet at P:
Angles BAD and BCD are supplementary, as are angles BAD and PAD, so angle BCD is equal to angle PAD.
So triangles PBC and PDA are similar. The ratio of their sides is b/d, so the ratio of their areas is b²/d².
Let A be the area of the quadrilateral, and let T be the area of triangle PBC.
(1) A = T  (d²/b²)T
(2) A = (1d²/b²)T
(3) A = ((b²d²)/b²)T
By Heron's Formula, T = sqrt(s(sea)(sfc)(sb)), where s is the semiperimeter of triangle PBC.
(4) A = ((b²d²)/b²)sqrt(s(sea)(sfc)(sb))
Now, let's get e and f in terms of a, b, c, and d. By similar triangles, we have these two equations
de  bf = ad
be  df = cd
Treating these as two linear equations in e and f, the solution is
e = (bcd+ad²)/(b²d²)
f = (abd+cd²)/(b²d²)
Substituting these values of e and f into equation 4, we get:
(5) A = ((b²d²)/b²)sqrt(s(s(bcd+ad²)/(b²d²)a)(s(abd+cd²)/(b²d²)c)(sb))
And s = (a+b+c+e+f)/2
s = (a+b+c+(bcd+ad²)/(b²d²)+(abd+cd²)/(b²d²))/2
s = (1/2)(a(b²d²)+b(b²d²)+c(b²d²)+(bcd+ad²)+(abd+cd²))/(b²d²)
s = (1/2)(ab²ad²+b³bd²+b²ccd²+bcd+ad²+abd+cd²)/(b²d²)
s = (1/2)b(a+b+cd)(b+d)/(b²d²)
s = (1/2)b(a+b+cd)/(bd)
Now substituting this value of s into equation 5,
(6) A = ((b²d²)/b²)sqrt(
((1/2)b(a+b+cd)/(bd))
((1/2)b(a+b+cd)/(bd)(bcd+ad²)/(b²d²)a)
((1/2)b(a+b+cd)/(bd)(abd+cd²)/(b²d²)c)
((1/2)b(a+b+cd)/(bd)b))
Now pulling 4 factors of (1/2) out of the sqrt,
(7) A = (1/4)((b²d²)/b²)sqrt(
(b(a+b+cd)/(bd))
(b(a+b+cd)/(bd)2(bcd+ad²)/(b²d²)2a)
(b(a+b+cd)/(bd)2(abd+cd²)/(b²d²)2c)
(b(a+b+cd)/(bd)2b))
Now pulling factors of 1/(bd), 1/(b+d), 1/(b+d), and 1/(bd) out of the four factors in the sqrt, respectively, canceling b²d²,
(8) A = (1/4)(1/b²)sqrt(
(b(a+b+cd))
(b(a+b+cd)(b+d)/(bd)2(bcd+ad²)/(bd)2a(b+d))
(b(a+b+cd)(b+d)/(bd)2(abd+cd²)/(bd)2c(b+d))
(b(a+b+cd)2b(bd)))
(9) A = (1/4)(1/b²)sqrt(
(b(a+b+cd))
((b³+ab²+cb²d²b+adbcdb2ad²)/(bd)2a(b+d))
((b³+ab²+cb²d²badb+cdb2cd²)/(bd)2c(b+d))
(b(ab+c+d))
(10) A = (1/4)(1/b²)sqrt(
(b(a+b+cd))
((b²+ab+cb+db+2ad)2a(b+d))
((b²+ab+cb+db+2cd)2c(b+d))
(b(ab+c+d))
(11) A = (1/4)(1/b²)sqrt(
(b(a+b+cd))
(b²ab+cb+db)
(b²+abcb+db)
(b(ab+c+d))
Now pull four factors of b from the sqrt, canceling b² in the denominator,
(12) A = (1/4)sqrt(
(a+b+cd)
(ba+c+d)
(b+ac+d)
(ab+c+d))
Noting that a+b+c+d = 2(sa), and ab+c+d = 2(sb), etc., where s is now the semiperimeter of the quadrilateral,
(13) A = sqrt((sa)(sb)(sc)(sd))
Summary of geometrical theorems
Heron's Formula for the area of a triangle.
Bretschneider's Formula for the area of a quadrilateral, which can be considered a generalization of Brahmagupta's Formula.
http://jwilson.coe.uga.edu/emt725/brahmagupta/brahmagupta.html
The webmaster and author of this Math Help site is Graeme McRae.