Ptolemy's theorem is a relation among these lengths in a cyclic quadrilateral.
In Euclidean geometry, Ptolemy's theorem is a relation between the four sides and two diagonals of a cyclic quadrilateral (a quadrilateral whose vertices lie on a common circle). The theorem is named after the Greek astronomer and mathematician Ptolemy (Claudius Ptolemaeus).[1] Ptolemy used the theorem as an aid to creating his table of chords, a trigonometric table that he applied to astronomy.
If the quadrilateral is given with its four vertices A, B, C, and D in order, then the theorem states that:

where the vertical lines denote the lengths of the line segments between the named vertices.
This relation may be verbally expressed as follows:
- If a quadrilateral is inscribable in a circle then the product of the measures of its diagonals is equal to the sum of the products of the measures of the pairs of opposite sides.
Moreover, the converse of Ptolemy's theorem is also true:
- In a quadrilateral, if the sum of the products of its two pairs of opposite sides is equal to the product of its diagonals, then the quadrilateral can be inscribed in a circle.
[ Examples
[ Equilateral triangle
Ptolemy's Theorem yields as a corollary a pretty theorem [2] regarding an equilateral triangle inscribed in a circle.
Given An equilateral triangle inscribed on a circle and a point on the circle.
The distance from the point to the most distant vertex of the triangle is the sum of the distances from the point to the two nearer vertices.
Proof: Follows immediately from Ptolemy's theorem:

[ Square
Any square can be inscribed in a circle whose center is the barycenter of the square. If the common length of its four sides is equal to
then the length of the diagonal is equal to
according to the Pythagorean theorem and the relation obviously holds.
[ Rectangle
Pythagoras' theorem:
"manifestum est": Copernicus
More generally, if the quadrilateral is a rectangle with sides a and b and diagonal d then Ptolemy's theorem reduces to the Pythagorean theorem. In this case the center of the circle coincides with the point of intersection of the diagonals. The product of the diagonals is then d2, the right hand side of Ptolemy's relation is the sum a2 + b2.
Copernicus − who used Ptolemy's theorem extensively in his trigonometrical work − refers to this result as a 'Porism' or self-evident corollary:
- Furthermore it is clear (manifestum est) that when the chord subtending an arc has been given, that chord too can be found which subtends the rest of the semicircle.
De Revolutionibus Orbium Coelestium: Page 37. See last two lines of this page.
Nor for that matter does Copernicus refer to "Ptolemy's Theorem" but labels it more simply as "Theorema Secundum".
[ Pentagon
The
golden ratio follows from this application of Ptolemy's theorem
A more interesting example is the relation between the length a of the side and the (common) length b of the 5 chords in a regular pentagon. In this case the relation reads b2 = a2 + ab which yields the golden ratio
[3]
[ Side of decagon
Side of the inscribed decagon
If now diameter AF is drawn bisecting DC so that DF and CF are sides c of an inscribed decagon, Ptolemy's Theorem can again be applied – this time to cyclic quadrilateral ADFC with diameter d as one of its diagonals:

where
is the golden ratio.
[4]
whence the side of the inscribed decagon is obtained in terms of the circle diameter. Pythagoras' Theorem applied to right triangle AFD then yields "b" in terms of the diameter and "a" the side of the pentagon [5] is thereafter calculated as
-

As Copernicus (following Ptolemy) wrote,
- "The diameter of a circle being given, the sides of the triangle, tetragon, pentagon, hexagon and decagon, which the same circle circumscribes, are also given." – De Revolutionibus Orbium Coelestium: Liber Primus: Theorema Primum
[ Complement of pentagon chord
Complement of the pentagon chord
The ancient geometers are not done yet, for if the fifth vertex of the pentagon is marked as E and FE and BF are joined (with FE=BF=z), then cyclic quadrilateral EFBA will be formed with diagonals length d (diameter) and b.[6] Applying the 'Almagest' theorem yet again:

where
is the golden ratio.

z subtends 540 at the circumference, c (the side of the decagon) subtends 180 at the circumference and thereby is established:
and 
And since angle ABF is subtended by the diameter and is therefore right, the side of the pentagon is calculated by an even simpler route:

Based on his circle of diameter 200000 units, Copernicus provides accurate numerical values for the four pentagon related chords corresponding to these angles:
- "Since the side of the decagon which subtends 360 has been shown to have 61803 parts, whereof the diameter has 200000 parts – the chord which subtends the remaining 1440 of the semicircle has 190211 parts. And in the case of side of the pentagon, which is equal to 117557 parts of the diameter and subtends an arc of 720, a straight line of 161803 parts is given, and it subtends the remaining 1080 of the circle".
Golden ratio aficionados will instantly recognize the digits 161803 and 61803 as corresponding to
and its reciprocal.[7] The chords are of considerable historical importance because, along with the sides of the triangle and tetragon (square), they enable the generation of a table of half chords (effectively sine values) [8] which in turn underpins many of the key astronomical measurements and calculations effected by Copernicus in the development of his helio-centric model:
- "Because the proofs which we shall use in almost the entire work deal with straight lines and arcs, with plane and spherical triangles and because Euclid's Elements, although they clear up much of this, do not have what is here most required, namely, how to find the sides from angles and the angles from the sides ... there has accordingly been found a method whereby the lines subtending any arc may be known."
[ Euclid 13:10
Square of Pentagon chord equals sum of squares of decagon and hexagon chords
Next our attention is drawn to point G midway between points B and C on the circumference. CG, FG and DG are joined forming cyclic quadrilateral DFCG in which three sides belong to the regular decagon (length c) and the fourth DG is of length z. Diagonals DC and FG are both of length a (side of the pentagon) Then:

Therefore
![\begin{align}
c^2+\frac{d}{2 \varphi}\frac{\varphi d}{2} & = a^2, \\[8pt]
c^2+\frac{d^2}{4} & = a^2, \\[8pt]
c^2+r^2 & = a^2,
\end{align}](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2F0%2F3%2Fc%2F03cac3cbe14a092de73abf28ba245195.png&site=wikipedia&host=http://en.wikipedia.org/)
where r is the radius of the circle and also the side of the inscribed hexagon.
Whence with relative ease is proved Proposition 10 in Book XIII of Euclid's Elements: The square on the side of the pentagon equals the sum of the squares on the sides of the hexagon and the decagon inscribed in the same circle.
In modern trigonometric notation this corresponds to the identity:

The Pythagorean nature of this relationship makes possible the construction of a regular pentagon as demonstrated here.
[ Theorema Tertium
Determination of the chord subtending 12 degrees of arc
A well documented classical application of the "Second Theorem" as illustrated in the diagram is the determination of chord BC subtending 12 degrees of arc. Referring to the diagram:
![\begin{align}
\overline{BC} & = \frac{\overline{BD}\cdot\overline{AC}-\overline{AB}\cdot\overline{CD}}{\overline{AD}} \\[8pt]
& = \frac{\sqrt{3}ra-rz}{2r} \\[8pt]
& = \frac{a\sqrt{3}-z}{2}.
\end{align}](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2F1%2Fc%2Fd%2F1cd7fc635b1f42283b504de47e2b97e2.png&site=wikipedia&host=http://en.wikipedia.org/)
- "When, for example, the sides of the pentagon and hexagon are given from the above, by this computation a line is given subtending 120 which is the difference between the arcs − and it is equal to 20905 parts of the diameter." De Revolutionibus Orbium Coelestium: Liber Primus: Theorema Tertium
Based on his circle of diameter 200000 units and already established chords of pentagon, hexagon and triangle the calculation effected by Copernicus would have been:

A small rounding error is evident in the result but the corresponding entry (in the Copernican table of half chords ) of 10453 units against 6 degrees is correct as may readily be verified on a calculator (sin 6).
In modern trigonometric notation, the above calculation corresponds to the following application of a compound angle formula:

[ Theorema Quintum
Determination of the chord subtending a sum of arcs
The previous diagram demonstrated a general technique for calculating the chord subtending the difference between two arcs. The following diagram neatly reverses this procedure to obtain the chord subtending the sum of arcs: i.e. determination of chord AC given chords AB and BC.
Compared with the previous we note that diameter BE has been swung across from point B to point E. EC and ED are joined. Since AEDB is a rectangle DE=AB. Thus in cyclic quadrilateral BEDC, sides BE, BC and ED are known along with diagonals CE and BD by application of the "Porism" (Pythagoras Thm). Then:

In the specific example illustrated in the diagram, calculation of chord CD in cyclic quadrilateral BEDC corresponds to the following application of a compound angle formula:

The required chord AC (in this example corresponding to sin(30+6)) is then calculated by application of the "Porism".
De Revolutionibus Orbium Coelestium: Liber Primus: Theorema Quintum
[ Other polygons
When applied repeatedly, Ptolemy's theorem allows one to compute the lengths of all diagonals for polygons inscribed in a circle with vertices P1, ..., Pn, if the sides are given together with all the length values of the "next to sides" chords connecting two vertices Pi and Pi+2 (with indices taken modulo n).[citation needed]
[ Proofs
[ Geometric proof
Constructions for a proof of Ptolemy's theorem
- Let ABCD be a cyclic quadrilateral.
- Note that on the chord BC, the inscribed angles ∠BAC = ∠BDC, and on AB, ∠ADB = ∠ACB.
- Construct K on AC such that ∠ABK = ∠CBD;
- Note that since ∠ABK + ∠CBK = ∠ABC = ∠CBD + ∠ABD, ∠CBK = ∠ABD.
- Now, by common angles △ABK is similar to △DBC, and likewise △ABD is similar △KBC.
- Thus AK/AB = CD/BD, and CK/BC = DA/BD;
- Thus AK·BD = AB·CD, and CK·BD = BC·DA;
- By adding equality: AK·BD + CK·BD = AB·CD + BC·DA;
- Thus by factorizing: (AK+CK)·BD = AB·CD + BC·DA;
- But AK+CK = AC, so AC·BD = AB·CD + BC·DA; Q.E.D.
Note that the proof is clearly only valid for simple cyclic quadrilaterals; if the quadrilateral is complex then K will be located outside the line segment AC, so AK−CK=±AC, giving the expected result.
[ Trigonometric proof
It suffices to prove the theorem for the standard unit circle (the statement of the theorem is invariant under re-scaling and translation). Introducing polar coordinates one may represent the four vertices
in the form

After a possible renumbering of the Pi one can also assume that the four vertices appear in natural counterclockwise order which means that
.
A basic result from trigonometry states that for two points
and
on the unit circle written in polar coordinates their Euclidean distance ||x − y|| is given as

If
is an (ordered) pair of vertices of the given quadrilateral this formula implies

Ptolemy's relation

then follows from the quadratic addition relation

satisfied by the sine-function which in turn can be deduced from the trigonometric identity (which is the products-to-sum identity for the sine)

applied to each of the three products of sines (the resulting six terms cancel out in pairs).
Concluding remark (explaining the naming "addition relation"):
If one introduces the difference angles
for
then the relation

turns into

Solving for
, this relation may be interpreted as a "triple" addition relation expressing the sine of a triple angle sum
as a rational expression in the sine values
and
. Written out explicitly:

[ Proof using the law of sines
The proof which follows is substantively similar to the previous but adopts a different methodology and concludes with an interestingly symmetric formula for the product of diagonals and sum of products of opposite sides.
Preliminary observations and identities
In the diagram sides AB,BC,CD and DA are labelled
and
and subtend angles
and
respectively. Applying sum of angles in triangle ABC it should be noted that
. Therefore the sum of any two angles is supplementary with the sum of the other two and any single angle is supplementary with the sum of the other three. In general for supplementary angles x and y:

We will also need the identity
and the following product to sum identity:

Proof
Apply the sine rule to triangles ABC, ADC and ABD within their common circumscribing circle ABCD with radius R:

From this we obtain:
![\begin{align}
S_1S_3+S_2S_4 & = 4R^2(\sin\theta_1\sin\theta_3+\sin\theta_2\sin\theta_4)\\
& = 2R^2[\cos(\theta_1-\theta_3)-\cos(\theta_1+\theta_3)-\cos(\theta_2+\theta_4)+\cos(\theta_2-\theta_4)]\\
& = 2R^2[\cos(\theta_1-\theta_3)+\cos(\theta_2-\theta_4)].
\end{align}](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2F9%2Fa%2F8%2F9a8182d90f4d8a7e903be66ed14c38e5.png&site=wikipedia&host=http://en.wikipedia.org/)
The product to sum identity has been applied twice and the middle two terms cancel out on account of being cosines of supplementary angles.
Similarly we can obtain an expression for the product of diagonals:
![\begin{align}
\overline{BD} \cdot\overline{AC} & = 4R^2[\sin(\theta_3+\theta_2)\sin(\theta_3+\theta_4)]\\
& = 2R^2[\cos(\theta_2-\theta_4)-\cos(2\theta_3+\theta_4+\theta_2)]\\
& = 2R^2[\cos(\theta_2-\theta_4)+\cos(\theta_1-\theta_3)].
\end{align}](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2Fd%2F5%2Fc%2Fd5c85346314598339eacc172b8b978f9.png&site=wikipedia&host=http://en.wikipedia.org/)
Once again the product to sum identity has been applied and the second term has been rewritten in terms of its supplementary angle.
We may now present Ptolemy's theorem with an addendum by way of the "marrying formula" for product of diagonals and sum of products of opposite sides:
![S_1S_3+S_2S_4=\overline{AC} \cdot\overline{BD} =2R^2[\cos(\theta_2-\theta_4)+\cos(\theta_1-\theta_3)]\;](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2Fe%2Fe%2F5%2Fee5d72e3f35e320eb88bcf99bbca5e49.png&site=wikipedia&host=http://en.wikipedia.org/)
where R is the radius of the circumscribing circle and
are the angles subtended by sides
respectively.
In the case of a circle of unit diameter, Ptolemy's theorem can be written in trigonometric form as follows:

[ Algebraic proof
An alternative proof can be given using complex number calculus and projective analytic geometry, introducing complex coordinates for the vertices of the quadrilateral. Again it suffices to prove the theorem for the standard unit circle
.
Ptolemy's Relation

can be reformulated as

Written in this form Ptolemy's theorem is in fact a "disguised" form of the relation

valid for the cross-ratio
of any four (pairwise different) complex numbers
.
To make this connection explicit one represents the four vertices
as four complex numbers
of norm one, arranged in (counterclockwise) cyclic order on the unit circle. For two complex numbers
on the unit circle their squared distance equals

Therefore for any quadruple of (pairwise different) complex numbers
on the unit circle the square of the "length cross-ratio"

is equal to the square
of the ordinary ("complex points" ) cross-ratio
. Taking square roots one first deduces

for any quadruple
of points on the unit circle. The sign factor
depends on the relative position of the four points
on the unit circle and can be determined using the invariance of the cross-ratio under a linear fractional transformation
. Assume that the quadruple
on the unit circle is arranged in natural (counterclockwise) cyclic order. Then

This property can be proved using the projective transformation
(which is the "inverse Cayley transform"). It maps the punctured unit circle
(continuously) to the real line
(with the upper (resp. lower) arc of the unit circle mapping to the negative (resp. positive) half-line). In polar coordinates the map is given as
which shows that it defines a monotone function in the "angle" coordinate
. Therefore the sign of the cross-ratio can be read off from the mutual order of the image points on the real line. After multiplying the
with a suitable scalar
of norm 1 one may in addition assume that
for all
. If the quadruple
on the unit circle (punctured at
) is arranged in natural (counterclockwise) cyclic order the image quadruple
satisfies
. The relation

then shows that
. On the other hand, if one interchanges the middle pair
in a cyclically ordered quadruple then the cross-ratio will become negative because
, using the relation of cross-ratios

Summarizing the sign discussion one obtains that for a quadruple
of (pairwise different) points on the unit circle given in (counterclockwise) cyclic order one has

and

Ptolemy's relation

can now be interpreted as the algebraic relation (already used above) between cross-ratios

using the representation of the vertices
as the points
on the unit circle.
[ Corollaries
Corollary 1: Pythagoras' Theorem
In the case of a circle of unit diameter the sides
of any cyclic quadrilateral ABCD are numerically equal to the sines of the angles
and
which they subtend. Similarly the diagonals are equal to the sine of the sum of whichever pair of angles they subtend. We may then write Ptolemy's Theorem in the following trigonometric form:

Applying certain conditions to the subtended angles
and
it is possible to derive a number of important corollaries using the above as our starting point. In what follows it is important to bear in mind that the sum of angles
.
[ Corollary 1. Pythagoras' theorem
Let
and
. Then
(since opposite angles of a cyclic quadrilateral are supplementary). Then:[9]



[ Corollary 2. The law of cosines
Corollary 2: The Law of Cosines
Let
. The rectangle of corollary 1 is now a symmetrical trapezium with equal diagonals and a pair of equal sides. The parallel sides differ in length by 2x units where:

It will be easier in this case to revert to thee standard statement of Ptolemy's theorem:
![\begin{array}{lcl}\\
S_1 S_3 +S_2 S_4=\overline{AC}\cdot\overline{BD}\\
\Rightarrow S_1 S_3+S_2^2=\overline{AC}^2\\
\Rightarrow S_1[S_1-2S_2\cos(\theta_2+\theta_3)]+S_2^2=\overline{AC}^2\\
\Rightarrow S_1^2+S_2^2-2S_1S_2\cos(\theta_2+\theta_3)=\overline{AC}^2\\
\end{array}](/cgi-bin/wiki-image.mpl?image=%2F%2Fupload.wikimedia.org%2Fmath%2Ff%2Fb%2Fe%2Ffbebc06d48a31636bc2377b6c34a0c3e.png&site=wikipedia&host=http://en.wikipedia.org/)
The cosine rule for triangle ABC.
[ Corollary 3: Compound angle sine (+)
Let

Then
Source: this wikipedia article, under CC-BY-SA.