Geometry
Diagonal by the Pythagorean theorem
The diagonal is the hypotenuse of a right-angled triangle whose legs are the two sides. Square each side, add the squares and take the positive square root.
Last updated
The Formula
d = √(l² + w²)
The diagonal is the hypotenuse of a right-angled triangle whose legs are the two sides. Square each side, add the squares and take the positive square root.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| l | Length of the rectangle | length | One of the two perpendicular sides. |
| w | Width of the rectangle | length | The side at right angles to the length. |
| d | Diagonal | length | Straight-line distance between opposite corners. |
What Each Symbol Means
llength
Length of the rectangle
One of the two perpendicular sides.
wlength
Width of the rectangle
The side at right angles to the length.
dlength
Diagonal
Straight-line distance between opposite corners.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate the diagonal of a rectangle page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate The Diagonal Of A Rectangle, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Diagonal by the Pythagorean theorem?
The formula for Diagonal by the Pythagorean theorem is d = √(l² + w²). The diagonal is the hypotenuse of a right-angled triangle whose legs are the two sides. Square each side, add the squares and take the positive square root.
What does each symbol in Diagonal by the Pythagorean theorem stand for?
l is length of the rectangle; w is width of the rectangle; d is diagonal.
What units should I use with Diagonal by the Pythagorean theorem?
Substitute l in length, w in length, d in length. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Diagonal by the Pythagorean theorem?
Adding the sides before squaring. Computing (l + w)² instead of l² + w² adds an extra 2lw term and makes the diagonal too large. For the default rectangle that error gives 14 rather than 10. Square each side separately first, then add the two results.