What Is a Triangle?
A triangle is a polygon with three sides, three vertices, and three interior angles that always sum to 180 degrees. Triangles are the simplest polygons and are the fundamental building blocks of geometry. Every polygon can be divided into triangles, every surface in 3D computer graphics is rendered using triangles, and the structural rigidity of triangles makes them essential in engineering and architecture. From the roof trusses in buildings to the lattice of a bridge, triangles provide strength and stability that other shapes cannot match.
Triangles are classified by their sides and angles. By sides: an equilateral triangle has three equal sides, an isosceles triangle has two equal sides, and a scalene triangle has no equal sides. By angles: an acute triangle has all angles less than 90 degrees, a right triangle has one angle exactly 90 degrees, and an obtuse triangle has one angle greater than 90 degrees. These classifications determine which formulas are most convenient for solving the triangle.
Triangle Formulas
This calculator uses several fundamental formulas from trigonometry and geometry to solve triangles completely. Understanding these formulas helps you verify results and apply them in situations beyond what the calculator directly supports.
Law of Cosines
c² = a² + b² – 2ab · cos(C)The Law of Cosines is the generalization of the Pythagorean theorem to all triangles. When angle C is 90 degrees, cos(C) = 0, and the formula reduces to c² = a² + b². The Law of Cosines is used in two main situations: when you know all three sides (SSS) and want to find the angles, or when you know two sides and the included angle (SAS) and want to find the third side. To find an angle from three known sides, rearrange the formula:
A = arccos((b² + c² – a²) / (2bc))The Law of Cosines is particularly valuable in navigation, surveying, and physics. A surveyor measuring the distance between two points separated by an obstacle (such as a river or building) can measure two accessible sides and the angle between them, then use the Law of Cosines to calculate the inaccessible distance. In physics, the law is used to resolve vector components and calculate resultant forces or velocities when two vectors act at an angle to each other.
Heron's Formula
Area = √(s(s–a)(s–b)(s–c)), where s = (a+b+c)/2Heron's formula, attributed to the Greek mathematician Heron of Alexandria (circa 60 CE), calculates the area of a triangle when all three side lengths are known, without requiring the height. The variable s is the semi-perimeter (half the perimeter). For example, a triangle with sides 5, 7, and 9 has a semi-perimeter of (5 + 7 + 9) / 2 = 10.5. The area is √(10.5 × 5.5 × 3.5 × 1.5) = √(96.469) ≈ 17.41 square units.
Heron's formula is elegant and practical. It requires only the three side lengths, which are often the easiest measurements to take in the field. Surveyors, carpenters, and engineers regularly use it to calculate areas of triangular plots of land, triangular structural elements, and triangular cross-sections without needing to determine or measure the height.
Pythagorean Theorem
c² = a² + b²The Pythagorean theorem applies exclusively to right triangles, where c is the hypotenuse (the side opposite the right angle) and a and b are the two legs. It is one of the most famous and widely used formulas in mathematics, discovered independently by multiple ancient civilizations including the Babylonians, Indians, and Chinese, though it is named after the Greek mathematician Pythagoras (circa 570–495 BCE). For a right triangle with legs 3 and 4, the hypotenuse is √(9 + 16) = √25 = 5. The angles of a right triangle (other than the 90-degree angle) can be found using inverse trigonometric functions: angle A = arctan(a/b).
SAS Area Formula
Area = ½ · a · b · sin(C)When two sides and the included angle are known, the area can be calculated directly using this formula. It is derived from the standard base-times-height formula by recognizing that the height equals one side multiplied by the sine of the included angle. For a triangle with sides 6 and 8 and an included angle of 60 degrees, the area is 0.5 × 6 × 8 × sin(60°) = 0.5 × 6 × 8 × 0.866 = 20.78 square units.
Triangle Inequality Theorem
Before performing any calculations, it is essential to verify that the given side lengths can actually form a valid triangle. The triangle inequality theorem states that the sum of any two sides must be greater than the third side. This must hold for all three combinations:
- a + b > c
- a + c > b
- b + c > a
For example, sides of 3, 4, and 5 form a valid triangle because 3 + 4 = 7 > 5, 3 + 5 = 8 > 4, and 4 + 5 = 9 > 3. However, sides of 1, 2, and 5 do not form a triangle because 1 + 2 = 3 < 5. This calculator validates your inputs and displays an error message if the triangle inequality is not satisfied.
The triangle inequality also has a useful corollary: the difference of any two sides must be less than the third side. This means the third side is always constrained between |a – b| and a + b (exclusive). In practical terms, if you have two sticks of length 5 and 8, any third stick between 3 and 13 (exclusive) will form a triangle with them.
Types of Triangles
Triangles can be categorized in several ways, and these categories affect which solving methods are most convenient:
| Type (by sides) | Properties |
|---|---|
| Equilateral | All three sides equal; all angles are 60° |
| Isosceles | Two sides equal; base angles are equal |
| Scalene | No sides equal; no angles equal |
| Type (by angles) | Properties |
|---|---|
| Acute | All angles less than 90° |
| Right | One angle exactly 90° |
| Obtuse | One angle greater than 90° |
An equilateral triangle is also equiangular: every angle is exactly 60 degrees, and its area can be calculated with the simplified formula Area = (√3 / 4) × a², where a is the side length. Isosceles triangles appear frequently in architecture (gable roofs, A-frame structures) and design. Right triangles are the foundation of trigonometry and are used extensively in construction, navigation, and physics.
Triangles in Architecture and Engineering
Triangles are structurally unique among polygons because they are inherently rigid. A triangle cannot be deformed without changing the length of at least one side, unlike a rectangle or other quadrilateral that can be pushed into a parallelogram. This rigidity makes triangles essential in structural engineering.
Roof trusses use triangular configurations to distribute the weight of a roof evenly to the supporting walls. Bridge trusses, from the iconic Warren truss to the Pratt and Howe designs, are entirely composed of triangles. The geodesic dome, popularized by architect Buckminster Fuller, uses a network of triangles to create a strong, lightweight hemisphere. Modern skyscrapers use triangular cross-bracing to resist wind and seismic forces. Even in everyday construction, a diagonal brace added to a rectangular frame creates two triangles and prevents the frame from racking.
In surveying and navigation, triangulation is a technique for determining the position of a point by measuring angles to it from known points at either end of a fixed baseline. The triangle formed by the baseline and the two measured angles can be solved to determine the distances to the unknown point. This principle underlies GPS technology, where satellites serve as the known points and the distances (rather than angles) are measured using radio signals.
Solving Triangles: Step-by-Step Examples
Example 1: SSS (Three Sides Known)
Given a triangle with sides a = 8, b = 11, c = 13, find all angles and the area.
Step 1: Verify triangle inequality: 8 + 11 = 19 > 13, 8 + 13 = 21 > 11, 11 + 13 = 24 > 8. Valid triangle.
Step 2: Find angle A using the Law of Cosines: A = arccos((11² + 13² – 8²) / (2 × 11 × 13)) = arccos((121 + 169 – 64) / 286) = arccos(226 / 286) = arccos(0.7902) ≈ 37.8°.
Step 3: Find angle B: B = arccos((8² + 13² – 11²) / (2 × 8 × 13)) = arccos((64 + 169 – 121) / 208) = arccos(112 / 208) = arccos(0.5385) ≈ 57.4°.
Step 4: Find angle C: C = 180° – 37.8° – 57.4° = 84.8°.
Step 5: Find area using Heron's formula: s = (8 + 11 + 13) / 2 = 16. Area = √(16 × 8 × 5 × 3) = √1920 ≈ 43.82 sq units.
Example 2: SAS (Two Sides and Included Angle)
Given sides a = 10, b = 14, and included angle C = 45°, find side c, the other angles, and the area.
Step 1: Find side c: c = √(10² + 14² – 2 × 10 × 14 × cos(45°)) = √(100 + 196 – 197.99) = √98.01 ≈ 9.90.
Step 2: Find angle A: A = arccos((14² + 9.90² – 10²) / (2 × 14 × 9.90)) = arccos((196 + 98.01 – 100) / 277.2) = arccos(0.6999) ≈ 45.6°.
Step 3: Find angle B: B = 180° – 45.6° – 45° = 89.4°.
Step 4: Area = 0.5 × 10 × 14 × sin(45°) = 70 × 0.7071 ≈ 49.50 sq units.
Frequently Asked Questions
How do you calculate the area of a triangle when you know all three sides?
Use Heron's formula. First, calculate the semi-perimeter: s = (a + b + c) / 2. Then the area equals the square root of s × (s – a) × (s – b) × (s – c). For example, a triangle with sides 6, 8, and 10 has s = 12, and the area = √(12 × 6 × 4 × 2) = √576 = 24 square units. Heron's formula works for any triangle, regardless of type, as long as the sides satisfy the triangle inequality.
What is the Law of Cosines and when is it used?
The Law of Cosines states that c² = a² + b² – 2ab × cos(C), where C is the angle opposite side c. It is used in two main situations: to find the third side when two sides and the included angle are known (SAS), or to find angles when all three sides are known (SSS). It generalizes the Pythagorean theorem, which is a special case when angle C is 90 degrees (since cos(90°) = 0). The law is essential in surveying, navigation, and physics for resolving non-right triangles.
How do you check if three sides can form a valid triangle?
Apply the triangle inequality theorem: the sum of any two sides must be strictly greater than the third side. Check all three conditions: a + b > c, a + c > b, and b + c > a. If any condition fails, the sides cannot form a triangle. For example, sides 3, 4, 8 fail because 3 + 4 = 7 < 8. Sides 3, 4, 5 pass all three checks. When two sides sum to exactly the third (a + b = c), the result is a degenerate triangle (a straight line).
What is the difference between SSS, SAS, and ASA in solving triangles?
These abbreviations describe which parts of a triangle are known. SSS (Side-Side-Side) means all three sides are known, and you use the Law of Cosines to find angles. SAS (Side-Angle-Side) means two sides and the included angle are known, and you use the Law of Cosines for the missing side, then find remaining angles. ASA (Angle-Side-Angle) means two angles and the included side are known, and you use the Law of Sines to find the missing sides. Each case has a unique solution as long as the inputs are valid.
Can the angles of a triangle add up to more or less than 180 degrees?
In standard Euclidean geometry (flat surfaces), the interior angles of a triangle always sum to exactly 180 degrees. However, on curved surfaces, this rule changes. On a sphere (spherical geometry), the angles sum to more than 180 degrees. On a saddle-shaped surface (hyperbolic geometry), they sum to less than 180 degrees. For everyday calculations on flat surfaces, the 180-degree rule always holds, and this calculator uses it to verify and compute the third angle from the other two.
Related Calculators
- Area Calculator – Calculate the area of rectangles, circles, triangles, and more.
- Percentage Calculator – Quick percentage calculations for everyday use.
- Scientific Calculator – Full-featured calculator with trigonometric functions.
- Unit Converter – Convert between units of length, area, and more.