Generalization: dropping the cyclic hypothesis gives Ptolemy's INEQUALITY, $AC\cdot BD \le AB\cdot CD + AD\cdot BC$ for ANY four points, with equality exactly when $ABCD$ is a convex cyclic quadrilateral — so Ptolemy is simultaneously a metric identity and a concyclicity test. There is also a 'second' Ptolemy giving the ratio of the diagonals, $\dfrac{AC}{BD} = \dfrac{AB\cdot AD + CB\cdot CD}{BA\cdot BC + DA\cdot DC}$.
Where it appears: Ptolemy converts a circle plus four marked points into a clean length equation — ideal for AIME problems on cyclic quadrilaterals and for deriving the golden ratio, the regular-polygon diagonal lengths, and the addition formulas $\sin(x+y), \cos(x+y)$ (apply Ptolemy to a quadrilateral inscribed in a unit-diameter circle).
Pitfall: the vertices must be in CYCLIC ORDER $A, B, C, D$ around the circle, so that $AC$ and $BD$ are the genuine DIAGONALS and $AB, BC, CD, DA$ the sides. Pairing the wrong segments as 'diagonals' (e.g. taking a side as a diagonal because the labeling is scrambled) gives a false equation — always confirm the order around the circle first.