Home/Math, Geometry & STEM Science Utilities/Triangle Area, Hypotenuse & Law of Cosines Solver

Triangle Area, Hypotenuse & Law of Cosines Solver

Solve SSS, SAS, ASA, AAS, SSA, and right triangles with real-time SVG geometry rendering, Heron's area formula, and inradius/circumradius analytics.

Geometry Input Parameters

Angle Unit:
Side Lengths (a, b, c)
Decimal Precision:
Valid Triangle Geometry SolvedScaleneAcute
Euclidean 2D PlaneLaw of Cosines & Sines Engine

Calculated Metrics & Dynamic SVG

Acute Triangle
Dynamic 2D Vector Projection
ABC
Enclosed Area (A)
14.6969

Square Units

Perimeter (P)
18

Semi-perimeter (s): 9

Side a5
Side b6
Side c7
Angle α (Alpha)44.4153°deg
Angle β (Beta)57.1217°deg
Angle γ (Gamma)78.463°deg
Advanced Radii & AltitudesPrecision: 4dp
Inradius (r): 1.633
Circumradius (R): 3.5722
Height h_a: 5.8788
Median m_a: 6.0208

Master Trigonometry & Triangle Theorem Matrix

In Euclidean plane geometry, a triangle is fully determined by three independent parameters (at least one of which must be a side length). The system uses the following mathematical taxonomy to evaluate congruence, calculate missing sides and interior angles, and verify topological existence:

Theorem / Given SetupMathematical Governing FormulaExistence ConstraintUnique Solutions
SSS (Side-Side-Side)cos(γ) = (a² + b² - c²) / (2ab)a + b > c, a + c > b, b + c > a1 Unique
SAS (Side-Angle-Side)c² = a² + b² - 2ab·cos(γ)0° < γ < 180° and a, b > 01 Unique
ASA (Angle-Side-Angle)a / sin(α) = c / sin(180° - α - β)α + β < 180° and c > 01 Unique
AAS (Angle-Angle-Side)b = (a·sin(β)) / sin(α)α + β < 180° and a > 01 Unique
SSA (Side-Side-Angle)sin(β) = (b·sin(α)) / aAltitude h = b·sin(α)0, 1, or 2 (Ambiguous)
Right Triangle (Pythagorean)c² = a² + b², Area = ½abγ = 90° (Hypotenuse c > legs)1 Unique

Geometric Formula Index & Analytical Derivations

This calculator solves for more than simple side lengths and angles. It computes complete triangle metrics including inradii, circumradii, altitudes, medians, and angle bisectors using these verified formulas:

Area Formulations

  • Heron: A = √(s(s-a)(s-b)(s-c))
  • Trig: A = ½ · a · b · sin(γ)
  • Base-Height: A = ½ · base · height
  • Semi-Perimeter: s = (a + b + c) / 2

Circular Boundaries

  • Inradius (r): r = Area / s
  • Circumradius (R): R = (a · b · c) / (4 · Area)
  • Incircle Area: A_in = π · r²
  • Circumcircle Area: A_circ = π · R²

Altitudes & Medians

  • Altitude h_a: (2 · Area) / a
  • Median m_a: ½√(2b² + 2c² - a²)
  • Bisector t_a: (2√(bc·s(s-a))) / (b+c)
  • Perimeter: P = a + b + c

Cartesian Derivation of the Law of Cosines

Consider triangle ΔABC placed on a 2D Cartesian plane where vertex A is positioned at origin (0, 0) and side c lies along the positive x-axis to point B(c, 0). Vertex C is defined at coordinates (b·cos(α), b·sin(α)). By computing the Euclidean distance squared between point B and point C:

a² = (b·cos(α) - c)² + (b·sin(α) - 0)²

a² = b²·cos²(α) - 2bc·cos(α) + c² + b²·sin²(α)

a² = b²(cos²(α) + sin²(α)) + c² - 2bc·cos(α)

Since cos²(α) + sin²(α) = 1 → a² = b² + c² - 2bc·cos(α)

The Ambiguous Case (SSA): Mathematical Boundary Conditions

When two sides and an angle not between them are provided (Side-Side-Angle), the geometry cannot always guarantee a single unique solution. The length of the opposite side ($a$) compared to the vertical altitude ($h = b \cdot \sin(\alpha)$) determines one of four possible geometric outcomes:

No Triangle (0 Solutions)

a < h = b·sin(α)

The swinging side $a$ is too short to reach the opposite baseline. No enclosed polygon can be formed.

One Right Triangle

a = h = b·sin(α)

Side $a$ meets the baseline at a 90° angle, forming exactly one right-angled triangle.

Two Triangles (Ambiguous)

h < a < b

Side $a$ intersects the baseline at two distinct points, generating one acute and one obtuse triangle.

One Unique Triangle

a ≥ b

Side $a$ can only swing forward; swinging backward extends past vertex A, leaving one valid triangle.

Triangle Classification by Sides and Angles

Triangles are classified into dual geometric categories based on side symmetry and interior angle distribution:

Classification by Side Symmetry
Equilateral Triangle

All 3 sides are equal ($a = b = c$). All 3 interior angles equal exactly 60°. Area = $\frac{\sqrt{3}}{4}a^2$.

Isosceles Triangle

At least 2 sides are equal ($a = b \neq c$). The angles opposite the equal sides are also identical.

Scalene Triangle

All 3 sides have different lengths ($a \neq b \neq c$). All 3 interior angles have distinct measures.

Classification by Interior Angles
Acute Triangle

All 3 interior angles are strictly less than 90° ($\alpha, \beta, \gamma < 90^\circ$). The circumcenter lies inside the triangle.

Right Triangle

Contains exactly one 90° right angle ($\gamma = 90^\circ$). Governed by $a^2 + b^2 = c^2$. Circumcenter lies on the hypotenuse midpoint.

Obtuse Triangle

Contains one interior angle greater than 90° ($\gamma > 90^\circ$). The circumcenter and orthocenter lie outside the triangle boundary.

Real-World Engineering & Scientific Applications

Triangles are the structural foundation of computation, engineering, and spatial geometry because they are the only 2D polygons that are naturally rigid:

1. Structural Engineering & Trusses

Bridges, cranes, and geodesic domes rely on triangular pin-jointed trusses. Because a triangle cannot deform without altering side lengths, it distributes tensile and compressive loads evenly.

2. Geodesy, GPS & Triangulation

Surveying networks and satellite GPS constellations calculate exact geographical coordinates on Earth's surface by measuring angle bearings between known reference points (triangulation and trilateration).

3. 3D Computer Graphics & Mesh Rendering

Modern GPUs render 3D assets using triangle meshes (rasterization). Three vertices define a single flat plane in 3D space, preventing rendering ambiguity and non-planar warping artifacts.

Step-by-Step Geometric Calculation Case Studies

Walk through these end-to-end calculations to see how different theorems solve for complete triangle metrics:

Case A: SSS Configuration (7, 8, 9)Heron's Method
  • Semi-Perimeter: s = (7 + 8 + 9) / 2 = 12
  • Area: √(12 · (12-7) · (12-8) · (12-9)) = √(12·5·4·3) = √720 ≈ 26.8328
  • Angle γ: arccos((7² + 8² - 9²) / (2 · 7 · 8)) = arccos(32 / 112) ≈ 73.3985°
  • Angle α: arccos((8² + 9² - 7²) / (2 · 8 · 9)) = arccos(96 / 144) ≈ 48.1897°
  • Angle β: 180° - 73.3985° - 48.1897° ≈ 58.4118°
  • Inradius (r): 26.8328 / 12 ≈ 2.2361
  • Circumradius (R): (7 · 8 · 9) / (4 · 26.8328) = 504 / 107.3312 ≈ 4.6957
  • • Classification: Scalene Acute Triangle
Case B: SAS Configuration (10, 15, 60°)Law of Cosines
  • Third Side c: √(10² + 15² - 2(10)(15)cos(60°)) = √(100 + 225 - 150) = √175 ≈ 13.2288
  • Enclosed Area: ½ · 10 · 15 · sin(60°) = 75 · 0.866025 ≈ 64.9519
  • Perimeter: 10 + 15 + 13.2288 = 38.2288 (s = 19.1144)
  • Angle α: arcsin((10 · sin(60°)) / 13.2288) = arcsin(0.6547) ≈ 40.8934°
  • Angle β: 180° - 60° - 40.8934° ≈ 79.1066°
  • Inradius (r): 64.9519 / 19.1144 ≈ 3.3981
  • Circumradius (R): (10 · 15 · 13.2288) / (4 · 64.9519) ≈ 7.6376
  • • Classification: Scalene Acute Triangle

Frequently Asked Questions (FAQ)

What is the Triangle Inequality Theorem and why is it checked first?

The Triangle Inequality Theorem states that for any valid Euclidean triangle, the sum of the lengths of any two sides must be strictly greater than the length of the third side ($a + b > c$, $a + c > b$, and $b + c > a$). If the sum equals the third side, the shape degenerates into a flat line segment; if less, the endpoints cannot connect.

How does the solver resolve the ambiguous SSA (Side-Side-Angle) case?

In the SSA configuration, providing two sides and an angle not enclosed between them can yield 0, 1, or 2 distinct triangles. The algorithm computes the perpendicular altitude $h = b \cdot \sin(\alpha)$. If $a < h$, no triangle exists. If $a = h$ or $a \ge b$, exactly one triangle is formed. If $h < a < b$, two valid triangles exist (one acute and one obtuse).

What formula calculates triangle area when altitudes are unknown?

When all three sides are known, Heron's formula is used: $\text{Area} = \sqrt{s(s - a)(s - b)(s - c)}$, where $s = \frac{a + b + c}{2}$. When two sides and the included angle are known (SAS), the trigonometric area formula $\text{Area} = \frac{1}{2}ab\sin(\gamma)$ is applied.

What are inradius and circumradius in triangle geometry?

The inradius ($r$) is the radius of the incircle tangent to all three inner edges, calculated as $\text{Area} / s$. The circumradius ($R$) is the radius of the circle circumscribed around the triangle touching all three vertices, calculated as $(abc) / (4 \cdot \text{Area})$.

When should I use the Law of Sines versus the Law of Cosines?

Use the Law of Cosines ($c^2 = a^2 + b^2 - 2ab\cos(\gamma)$) when solving SSS (three sides) or SAS (two sides with included angle). Use the Law of Sines ($a/\sin(\alpha) = b/\sin(\beta) = c/\sin(\gamma)$) when solving ASA, AAS, or SSA setups where at least one opposite angle-side pair is provided.

How does the Pythagorean theorem relate to the Law of Cosines?

The Law of Cosines is the generalized Euclidean formula for non-right triangles. When the angle $\gamma$ equals 90°, $\cos(90^\circ) = 0$, causing the $-2ab\cos(\gamma)$ term to vanish completely and simplifying the expression directly to $c^2 = a^2 + b^2$.

What is the difference between a median, an altitude, and an angle bisector?

An altitude (height) is a perpendicular line segment dropped from a vertex to the opposite base line. A median is a line segment connecting a vertex directly to the midpoint of the opposite side, dividing the triangle into two equal areas. An angle bisector divides an interior vertex angle into two equal halves.

Found this tool helpful? Share it with others!

Share on Facebook
Share on X
Share on LinkedIn
Copy URL

Related & Complementary Utilities

Explore more privacy-first client-side web tools.