Mathwords logoMathwords

Law of Cotangents — Definition, Formula & Example

The Law of Cotangents is a triangle rule that gives the cotangent of half of each angle using only the three side lengths. To recover an angle, you take the inverse cotangent of that value and then double it.

In a triangle with sides aa, bb, cc opposite angles AA, BB, CC, semiperimeter s=a+b+c2s = \tfrac{a+b+c}{2}, and inradius rr, each half-angle satisfies cot⁡A2=s−ar\cot\tfrac{A}{2} = \tfrac{s-a}{r}, and likewise for BB and CC. The reason is geometric. The incenter lies on the bisector of angle AA, and the two tangent segments from vertex AA to the inscribed circle each have length s−as-a. This forms a right triangle with legs rr and s−as-a and with angle A2\tfrac{A}{2} at vertex AA.

Key Formula

cot⁡(A/2)s−a=cot⁡(B/2)s−b=cot⁡(C/2)s−c=1r,r=(s−a)(s−b)(s−c)s\frac{\cot(A/2)}{s-a} = \frac{\cot(B/2)}{s-b} = \frac{\cot(C/2)}{s-c} = \frac{1}{r}, \qquad r = \sqrt{\frac{(s-a)(s-b)(s-c)}{s}}
Where:
  • a,b,ca, b, c = Side lengths of the triangle
  • A,B,CA, B, C = Angles opposite sides a, b, c
  • ss = Semiperimeter, (a + b + c)/2
  • rr = Inradius, the radius of the circle inscribed in the triangle

Worked Example

Problem: A triangular garden bed has sides a = 13 ft, b = 14 ft, and c = 15 ft. Use the Law of Cotangents to find all three angles.
Step 1: Find the semiperimeter, then the inradius.
s=13+14+152=21,r=(8)(7)(6)21=16=4s = \frac{13+14+15}{2} = 21, \qquad r = \sqrt{\frac{(8)(7)(6)}{21}} = \sqrt{16} = 4
Step 2: Divide each value of s minus a side by r. Each result is the cotangent of a half-angle, not the angle itself.
cot⁡A2=84=2,cot⁡B2=74,cot⁡C2=64=32\cot\tfrac{A}{2} = \tfrac{8}{4} = 2, \quad \cot\tfrac{B}{2} = \tfrac{7}{4}, \quad \cot\tfrac{C}{2} = \tfrac{6}{4} = \tfrac{3}{2}
Step 3: Invert each cotangent and double the result. Because cot x = 1/tan x, you can use the inverse tangent of the reciprocal.
A=2tan⁡−1 ⁣(12)≈53.13∘,B=2tan⁡−1 ⁣(47)≈59.49∘,C=2tan⁡−1 ⁣(23)≈67.38∘A = 2\tan^{-1}\!\left(\tfrac{1}{2}\right) \approx 53.13^\circ, \quad B = 2\tan^{-1}\!\left(\tfrac{4}{7}\right) \approx 59.49^\circ, \quad C = 2\tan^{-1}\!\left(\tfrac{2}{3}\right) \approx 67.38^\circ
Answer: A ≈ 53.13°, B ≈ 59.49°, C ≈ 67.38°. As a check, the angles add up to 180.00°.

Why It Matters

When you know all three sides (SSS), the Law of Cotangents finds every angle from one square root, the inradius r. The Law of Cosines instead needs a separate calculation for each angle. In precalculus and in competition geometry, it also links a triangle's angles directly to its inscribed circle. That link is useful in problems about area, since area = rs.

Common Mistakes

Mistake: Treating (s − a)/r as the angle A, or taking the inverse cotangent and forgetting to double.
Correction: The quotient (s − a)/r equals cot(A/2). First apply the inverse cotangent to get A/2, then multiply by 2. If your three angles do not add to 180°, check this step first.

Related Terms

  • Law of Cosines — Solves the same SSS triangles one angle at a time
  • Cotangent — The ratio this law returns for each half-angle
  • Cosine — Used in the Law of Cosines to cross-check these angles
  • Circle Trig Definitions — Defines cotangent as cosine over sine for inverting
  • Inverse Cotangent — Used to turn the half-angle cotangent into an angle