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
Calculated Metrics & Dynamic SVG
Acute TriangleSquare Units
Semi-perimeter (s): 9
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 Setup | Mathematical Governing Formula | Existence Constraint | Unique Solutions |
|---|---|---|---|
| SSS (Side-Side-Side) | cos(γ) = (a² + b² - c²) / (2ab) | a + b > c, a + c > b, b + c > a | 1 Unique |
| SAS (Side-Angle-Side) | c² = a² + b² - 2ab·cos(γ) | 0° < γ < 180° and a, b > 0 | 1 Unique |
| ASA (Angle-Side-Angle) | a / sin(α) = c / sin(180° - α - β) | α + β < 180° and c > 0 | 1 Unique |
| AAS (Angle-Angle-Side) | b = (a·sin(β)) / sin(α) | α + β < 180° and a > 0 | 1 Unique |
| SSA (Side-Side-Angle) | sin(β) = (b·sin(α)) / a | Altitude 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:
a < h = b·sin(α)
The swinging side $a$ is too short to reach the opposite baseline. No enclosed polygon can be formed.
a = h = b·sin(α)
Side $a$ meets the baseline at a 90° angle, forming exactly one right-angled triangle.
h < a < b
Side $a$ intersects the baseline at two distinct points, generating one acute and one obtuse 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:
All 3 sides are equal ($a = b = c$). All 3 interior angles equal exactly 60°. Area = $\frac{\sqrt{3}}{4}a^2$.
At least 2 sides are equal ($a = b \neq c$). The angles opposite the equal sides are also identical.
All 3 sides have different lengths ($a \neq b \neq c$). All 3 interior angles have distinct measures.
All 3 interior angles are strictly less than 90° ($\alpha, \beta, \gamma < 90^\circ$). The circumcenter lies inside the triangle.
Contains exactly one 90° right angle ($\gamma = 90^\circ$). Governed by $a^2 + b^2 = c^2$. Circumcenter lies on the hypotenuse midpoint.
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:
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.
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).
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:
- 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
- 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.
Related & Complementary Utilities
Explore more privacy-first client-side web tools.
Circle Circumference, Arc Length & Sector Area Calculator
Solve circle radius, circumference, area, arc length, chord, and sector parameters with real-time vector visualization.
Cylinder, Cone & Sphere Volume and Surface Area Calculator
Comprehensive 3D solid geometry engine computing volume, lateral surface area, total surface area, slant height, base circumference, and liquid capacity with real-time SVG rendering.
Pythagorean Theorem & Distance Formula Calculator
Solve right triangle hypotenuse, legs, area, perimeter, and compute 2D/3D Euclidean coordinate distances with radical simplification.