Find the Length of AB in a Triangle Calculator (Law of Cosines)
Triangle Side Length Calculator
This calculator uses the Law of Cosines to find the length of side AB (c) of a triangle given the lengths of the other two sides (AC=b, BC=a) and the angle C between them.
Chart showing how the length of side AB (c) changes with Angle C, keeping side a and side b constant at their current values.
| Angle C (degrees) | Length of AB (c) |
|---|
Table showing calculated length of AB (c) for various Angle C values with current side a and b.
What is the Law of Cosines and Finding the Length of AB in a Triangle Calculator?
The “find the length of ab in a triangle calculator” is a tool designed to calculate the length of one side of a triangle (often labeled as ‘c’ or ‘AB’ when vertices are A, B, C) when you know the lengths of the other two sides (‘a’ and ‘b’, or BC and AC) and the angle between them (angle C). This calculation is most commonly performed using the **Law of Cosines**, a fundamental theorem in trigonometry.
This triangle side length calculator is useful for students, engineers, architects, and anyone dealing with geometry and trigonometry problems. It helps avoid manual calculations and provides quick, accurate results. Common misconceptions are that you can use the Pythagorean theorem (a² + b² = c²) for any triangle; however, that theorem only applies to right-angled triangles. The Law of Cosines is a generalization that works for any triangle.
Find the Length of AB in a Triangle Calculator: Formula and Mathematical Explanation
The Law of Cosines relates the lengths of the sides of a triangle to the cosine of one of its angles. If we have a triangle with vertices A, B, and C, and sides opposite these vertices are a, b, and c respectively (so c is the length of side AB, a is BC, and b is AC), the Law of Cosines states:
c² = a² + b² – 2ab * cos(C)
Where:
- c is the length of side AB (the side we want to find).
- a is the length of side BC.
- b is the length of side AC.
- C is the angle at vertex C, between sides a and b.
- cos(C) is the cosine of angle C.
To find c, we take the square root:
c = √(a² + b² – 2ab * cos(C))
Our “find the length of ab in a triangle calculator” uses this exact formula.
Variables Table:
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| a | Length of side BC | Length units (e.g., cm, m, inches) | > 0 |
| b | Length of side AC | Length units (e.g., cm, m, inches) | > 0 |
| C | Angle between sides a and b | Degrees | 0° < C < 180° |
| c | Length of side AB | Length units (e.g., cm, m, inches) | Calculated, > 0 |
Practical Examples (Real-World Use Cases)
Let’s see how our find the length of ab in a triangle calculator works with examples.
Example 1: Surveying Land
A surveyor measures two sides of a triangular plot of land as 120 meters (a) and 150 meters (b), and the angle between these two sides is 75 degrees (C). They want to find the length of the third side (c or AB).
- a = 120 m
- b = 150 m
- C = 75°
Using the formula c = √(120² + 150² – 2 * 120 * 150 * cos(75°)), the calculator finds c ≈ √(14400 + 22500 – 36000 * 0.2588) ≈ √(36900 – 9316.8) ≈ √27583.2 ≈ 166.08 meters.
Example 2: Navigation
A ship sails 30 nautical miles (a), then changes direction and sails 40 nautical miles (b). The angle between the two legs of the journey is 110 degrees (C). How far is the ship from its starting point (length c or AB)?
- a = 30 nm
- b = 40 nm
- C = 110°
Using the law of cosines calculator: c = √(30² + 40² – 2 * 30 * 40 * cos(110°)) ≈ √(900 + 1600 – 2400 * (-0.3420)) ≈ √(2500 + 820.8) ≈ √3320.8 ≈ 57.63 nautical miles.
How to Use This Find the Length of AB in a Triangle Calculator
- Enter Side BC (a): Input the length of the side opposite angle A.
- Enter Side AC (b): Input the length of the side opposite angle B.
- Enter Angle C: Input the angle between sides a and b, in degrees.
- Calculate: The calculator automatically updates, or you can click “Calculate”.
- View Results: The length of side AB (c) will be displayed, along with intermediate calculations. The chart and table also update based on your inputs for ‘a’ and ‘b’.
The results show the calculated length of side AB (c). The intermediate values a², b², and 2ab*cos(C) help you understand the components of the formula. Use this triangle side length calculator to quickly solve for the unknown side.
Key Factors That Affect the Length of AB
- Length of Side a (BC): A longer side ‘a’ will generally result in a longer side ‘c’, especially if angle C is large.
- Length of Side b (AC): Similar to side ‘a’, a longer side ‘b’ will generally increase the length of ‘c’.
- Magnitude of Angle C: This is crucial. If C is small (near 0°), c will be close to |a-b|. If C is 90°, c = √(a²+b²) (Pythagorean). If C is large (near 180°), c will be close to a+b. The cos(C) term modifies the sum of squares.
- Units of Length: The unit of the output length ‘c’ will be the same as the units used for ‘a’ and ‘b’. Consistency is key.
- Angle Units: Ensure angle C is entered in degrees, as the calculator converts it to radians for the cosine function.
- Triangle Inequality: For a valid triangle, the sum of any two sides must be greater than the third side. The Law of Cosines ensures this if a valid angle (0-180 exclusive) and positive side lengths are used.
Using a reliable find the length of ab in a triangle calculator helps in accurate estimations.
Frequently Asked Questions (FAQ)
A: The Law of Cosines is a formula used in trigonometry to relate the lengths of the sides of any triangle to the cosine of one of its angles: c² = a² + b² – 2ab cos(C). Our triangle side length calculator uses this.
A: Yes. If angle C is 90 degrees, cos(90°) = 0, and the formula becomes c² = a² + b², which is the Pythagorean theorem. So, the find the length of ab in a triangle calculator works for right triangles too.
A: The angle inside a triangle must be between 0 and 180 degrees (exclusive of 0 and 180 for a non-degenerate triangle). The calculator limits input to 0-180.
A: You can use any unit of length (meters, feet, inches, etc.), but be consistent. The output for side AB (c) will be in the same unit.
A: The calculator uses standard mathematical formulas and is as accurate as the input values provided.
A: Yes, the Law of Cosines can be rearranged to find an angle if you know all three sides. This calculator focuses on finding a side length.
A: The calculator will show an error message and will not perform the calculation until valid numbers are entered.
A: Use the Law of Cosines when you know two sides and the included angle (SAS) or all three sides (SSS). Use the Law of Sines when you know two angles and one side (AAS or ASA) or two sides and a non-included angle (SSA – the ambiguous case). Our find the length of ab in a triangle calculator is for the SAS case.
Related Tools and Internal Resources
- Triangle Area Calculator: Calculate the area of a triangle using various formulas.
- Pythagorean Theorem Calculator: Specifically for right-angled triangles.
- Law of Sines Calculator: Solve triangles using the Law of Sines.
- Angle Converter: Convert between degrees and radians.
- Geometry Formulas: A collection of common geometry formulas.
- Trigonometry Basics: Learn the fundamentals of trigonometry.