Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Law of Sines and Cosines






Solving Triangles Without a Right Angle

Right triangle trigonometry solves triangles that contain a 90°90° angle. Most triangles do not. A triangle formed by three survey markers, three cities on a map, or three forces acting on an object will almost never include a right angle. These oblique triangles — triangles with no right angle — require different tools.

The Law of Sines and the Law of Cosines are those tools. Together, they provide a complete framework for solving any triangle given sufficient information: finding unknown sides from known angles and sides, finding unknown angles from known sides, computing areas, and handling the geometric ambiguities that arise when the given data does not determine a unique triangle. The Law of Cosines generalizes the Pythagorean theorem — reducing to it exactly when one angle is 90°90° — while the Law of Sines provides a proportional relationship between sides and the sines of their opposite angles. Which law to apply depends entirely on what is known: the configuration of given sides and angles determines the starting point, and the two laws often work in sequence to complete the solution.




Triangle Notation

A standard labeling convention is used throughout triangle-solving problems. The three vertices are labeled AA, BB, CC. The side opposite each vertex is labeled with the corresponding lowercase letter: aa is opposite AA, bb is opposite BB, cc is opposite CC.

This means aa is the side between vertices BB and CC, bb is the side between AA and CC, and cc is the side between AA and BB. The convention ensures that every side-angle pair — (a,A)(a, A), (b,B)(b, B), (c,C)(c, C) — consists of a side and the angle directly across the triangle from it. This pairing is central to the Law of Sines.

The sum of the interior angles is always 180°180° (or π\pi radians):

A+B+C=180°A + B + C = 180°


This constraint means that knowing any two angles immediately gives the third. It also limits the possible configurations: at most one angle can be obtuse (greater than 90°90°), and if one angle is obtuse, the other two must both be acute.

The Law of Sines

The Law of Sines states that in any triangle, the ratio of each side to the sine of its opposite angle is constant:

asinA=bsinB=csinC\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}


Equivalently, the sines are proportional to their opposite sides:

sinAa=sinBb=sinCc\frac{\sin A}{a} = \frac{\sin B}{b} = \frac{\sin C}{c}


The common ratio asinA\frac{a}{\sin A} has a geometric interpretation: it equals the diameter of the circumscribed circle (the circle passing through all three vertices). If RR is the circumradius, then asinA=2R\frac{a}{\sin A} = 2R.

The derivation proceeds by dropping an altitude from one vertex to the opposite side. In a triangle with vertices AA, BB, CC, drop an altitude hh from CC to side cc. This altitude can be expressed two ways:

h=bsinAandh=asinBh = b\sin A \quad \text{and} \quad h = a\sin B


Setting these equal: bsinA=asinBb\sin A = a\sin B, which rearranges to asinA=bsinB\frac{a}{\sin A} = \frac{b}{\sin B}. Repeating with an altitude from a different vertex produces the full three-way equality.

The derivation works whether the triangle is acute or obtuse, though the obtuse case requires a slight adjustment (the altitude falls outside the triangle, and the supplementary angle identity sin(180°θ)=sinθ\sin(180° - \theta) = \sin\theta is invoked).

When to Use the Law of Sines

The Law of Sines requires at least one complete side-angle pair — a side and its opposite angle — to get started. Given one complete pair, the law can find any other side or angle if one additional piece of information is provided.

AAS (Angle-Angle-Side): Two angles and a non-included side are known. The third angle follows from A+B+C=180°A + B + C = 180°. Then the Law of Sines finds the remaining two sides.

Example: A=40°A = 40°, B=70°B = 70°, a=10a = 10. Then C=180°40°70°=70°C = 180° - 40° - 70° = 70°. From the Law of Sines:

10sin40°=bsin70°b=10sin70°sin40°\frac{10}{\sin 40°} = \frac{b}{\sin 70°} \quad \Rightarrow \quad b = \frac{10\sin 70°}{\sin 40°}


ASA (Angle-Side-Angle): Two angles and the included side are known. The third angle is computed first, then the Law of Sines provides the remaining sides. The distinction from AAS is organizational — the method is identical once the third angle is found.

SSA (Side-Side-Angle): Two sides and an angle opposite one of them are known. This is the only configuration where the Law of Sines is the starting tool but the solution may not be unique — the ambiguous case (see below).

The Law of Sines cannot start a solution when no complete side-angle pair is available. In SAS and SSS configurations, the Law of Cosines must be used first.

The Ambiguous Case (SSA)

    When two sides and an angle opposite one of them are given — say aa, bb, and AA — the data may determine zero, one, or two distinct triangles. This is the ambiguous case, and it arises because the Law of Sines produces a sine value for the unknown angle, and sinB=k\sin B = k (with 0<k<10 < k < 1) has two solutions in [0°,180°)[0°, 180°): one acute (B1B_1) and one obtuse (B2=180°B1B_2 = 180° - B_1).

    The analysis depends on whether AA is acute or obtuse, and on the relative sizes of aa and bb.

    When $A$ is acute: Compute the height from the vertex opposite bb: h=bsinAh = b\sin A. This is the shortest distance from that vertex to the line containing side aa.

  • a<ha < h: the side aa is too short to reach the opposite side. No triangle exists.
  • a=ha = h: the side aa just reaches, forming a right angle. Exactly one (right) triangle.
  • h<a<bh < a < b: the side aa reaches the opposite side at two different positions. Two distinct triangles exist.
  • aba \geq b: only the acute solution for BB is geometrically valid (the obtuse candidate would make A+B>180°A + B > 180°). One triangle.

  • When $A$ is obtuse:

  • aba \leq b: no triangle (the side opposite the obtuse angle must be the longest).
  • a>ba > b: exactly one triangle (the obtuse angle is at AA, so BB must be acute).

  • In practice, the safest approach is computational: use the Law of Sines to find sinB\sin B, check whether the value is valid (1\leq 1), then check whether both the acute and obtuse solutions for BB produce a valid triangle (i.e., whether A+B<180°A + B < 180° in each case).

The Law of Cosines

The Law of Cosines relates the three sides of a triangle to the cosine of one of its angles:

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C


Equivalently:

a2=b2+c22bccosAa^2 = b^2 + c^2 - 2bc\cos A

b2=a2+c22accosBb^2 = a^2 + c^2 - 2ac\cos B


Each form involves one angle and all three sides. The formula generalizes the Pythagorean theorem: when C=90°C = 90°, cosC=0\cos C = 0, and the equation reduces to c2=a2+b2c^2 = a^2 + b^2. The correction term 2abcosC-2ab\cos C accounts for the deviation from a right angle. When C<90°C < 90° (acute), cosC>0\cos C > 0, and c2<a2+b2c^2 < a^2 + b^2. When C>90°C > 90° (obtuse), cosC<0\cos C < 0, and c2>a2+b2c^2 > a^2 + b^2.

The derivation uses coordinate geometry. Place the triangle with vertex CC at the origin, side aa along the positive xx-axis. Then B=(a,0)B = (a, 0) and A=(bcosC,bsinC)A = (b\cos C, b\sin C). The distance from AA to BB is:

c=(bcosCa)2+(bsinC)2c = \sqrt{(b\cos C - a)^2 + (b\sin C)^2}


Squaring and expanding:

c2=b2cos2C2abcosC+a2+b2sin2C=a2+b2(cos2C+sin2C)2abcosCc^2 = b^2\cos^2 C - 2ab\cos C + a^2 + b^2\sin^2 C = a^2 + b^2(\cos^2 C + \sin^2 C) - 2ab\cos C


Since cos2C+sin2C=1\cos^2 C + \sin^2 C = 1 (the Pythagorean identity):

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C

When to Use the Law of Cosines

The Law of Cosines is the starting tool when no complete side-angle pair is available — that is, when the Law of Sines cannot begin.

SAS (Side-Angle-Side): Two sides and the included angle are known. The Law of Cosines directly computes the third side. Once all three sides and one angle are known, the remaining angles can be found using the Law of Sines (or the Law of Cosines again).

Example: a=8a = 8, b=6b = 6, C=50°C = 50°. Find cc:

c2=82+622(8)(6)cos50°=64+3696cos50°10061.7=38.3c^2 = 8^2 + 6^2 - 2(8)(6)\cos 50° = 64 + 36 - 96\cos 50° \approx 100 - 61.7 = 38.3


c6.19c \approx 6.19


SSS (Side-Side-Side): All three sides are known, and the angles must be found. Rearrange the Law of Cosines to solve for an angle:

cosC=a2+b2c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab}


Compute cosC\cos C, then apply arccosine to find CC. Repeat for another angle, or use A+B+C=180°A + B + C = 180° for the third.

A practical strategy for SSS: find the largest angle first (the one opposite the longest side). If its cosine is negative, the angle is obtuse, and the triangle contains an obtuse angle. If positive, all angles are acute. Finding the largest angle first resolves this question immediately, and the remaining angles (which must be acute) can be found more safely with the Law of Sines — since arcsine of a positive value always gives an acute angle, there is no ambiguity.

Choosing Between the Two Laws

    The decision framework is straightforward and depends entirely on what information is available:

    Start with the Law of Sines when:

  • In each of these, at least one complete side-angle pair (a,A)(a, A) is either given or immediately obtainable.

    Start with the Law of Cosines when:

  • In these configurations, no complete pair exists until after the first computation.

    In combination: Many problems require both laws. A typical SAS problem uses the Law of Cosines to find the third side, then switches to the Law of Sines for the remaining angles (which is faster than applying the Law of Cosines twice more). A typical SSS problem uses the Law of Cosines for the first (largest) angle, then switches to the Law of Sines for efficiency.

    Configuration not possible:

  • Any other combination of three pieces of information (out of three sides and three angles) falls into one of the cases above and is solvable by the appropriate law or combination.

Area of a Triangle Using Trigonometry

The standard area formula A=12×base×heightA = \frac{1}{2} \times \text{base} \times \text{height} requires knowing the height, which is often not directly given. Trigonometry provides an alternative that uses two sides and the included angle:

A=12absinCA = \frac{1}{2}ab\sin C


where aa and bb are two sides and CC is the angle between them.

The derivation is direct. Drop an altitude hh from vertex CC to side cc. Then h=asinBh = a\sin B (from the right triangle formed). But the formula is more naturally derived as h=bsinAh = b\sin A from one perspective or h=asinBh = a\sin B from another. Using h=bsinAh = b\sin A:

Area=12×a×h=12×a×bsinC\text{Area} = \frac{1}{2} \times a \times h = \frac{1}{2} \times a \times b\sin C


This holds for all triangles — acute, right, or obtuse. For a right triangle with C=90°C = 90°, sinC=1\sin C = 1, and the formula reduces to 12ab\frac{1}{2}ab, consistent with the standard formula (where aa and bb are the legs).

The formula requires exactly the SAS configuration: two sides and the included angle. If other configurations are given, the missing information must be found first using the Law of Sines or Law of Cosines.

Note that sinC>0\sin C > 0 for all valid triangle angles (0°<C<180°0° < C < 180°), so the area is always positive. The area is maximized when C=90°C = 90° (for fixed side lengths), since sinC\sin C achieves its maximum at 90°90°.

Heron's Formula

When all three sides of a triangle are known but no angle has been computed, the area can be found directly using Heron's formula — without first finding any angle.

Compute the semi-perimeter:

s=a+b+c2s = \frac{a + b + c}{2}


Then the area is:

A=s(sa)(sb)(sc)A = \sqrt{s(s-a)(s-b)(s-c)}


Example: A triangle with sides a=5a = 5, b=7b = 7, c=9c = 9.

s=5+7+92=212=10.5s = \frac{5 + 7 + 9}{2} = \frac{21}{2} = 10.5


A=10.5×5.5×3.5×1.5=10.5×5.5×3.5×1.5A = \sqrt{10.5 \times 5.5 \times 3.5 \times 1.5} = \sqrt{10.5 \times 5.5 \times 3.5 \times 1.5}


=303.187517.41= \sqrt{303.1875} \approx 17.41


Heron's formula can be derived from the trigonometric area formula 12absinC\frac{1}{2}ab\sin C combined with the Law of Cosines. Express cosC\cos C in terms of the sides, use sin2C=1cos2C\sin^2 C = 1 - \cos^2 C to find sinC\sin C, substitute into the area formula, and simplify. The algebra is substantial but the result is elegant.

The formula has the advantage of requiring only side lengths — no angles, no trigonometric function evaluations. It is useful when the sides are given numerically and the area is the only quantity sought. Its disadvantage is that it provides no angle information; if angles are also needed, the Law of Cosines is a more efficient starting point.

A validity check: sas - a, sbs - b, and scs - c must all be positive. If any of them is zero or negative, the three given lengths do not form a valid triangle (they violate the triangle inequality).

Applications

The Law of Sines and Law of Cosines apply wherever distances or angles must be determined indirectly — situations where direct measurement is impossible or impractical.

Surveying and land measurement. A surveyor measures two distances and the angle between them (SAS) to determine the third distance — for example, the width of a river or the length of a property boundary obscured by terrain. Alternatively, from two known positions a measured distance apart, a surveyor observes the angles to a remote point (ASA) and computes the distance to it.

Navigation. A ship or aircraft determines its position by measuring bearings (angles) to two known landmarks. The triangle formed by the vessel and the two landmarks is solved using the Law of Sines (typically an AAS or ASA configuration), yielding the distances from the vessel to each landmark.

Physics and engineering. Forces acting at angles are resolved using the Law of Cosines. Two forces of known magnitudes acting at a known angle produce a resultant whose magnitude is computed by treating the force vectors as sides of a triangle — the Law of Cosines gives the resultant magnitude, and the Law of Sines gives the angle the resultant makes with each component force.

Indirect measurement. The height of a mountain, the distance to a star (via parallax), or the span of a bridge can be determined by measuring accessible distances and angles and solving the resulting triangle. Each problem reduces to identifying the triangle, classifying the known information (AAS, ASA, SAS, SSA, SSS), and applying the appropriate law.

In every application, the first step is geometric: identify the triangle, label the known and unknown elements, and determine which law applies. The computation follows mechanically from there.