VOOZH about

URL: https://www.geeksforgeeks.org/maths/how-to-find-the-third-side-of-a-triangle-given-two-sides/

⇱ How to Find the Third Side of a Triangle Given Two Sides? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Find the Third Side of a Triangle Given Two Sides?

Last Updated : 23 Jul, 2025

Answer: To find the third side of a triangle given two sides, you need to know the type of triangle

1) Right Triangle: Use the Pythagorean Theorem

2)Non-Right Triangle: Use the Law of Cosines.

This matters because right triangles use a simple formula, while other triangles need a different one. If the triangle has a 90° angle, use the Pythagorean theorem. If not, use the Law of Cosines with the angle between the two sides.

Finding the Third Side using the Pythagorean Theorem

The third side of any triangle is found only when two sides of the Right-Angled Triangle are given. We use Pythagoras' Theorem in such cases. Let's assume that a Right Angled Triangle ABC where AB is the Perpendicular, BC is the Base, and CA is the Hypotenuse.

👁 pythagoras_theorem
Pythagorean Theorem

Then according to Pythagoras Theorem, the sum of squares of two sides is equal to the square of the third side. 

(Perpendicular)2 + (Base)2 = (Hypotenuse)2 

Using the above equation third side can be calculated if two sides in a right-angled triangle are known. This is explained using the example added below.

Example:If two sides of a right angled triangle are, AB(Perpendicular) = 3 cm and BC (Base) = 5 cm then find the third side Hypotenuse of the triangle.

Given,

  • Perpendicular (P) = 3 cm
  • Base (B) = 4 cm

Using Pythagoras theorem 
P2 + B2 = H2
(3)2 + (4)2 = H2
9 + 16 = H2
25 = H2
H = 5
Thus, the third side hypotenuse of the triangle ABC CA is 5 cm.

Finding the Third Side using the Law of Cosines

In a non-right triangle, the sides and angles do not follow the Pythagorean theorem because there is no 90° angle. To find the third side when you know two sides and the included angle, you use the Law of Cosines. This law helps relate all three sides of the triangle to one of its angles.

👁 law_of_cosines
Law of Cosines

It’s especially useful when:

  • You know two sides and the angle between them (SAS), or
  • You know all three sides and want to find an angle (SSS).

If you know sides a and b and the angle C between them, you can find the third side c using:

c2 = a2+b2−2abcos⁡(C)

Then take the square root to get c:
c = √ c2=a2+b2−2abcos⁡(C)

Example: Suppose you have a triangle with:

  • Side a = 5 units
  • Side b = 7 units
  • Included angle C=60o

Solution:

Using the Law of Cosines:
c2 = a2 + b2−2abcos⁡(C)
c2 = 52 + 72−2 ✕ 5 ✕ 7 cos⁡(60o)
c2 = 25 + 49 − 70 ✕ 0.5
c2 = 25 + 49 − 70 ✕ 0.5
c2 = 39
c= √39

Articles Related to Triangles

Topic

Triangles: Based on Sides

Triangles: Based on Angles

Triangle

Equilateral Triangle

Acute Angled Triangle

Area of Triangle

Isosceles Triangle

Right-Angled Triangle

Perimeter of Triangle

Scalene Triangle

Obtuse Angled Triangle

Important Formulas Related to Triangles

Solved Examples of Finding the Third side of a Triangle

Problem 1: Find the measure of the perpendicular and hypotenuse given: perpendicular = 12 cm and hypotenuse = 13 cm.

Solution:

Given,

  • Perpendicular = 12 cm
  • Hypotenuse = 13 cm

Using Pythagoras Theorem 
P2 + B2 = H2
B2 = H2 - P2
B2 = 132 - 122
B2 = 169 - 144
B2 = 25 = 5 cm

Problem 2: The perimeter of theequilateral triangle is 63 cm. Find, the side of the triangle.

Solution:

Perimeter of an Equilateral Triangle =  3×side
3×side = 63
side = 63/3
side = 21 cm

Problem 3: Find the measure of thethird side of a right-angled triangle if thetwo sides are 6 cm and 8 cm.

Solution:

Given,

  • Perpendicular = 6 cm
  • Base = 8 cm

Using Pythagoras Theorem
H2 = P2 + B2
H2 = P2 + B2
H2 = 62 + 82
H2 = 36 + 64
H2 = 100
H = 10 cm

Problem 4: Find the hypotenuse of a right angled triangle whose base is 8 cm and whose height is 15 cm?

Solution: 

Using Pythagorean theorem, a2 + b2 = c2
So 82 + 152 = c2
hence c = √(64 + 225)
c = √289 = 17 cm

Problem 5: In triangle ABC, sides AB = 9 and AC = 11, with the included angle ∠BAC = 60o . Find the length of side BC.

Solution:

Using the Law of Cosines:
BC2 = a2 + b2−2abcos⁡(C)
BC2 = 92 + 112−2 ✕ 9 ✕ 11 ✕ cos⁡(60o)
BC2 = 81 + 121 − 198 ✕ 0.5
BC2= 202 - 99
BC2= 103
BC2 = √103

Problem 6: Triangle XYZ has XY = 7cm, XZ = 5 cm and ∠YXZ = 100o.Find the length of side YZ.

Solution:

Using the Law of Cosines:
YZ2 = a2 + b2−2abcos⁡(C)
YZ2 = 72 + 52−2 ✕ 7 ✕ 5 ✕ cos⁡(100o)
YZ2= 49 + 25 − 70 ✕ (-0.1736)
YZ2 = 74 + 12.152
YZ2= 86.152
YZ2 = √86.152

Unsolved Practice Questions on Finding the Third Side of a Triangle

Question 1: What formula do we use to find the third side of a triangle when given the lengths of the two sides?

Question 2: If one side of a triangle is 5 cm and the other is 12 cm, what is the maximum length that the third side can be?

Question 3: How do you determine if three lengths can form a triangle?

Question 4: In triangle RS, side RS=8 cm, side RT=6 cm, and the included angle ∠SRT=45o. Find the length of side ST.

Question 5: If two sides of a triangle measure 7 m and 24 m., what is the length of the third side if it is known to be the longest side?

Question 6: Can the lengths of two sides of a triangle ever equal the length of the third side? What would this imply?

Question 7: In triangle DEF, side DE=7 in, side DF=10 in, and the included angle ∠EDF=75o. Find the length of side EF.

Question 8: In a right triangle, if one side is 6 cm and the hypotenuse is 10 cm, how do we find the length of the third side?

Question 9: In triangle LM, side LM=30 km, side LN=40 km, and the included angle ∠MLN=100o. Determine the length of side MN.

Question 10: If two sides of a triangle are equal, how do we find the length of the third side if the triangle is isosceles?

Conclusion

To find the third side of a triangle first determine whether the triangle is a right triangle. If it is use the Pythagorean theorem. For non-right triangles, the Law of Cosines is used. With this knowledge we can handle different types of the triangles based on the given sides and angles.

Comment

Explore