A general form triangle has six main characteristics (see picture): three linear (side lengths *a*, *b*, *c*) 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**)
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**).
Three angles (**AAA**) on the sphere (but not in the plane).
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.

The standard method of solving the problem is to use fundamental relations.

Law of cosines
a
2
=
b
2
+
c
2
−
2
b
c
cos
α
b
2
=
a
2
+
c
2
−
2
a
c
cos
β
c
2
=
a
2
+
b
2
−
2
a
b
cos
γ
Law of sines
a
sin
α
=
b
sin
β
=
c
sin
γ
Sum of angles
α
+
β
+
γ
=
180
∘
Law of tangents
a
−
b
a
+
b
=
t
a
n
[
1
2
(
α
−
β
)
]
t
a
n
[
1
2
(
α
+
β
)
]
.
There are other (sometimes practically useful) universal relations: the law of cotangents and Mollweide's formula.

- To find an unknown angle, the law of cosines is safer than the law of sines. The reason is that the value of sine for the angle of the triangle does not uniquely determine this angle. For example, if sin
*β* = 0.5, 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.

Let three side lengths *a*, *b*, *c* be specified. To find the angles *α*, *β*, the law of cosines can be used:

α
=
arccos
b
2
+
c
2
−
a
2
2
b
c
β
=
arccos
a
2
+
c
2
−
b
2
2
a
c
.

Then angle *γ* = 180° − *α* − *β*.

Some sources recommend to find angle *β* from the law of sines 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.

Here the lengths of sides *a*, *b* and the angle *γ* between these sides are known. The third side can be determined from the law of cosines:

c
=
a
2
+
b
2
−
2
a
b
cos
γ
.
Now we use law of cosines to find the second angle:

α
=
arccos
b
2
+
c
2
−
a
2
2
b
c
.
Finally, *β* = 180° − *α* − *γ*.

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 *b*, *c* and the angle *β* are known. The equation for the angle *γ* can be implied from the law of sines:

sin
γ
=
c
b
sin
β
.

We denote further *D* = *c*/*b* sin *β* (the equation's right side). There are four possible cases:

- If
*D* > 1, no such triangle exists because the side *b* does not reach line *BC*. For the same reason a solution does not exist if the angle *β* ≥ 90° and *b* ≤ *c*.
- If
*D* = 1, a unique solution exists: *γ* = 90°, i.e., the triangle is right-angled.
- If
*D* < 1 two alternatives are possible.
- If
*b* ≥ *c* then *β* ≥ *γ* (the larger side corresponds to a larger angle). Since no triangle can have two obtuse angles, *γ* is an acute angle and the solution *γ* = arcsin *D* is unique.
- If
*b* < *c*, the angle *γ* may be acute: *γ* = arcsin *D* or obtuse: *γ′* = 180° - *γ*. The picture on right shows the point *C*, the side *b* and the angle *γ* as the first solution, and the point *C′*, side *b′* and the angle *γ′* as the second solution.

Once *γ* is obtained, the third angle *α* = 180° − *β* − *γ*.

The third side can then be found from the law of sines:

a
=
b
sin
α
sin
β
or

a
=
c
cos
β
±
b
2
−
c
2
sin
2
β
The known characteristics are the side *c* and the angles *α*, *β*. The third angle *γ* = 180° − *α* − *β*.

Two unknown side can be calculated from the law of sines:

a
=
c
sin
α
sin
γ
;
b
=
c
sin
β
sin
γ
.
or

a
=
c
sin
α
(
sin
α
cos
β
+
sin
β
cos
α
)
b
=
c
sin
β
(
sin
α
cos
β
+
sin
β
cos
α
)

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.

The general spherical triangle is fully determined by three of its six characteristics (3 sides and 3 angles). Note that the sides *a*, *b*, *c* of a spherical triangle are measured by angular rather than linear units, based on the corresponding central angles.

The solution of triangles for non-Euclidean spherical geometry has some differences from the planar case. For example, the sum of the three angles *α* + *β* + *γ* depends on the triangle. In addition, there are no unequal similar triangles, and 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 Law of cosines (spherical) and Law of sines (spherical).

Among other relationships that may be useful are the half-side formula and Napier's analogies:

tan
c
2
cos
α
−
β
2
=
tan
a
+
b
2
cos
α
+
β
2
tan
c
2
sin
α
−
β
2
=
tan
a
−
b
2
sin
α
+
β
2
cot
γ
2
cos
a
−
b
2
=
tan
α
+
β
2
cos
a
+
b
2
cot
γ
2
sin
a
−
b
2
=
tan
α
−
β
2
sin
a
+
b
2
.
Known: the sides *a*, *b*, *c* (in angular units). The triangle's angles are computed from the spherical law of cosines:

α
=
arccos
(
cos
a
−
cos
b
cos
c
sin
b
sin
c
)
,
β
=
arccos
(
cos
b
−
cos
c
cos
a
sin
c
sin
a
)
,
γ
=
arccos
(
cos
c
−
cos
a
cos
b
sin
a
sin
b
)
.
Known: the sides *a*, *b* and the angle *γ* between them. The side *c* can be found from the law of cosines:

c
=
arccos
(
cos
a
cos
b
+
sin
a
sin
b
cos
γ
)
.
The angles *α',* β *can be calculated as above, or by using Napier's analogies:*

α
=
arctan
2
sin
a
tan
(
γ
2
)
sin
(
b
+
a
)
+
cot
(
γ
2
)
sin
(
b
−
a
)
,
β
=
arctan
2
sin
b
tan
(
γ
2
)
sin
(
a
+
b
)
+
cot
(
γ
2
)
sin
(
a
−
b
)
.

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:

c
=
arctan
(
sin
a
cos
b
−
cos
a
sin
b
cos
γ
)
2
+
(
sin
b
sin
γ
)
2
cos
a
cos
b
+
sin
a
sin
b
cos
γ
,
α
=
arctan
sin
a
sin
γ
sin
b
cos
a
−
cos
b
sin
a
cos
γ
,
β
=
arctan
sin
b
sin
γ
sin
a
cos
b
−
cos
a
sin
b
cos
γ
,
where the signs of the numerators and denominators in these expressions should be used to determine the quadrant of the arctangent.

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 *b*, *c* and the angle *β* not between them. A solution exists if the following condition holds:

b
>
arcsin
(
sin
c
sin
β
)
.
The angle *γ* can be found from the spherical law of sines:

γ
=
arcsin
(
sin
c
sin
β
sin
b
)
.
As for the plane case, if *b* < *c* then there are two solutions: *γ* and 180° - *γ*.

We can find other characteristics by using Napier's analogies:

a
=
2
arctan
[
tan
(
1
2
(
b
−
c
)
)
sin
(
1
2
(
β
+
γ
)
)
sin
(
1
2
(
β
−
γ
)
)
]
,
α
=
2
arccot
[
tan
(
1
2
(
β
−
γ
)
)
sin
(
1
2
(
b
+
c
)
)
sin
(
1
2
(
b
−
c
)
)
]
.
Known: the side *c* and the angles *α*, *β*. First we determine the angle *γ* using the law of cosines:

γ
=
arccos
(
sin
α
sin
β
cos
c
−
cos
α
cos
β
)
.

We can find the two unknown sides from the law of cosines (using the calculated angle *γ*):

a
=
arccos
(
cos
α
+
cos
β
cos
γ
sin
β
sin
γ
)
,
b
=
arccos
(
cos
β
+
cos
γ
cos
α
sin
γ
sin
α
)
,
or by using Napier's analogies:

a
=
arctan
[
2
sin
α
cot
(
c
2
)
sin
(
β
+
α
)
+
tan
(
c
2
)
sin
(
β
−
α
)
]
,
b
=
arctan
[
2
sin
β
cot
(
c
2
)
sin
(
α
+
β
)
+
tan
(
c
2
)
sin
(
α
−
β
)
]
.
Known: the side *a* and the angles *α*, *β*. The side *b* can be found from the law of sines:

b
=
arcsin
(
sin
a
sin
β
sin
α
)
.
If the angle for the side *a* is acute and *α* > *β*, another solution exists:

b
=
π
−
arcsin
(
sin
a
sin
β
sin
α
)
.
We can find other characteristics by using Napier's analogies:

c
=
2
arctan
[
tan
(
1
2
(
a
−
b
)
)
sin
(
1
2
(
α
+
β
)
)
sin
(
1
2
(
α
−
β
)
)
]
,
γ
=
2
arccot
[
tan
(
1
2
(
α
−
β
)
)
sin
(
1
2
(
a
+
b
)
)
sin
(
1
2
(
a
−
b
)
)
]
.
Known: the angles *α*, *β*, *γ*. From the law of cosines we infer:

a
=
arccos
(
cos
α
+
cos
β
cos
γ
sin
β
sin
γ
)
,
b
=
arccos
(
cos
β
+
cos
γ
cos
α
sin
γ
sin
α
)
,
c
=
arccos
(
cos
γ
+
cos
α
cos
β
sin
α
sin
β
)
.
The above algorithms become much simpler if one of the angles of a triangle (for example, the angle *C*) 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.

sin
a
=
sin
c
⋅
sin
A
(from the Law of sines (spherical))

tan
a
=
sin
b
⋅
tan
A
cos
c
=
cos
a
⋅
cos
b
(from the law of cosines (spherical))

tan
b
=
tan
c
⋅
cos
A
cos
A
=
cos
a
⋅
sin
B
(also from the law of cosines)

cos
c
=
cot
A
⋅
cot
B

If one wants to measure the distance *d* from shore to a remote ship via triangulation, one marks on the shore two points with known distance *l* between them (the baseline). Let *α*, *β* be the angles between the baseline and the direction to the ship.

From the formulae above (ASA case) one can define the length of the triangle height:

d
=
sin
α
sin
β
sin
(
α
+
β
)
l
=
tan
α
tan
β
tan
α
+
tan
β
l
.
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 *h* of a mountain or a high building, the angles *α*, *β* from two ground points to the top are specified. Let *l* be the distance between these points. From the same ASA case formulas we obtain:

h
=
sin
α
sin
β
sin
(
β
−
α
)
l
=
tan
α
tan
β
tan
β
−
tan
α
l
.
To calculate the distance between two points on the globe,

Point A: latitude

*λ*_{A}, longitude

*L*_{A}, and
Point B: latitude

*λ*_{B}, longitude

*L*_{B}
we consider the spherical triangle *ABC*, where *C* is the North Pole. Some characteristics are:

a
=
90
o
−
λ
B
,
b
=
90
o
−
λ
A
,
γ
=
L
A
−
L
B
.
If two sides and the included angle given, we obtain from the formulas

A
B
=
R
arccos
[
sin
λ
A
sin
λ
B
+
cos
λ
A
cos
λ
B
cos
(
L
A
−
L
B
)
]
.

Here *R* is the Earth's radius.