Solution of triangles () is the main
trigonometric problem of finding the characteristics of a
triangle
A triangle is a polygon with three corners and three sides, one of the basic shapes in geometry. The corners, also called ''vertices'', are zero-dimensional points while the sides connecting them, also called ''edges'', are one-dimension ...
(angles and lengths of sides), when some of these are known. The triangle can be located on a
plane or on a
sphere
A sphere (from Ancient Greek, Greek , ) is a surface (mathematics), surface analogous to the circle, a curve. In solid geometry, a sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
. Applications requiring triangle solutions include
geodesy
Geodesy or geodetics is the science of measuring and representing the Figure of the Earth, geometry, Gravity of Earth, gravity, and Earth's rotation, spatial orientation of the Earth in Relative change, temporally varying Three-dimensional spac ...
,
astronomy
Astronomy is a natural science that studies celestial objects and the phenomena that occur in the cosmos. It uses mathematics, physics, and chemistry in order to explain their origin and their overall evolution. Objects of interest includ ...
,
construction
Construction are processes involved in delivering buildings, infrastructure, industrial facilities, and associated activities through to the end of their life. It typically starts with planning, financing, and design that continues until the a ...
, and
navigation
Navigation is a field of study that focuses on the process of monitoring and controlling the motion, movement of a craft or vehicle from one place to another.Bowditch, 2003:799. The field of navigation includes four general categories: land navig ...
.
Solving plane triangles
A general form triangle has six main characteristics (see picture): three linear (side lengths ) and three angular (). The classical plane trigonometry problem is to specify three of the six characteristics and determine the other three. A triangle can be uniquely determined in this sense when given any of the following:
*Three sides (SSS)
*Two sides and the included angle (SAS, side-angle-side)
*Two sides and an angle not included between them (SSA), if the side length adjacent to the angle is shorter than the other side length.
*A side and the two angles adjacent to it (ASA)
*A side, the angle opposite to it and an angle adjacent to it (AAS).
For all cases in the plane, at least one of the side lengths must be specified. If only the angles are given, the side lengths cannot be determined, because any
similar triangle is a solution.
Trigonomic relations

The standard method of solving the problem is to use fundamental relations.
;
Law of cosines
In trigonometry, the law of cosines (also known as the cosine formula or cosine rule) relates the lengths of the sides of a triangle to the cosine of one of its angles. For a triangle with sides , , and , opposite respective angles , , and (see ...
;
Law of sines
In trigonometry, the law of sines (sometimes called the sine formula or sine rule) is a mathematical equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\ ...
;
Sum of angles:
;
Law of tangents
There are other (sometimes practically useful) universal relations: the
law of cotangents and
Mollweide's formula
In trigonometry, Mollweide's formula is a pair of relationships between sides and angles in a triangle.
A variant in more geometrical style was first published by Isaac Newton in 1707 and then by in 1746. Thomas Simpson published the now-stan ...
.
Notes
#To find an unknown angle, the
law of cosines
In trigonometry, the law of cosines (also known as the cosine formula or cosine rule) relates the lengths of the sides of a triangle to the cosine of one of its angles. For a triangle with sides , , and , opposite respective angles , , and (see ...
is safer than the
law of sines
In trigonometry, the law of sines (sometimes called the sine formula or sine rule) is a mathematical equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\ ...
. The reason is that the value of
sine
In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side opposite th ...
for the angle of the triangle does not uniquely determine this angle. For example, if , the angle can equal either 30° or 150°. Using the law of cosines avoids this problem: within the interval from 0° to 180° the cosine value unambiguously determines its angle. On the other hand, if the angle is small (or close to 180°), then it is more robust numerically to determine it from its sine than its cosine because the arc-cosine function has a divergent derivative at 1 (or −1).
#We assume that the relative position of specified characteristics is known. If not, the mirror reflection of the triangle will also be a solution. For example, three side lengths uniquely define either a triangle or its reflection.
Three sides given (SSS)
Let three side lengths be specified. To find the angles , the
law of cosines
In trigonometry, the law of cosines (also known as the cosine formula or cosine rule) relates the lengths of the sides of a triangle to the cosine of one of its angles. For a triangle with sides , , and , opposite respective angles , , and (see ...
can be used:
Then angle .
Some sources recommend to find angle from the
law of sines
In trigonometry, the law of sines (sometimes called the sine formula or sine rule) is a mathematical equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\ ...
but (as Note 1 above states) there is a risk of confusing an acute angle value with an obtuse one.
Another method of calculating the angles from known sides is to apply the
law of cotangents.
Area using
Heron's formula
In geometry, Heron's formula (or Hero's formula) gives the area of a triangle in terms of the three side lengths Letting be the semiperimeter of the triangle, s = \tfrac12(a + b + c), the area is
A = \sqrt.
It is named after first-century ...
:
where
Heron's formula without using the semiperimeter:
Two sides and the included angle given (SAS)
Here the lengths of sides and the angle between these sides are known. The third side can be determined from the law of cosines:
Now we use law of cosines to find the second angle:
Finally, .
Two sides and non-included angle given (SSA)
This case is not solvable in all cases; a solution is guaranteed to be unique only if the side length adjacent to the angle is shorter than the other side length. Assume that two sides and the angle are known. The equation for the angle can be implied from the
law of sines
In trigonometry, the law of sines (sometimes called the sine formula or sine rule) is a mathematical equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\ ...
:
We denote further (the equation's right side). There are four possible cases:
#If , no such triangle exists because the side does not reach line . For the same reason a solution does not exist if the angle and .
#If , a unique solution exists: , i.e., the triangle is
right-angled.
# If two alternatives are possible.
## If , then (the larger side corresponds to a larger angle). Since no triangle can have two obtuse angles, is an acute angle and the solution is unique.
## If , the angle may be acute: or obtuse: . The figure on right shows the point , the side and the angle as the first solution, and the point , side and the angle as the second solution.
Once is obtained, the third angle .
The third side can then be found from the law of sines:
or from the law of cosines:
A side and two adjacent angles given (ASA)
The known characteristics are the side and the angles . The third angle .
Two unknown sides can be calculated from the law of sines:
A side, one adjacent angle and the opposite angle given (AAS)
The procedure for solving an AAS triangle is same as that for an ASA triangle: First, find the third angle by using the angle sum property of a triangle, then find the other two sides using the
law of sines
In trigonometry, the law of sines (sometimes called the sine formula or sine rule) is a mathematical equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\ ...
.
Other given lengths
In many cases, triangles can be solved given three pieces of information some of which are the lengths of the triangle's
medians,
altitudes
Altitude is a distance measurement, usually in the vertical or "up" direction, between a reference datum and a point or object. The exact definition and reference datum varies according to the context (e.g., aviation, geometry, geographical s ...
, or
angle bisectors. Posamentier and Lehmann list the results for the question of solvability using no higher than square roots (i.e.,
constructibility) for each of the 95 distinct cases; 63 of these are constructible.
Solving spherical triangles

The general
spherical triangle
Spherical trigonometry is the branch of spherical geometry that deals with the metrical relationships between the sides and angles of spherical triangles, traditionally expressed using trigonometric functions. On the sphere, geodesics are gre ...
is fully determined by three of its six characteristics (3 sides and 3 angles). The lengths of the sides of a spherical triangle are their
central angles, measured in angular units rather than linear units. (On a unit sphere, the angle (in
radians) and length around the sphere are numerically the same. On other spheres, the angle (in radians) is equal to the length around the sphere divided by the radius.)
Spherical geometry
300px, A sphere with a spherical triangle on it.
Spherical geometry or spherics () is the geometry of the two-dimensional surface of a sphere or the -dimensional surface of higher dimensional spheres.
Long studied for its practical applicati ...
differs from planar
Euclidean geometry
Euclidean geometry is a mathematical system attributed to ancient Greek mathematics, Greek mathematician Euclid, which he described in his textbook on geometry, ''Euclid's Elements, Elements''. Euclid's approach consists in assuming a small set ...
, so the solution of spherical triangles is built on different rules. For example, the
sum of the three angles depends on the size of the triangle. In addition,
similar triangles
In Euclidean geometry, two objects are similar if they have the same shape, or if one has the same shape as the mirror image of the other. More precisely, one can be obtained from the other by uniformly scaling (enlarging or reducing), possibly ...
cannot be unequal, so the problem of constructing a triangle with specified three angles has a unique solution. The basic relations used to solve a problem are similar to those of the planar case: see
Spherical law of cosines and
Spherical law of sines.
Among other relationships that may be useful are the
half-side formula and
Napier's analogies:
Napier's Analogies
at MathWorld
Three sides given (spherical SSS)
Known: the sides (in angular units). The triangle's angles are computed using the spherical law of cosines:
Two sides and the included angle given (spherical SAS)
Known: the sides and the angle between them. The side can be found from the spherical law of cosines:
The angles can be calculated as above, or by using Napier's analogies:
This problem arises in the navigation problem of finding the great circle between two points on the earth specified by their latitude and longitude; in this application, it is important to use formulas which are not susceptible to round-off errors. For this purpose, the following formulas (which may be derived using vector algebra) can be used:
where the signs of the numerators and denominators in these expressions should be used to determine the quadrant of the arctangent.
Two sides and non-included angle given (spherical SSA)
This problem is not solvable in all cases; a solution is guaranteed to be unique only if the side length adjacent to the angle is shorter than the other side length. Known: the sides and the angle not between them. A solution exists if the following condition holds:
The angle can be found from the spherical law of sines:
As for the plane case, if then there are two solutions: and .
We can find other characteristics by using Napier's analogies:
A side and two adjacent angles given (spherical ASA)
Known: the side and the angles . First we determine the angle using the spherical law of cosines:
We can find the two unknown sides from the spherical law of cosines (using the calculated angle ):
or by using Napier's analogies:
A side, one adjacent angle and the opposite angle given (spherical AAS)
Known: the side and the angles . The side can be found from the spherical law of sines:
If the angle for the side is acute and , another solution exists:
We can find other characteristics by using Napier's analogies:
Three angles given (spherical AAA)
Known: the angles . From the spherical law of cosines we infer:
Solving right-angled spherical triangles
The above algorithms become much simpler if one of the angles of a triangle (for example, the angle ) is the right angle. Such a spherical triangle is fully defined by its two elements, and the other three can be calculated using Napier's Pentagon or the following relations.
: (from the spherical law of sines)
:
: (from the spherical law of cosines)
:
: (also from the spherical law of cosines)
:
Some applications
Triangulation
If one wants to measure the distance from shore to a remote ship via triangulation, one marks on the shore two points with known distance between them (the baseline). Let be the angles between the baseline and the direction to the ship.
From the formulae above (ASA case, assuming planar geometry) one can compute the distance as the triangle height:
For the spherical case, one can first compute the length of side from the point at to the ship (i.e. the side opposite to ) via the ASA formula
and insert this into the AAS formula for the right subtriangle that contains the angle and the sides and :
(The planar formula is actually the first term of the Taylor expansion of of the spherical solution in powers of .)
This method is used in cabotage. The angles are defined by observation of familiar landmarks from the ship.
As another example, if one wants to measure the height of a mountain or a high building, the angles from two ground points to the top are specified. Let be the distance between these points. From the same ASA case formulas we obtain:
The distance between two points on the globe
To calculate the distance between two points on the globe,
:Point A: latitude , longitude , and
:Point B: latitude , longitude
we consider the spherical triangle , where is the North Pole. Some characteristics are:
If two sides and the included angle given, we obtain from the formulas
Here is the Earth's radius
Earth radius (denoted as ''R''🜨 or ''R''E) is the distance from the center of Earth to a point on or near its surface. Approximating the figure of Earth by an Earth spheroid (an oblate ellipsoid), the radius ranges from a maximum (equato ...
.
See also
* Congruence
*Hansen's problem
In trigonometry, Hansen's problem is a problem in planar surveying, named after the astronomer Peter Andreas Hansen (1795–1874), who worked on the geodetic survey of Denmark. There are two known points , and two unknown points . From and ...
* Hinge theorem
*Lénárt sphere
A Lénárt sphere is an educational manipulative and writing surface for exploring spherical geometry, invented by Hungarian István Lénárt as a modern replacement for a spherical blackboard. It can be used for visualizing the geometry of poi ...
*Snellius–Pothenot problem
In trigonometry, the Snellius–Pothenot problem is a problem first described in the context of planar surveying. Given three known points , an observer at an unknown point observes that the line segment subtends an angle and the segment sub ...
References
*{{cite book , author=Euclid , author-link=Euclid , editor=Sir Thomas Heath , editor-link=Thomas Little Heath , title=The Thirteen Books of the Elements. Volume I , others=Translated with introduction and commentary , publisher=Dover , year=1956 , orig-year=1925 , isbn=0-486-60088-2 , url-access=registration , url=https://archive.org/details/thirteenbooksofe00eucl
External links
Trigonometric Delights
by Eli Maor, Princeton University Press, 1998. Ebook version, in PDF format, full text presented.
Trigonometry
by Alfred Monroe Kenyon and Louis Ingold, The Macmillan Company, 1914. In images, full text presented. Google book.
*
' on Math World.
Includes discussion of The Napier circle and Napier's rules
Spherical Trigonometry — for the use of colleges and schools
by I. Todhunter, M.A., F.R.S. Historical Math Monograph posted b
*
' – Triangle solver. Solve any plane triangle problem with the minimum of input data. Drawing of the solved triangle.
*
' – Free software to solve the spherical triangles, configurable to different practical applications and configured for gnomonic.
*
' – Solves spherical triangles.
*
TrianCal
' – Triangles solver by Jesus S.
Jesus (AD 30 or 33), also referred to as Jesus Christ, Jesus of Nazareth, and many Names and titles of Jesus in the New Testament, other names and titles, was a 1st-century Jewish preacher and religious leader. He is the Jesus in Chris ...
Spherical trigonometry
Triangle problems
Trigonometry
de:Dreieck#Berechnung eines beliebigen Dreiecks