Recall that an inscribed (or 'cyclic') quadrilateral is one where the four vertices all lie on a circle. Using the formula below, you can calculate the area of the quadrilateral.
where a,b,c,d are the side lengths, and p is half the perimeter:In the figure above, drag any vertex around the circle. Note how the semi-perimeter (p) and the area are calculated.
In the figure above, if you drag a point past its neighbor the quadrilateral will become 'crossed' where one side crossed over another. In such 'crossed' quadrilaterals the area formula no longer holds. (Most properties of polygons are invalid when the polygon is crossed).
Recall that Heron's formula for the area of a triangle is where p is half the perimeter, as here.
The two formulae are very similar. If you take the Brahmagupta's formula and set d (the length of the fourth side) to zero, the quadrilateral becomes a triangle. In Brahmagupta's formula, the term (p-d) becomes just p and the formulae are then same also.
In the figure above, if you are careful, you can drag the point D around to be on top of A making d zero, illustrating this similarity.
From this you can see that Heron's formula is just a special case of Brahmagupta's. Recall too that all triangles are cyclic. That is, you can always draw a circle through the three vertices. See Circumcircle of a triangle.
In the figure above