Diagonal of Parallelogram Formula — p = √(x² + y² − 2xy·cos A)

#Math Formula
TL;DR
The diagonal of parallelogram formula computes a diagonal's length from the two adjacent sides and the included angle: p=x2+y2−2xycos⁡Ap = \sqrt{x^2 + y^2 - 2xy \cos A}. This article gives the formula, derives it from the law of cosines, gives the companion parallelogram law p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2), and walks through three worked examples and the most common student mistake.
BT
Bhanzu TeamLast updated on June 1, 202612 min read

A Diagonal Is Just the Law of Cosines in Disguise

Most students meet the parallelogram in Class 8 — opposite sides equal, opposite angles equal, diagonals bisect each other. Then in Class 10 or 11 they're asked to compute the diagonal length, and the formula looks intimidating: p=x2+y2−2xycos⁡Ap = \sqrt{x^2 + y^2 - 2xy \cos A}. Square root, cosine, two squared sides — it reads like an equation pulled from advanced geometry.

The diagonal of parallelogram formula says:

p=x2+y2−2xycos⁡A,p = \sqrt{x^2 + y^2 - 2xy \cos A},

where xx and yy are adjacent sides and AA is the angle between them.

It looks like a calculus-style formula. It's not — it's the law of cosines applied to the triangle formed by the diagonal. The whole formula is one law-of-cosines step.

The Diagonal of Parallelogram Formula

For a parallelogram with adjacent sides xx and yy and the angle AA between them, the two diagonals are:

;p=x2+y2−2xycos⁡Aandq=x2+y2+2xycos⁡A;\boxed{;p = \sqrt{x^2 + y^2 - 2xy \cos A} \quad\text{and}\quad q = \sqrt{x^2 + y^2 + 2xy \cos A};}

Notice the sign — the shorter diagonal carries the minus sign (opposite vertex angle is acute), the longer diagonal carries the plus. The two diagonals split the included angle differently and that splits the cosine sign.

The companion identity — the parallelogram law:

p2+q2=2(x2+y2).p^2 + q^2 = 2(x^2 + y^2).

The sum of the squares of the two diagonals equals twice the sum of the squares of the two sides. The cosine terms cancel when you add p2p^2 and q2q^2, leaving a clean side-length identity that has nothing to do with the angle.

Quick facts.

  • Type: A geometric length formula derived from the law of cosines.

  • Inputs needed: Two adjacent sides + one angle, or two adjacent sides + one diagonal (the parallelogram law gives the other).

  • Special cases: Square — x=yx = y and A=90°A = 90°, so p=q=x2p = q = x\sqrt{2}. Rhombus — x=yx = y, diagonals perpendicular, p2+q2=4x2p^2 + q^2 = 4x^2.

  • Grade introduced: NCERT Class 9 Chapter 8 — Quadrilaterals (properties); diagonal-length computation appears in Class 10 trigonometry chapters paired with CCSS-M HSG-SRT.D.10 (law of sines/cosines).

  • Related identity: Apollonius's theorem (a special case for the median of a triangle).

How the Diagonal of Parallelogram Formula Is Derived — One Application of the Law of Cosines

Take a parallelogram ABCDABCD with AB=xAB = x along the base, AD=yAD = y rising at angle AA, and diagonal AC=pAC = p from vertex AA to opposite vertex CC.

The diagonal ACAC closes a triangle with two of the parallelogram's sides — but not directly with xx and yy. The triangle is AA, BB, CC, where:

  • AB=xAB = x

  • BC=yBC = y (since opposite sides of a parallelogram are equal, BC=AD=yBC = AD = y)

  • The angle at BB — let's call it BB — is supplementary to angle AA, since consecutive angles of a parallelogram sum to 180°180°. So B=180°−AB = 180° - A.

The law of cosines applied to triangle ABCABC gives:

AC2=AB2+BC2−2⋅AB⋅BC⋅cos⁡BAC^2 = AB^2 + BC^2 - 2 \cdot AB \cdot BC \cdot \cos B

p2=x2+y2−2xycos⁡(180°−A).p^2 = x^2 + y^2 - 2xy \cos(180° - A).

Using the identity cos⁡(180°−A)=−cos⁡A\cos(180° - A) = -\cos A:

p2=x2+y2−2xy⋅(−cos⁡A)=x2+y2+2xycos⁡A.p^2 = x^2 + y^2 - 2xy \cdot (-\cos A) = x^2 + y^2 + 2xy \cos A.

Wait — that gives the plus version. Let me reconsider which diagonal is which.

Actually, the convention depends on which diagonal is which. The diagonal from the acute-angle vertex picks up the minus sign (the formula in the boxed statement); the diagonal from the obtuse-angle vertex picks up the plus sign. Let me redo this more carefully.

Take the diagonal that originates from vertex AA — that's AC=pAC = p, going from AA across to the opposite vertex CC. The triangle that contains this diagonal and the included angle AA is triangle ABDABD — no wait, that's not right either. The two triangles ABDABD and ABCABC each contain one diagonal.

The cleanest version: in triangle ABDABD (vertices AA, BB, DD), the sides are AB=xAB = x, AD=yAD = y, and diagonal BD=qBD = q is opposite the angle AA. Law of cosines:

q2=x2+y2−2xycos⁡A.q^2 = x^2 + y^2 - 2xy \cos A.

So qq — the diagonal opposite vertex AA — uses the minus sign. By the parallelogram-law identity p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2), the other diagonal p=ACp = AC satisfies p2=2(x2+y2)−q2=x2+y2+2xycos⁡Ap^2 = 2(x^2 + y^2) - q^2 = x^2 + y^2 + 2xy \cos A. So pp uses the plus sign.

The diagonal whose endpoints are across the angle AA uses cos⁡A\cos A with a minus; the other diagonal uses cos⁡A\cos A with a plus. Naming convention varies by textbook — what matters is which triangle the diagonal belongs to.

I went through that derivation more carefully than necessary because the sign convention is exactly where most students slip, and the formula card alone doesn't make it obvious.

Three Worked Examples of Diagonal of Parallelogram Formula

Quick. A parallelogram has adjacent sides 6 cm and 8 cm with the included angle 60°60°. Find the shorter diagonal.

Use p=x2+y2−2xycos⁡Ap = \sqrt{x^2 + y^2 - 2xy \cos A} with x=6x = 6, y=8y = 8, A=60°A = 60°, cos⁡60°=0.5\cos 60° = 0.5:

p=36+64−2⋅6⋅8⋅0.5=100−48=52=213≈7.21 cm.p = \sqrt{36 + 64 - 2 \cdot 6 \cdot 8 \cdot 0.5} = \sqrt{100 - 48} = \sqrt{52} = 2\sqrt{13} \approx 7.21 \text{ cm}.

Final answer: 213≈7.21 cm2\sqrt{13} \approx 7.21 \text{ cm}.

Standard (Wrong Path First — Three Habits That Lose Marks). A parallelogram has sides 5 cm and 12 cm with one angle 120°120°. Find both diagonals.

The wrong path. A student computes cos⁡120°=−0.5\cos 120° = -0.5 but plugs in the positive value 0.5:

p=25+144−2⋅5⋅12⋅0.5=169−60=109≈10.44 cm.p = \sqrt{25 + 144 - 2 \cdot 5 \cdot 12 \cdot 0.5} = \sqrt{169 - 60} = \sqrt{109} \approx 10.44 \text{ cm}.

The flaw: dropping the negative sign on cos⁡120°\cos 120°. The cosine of an obtuse angle is negative; substituting only the magnitude gives the wrong diagonal length.

The rescue. Use cos⁡120°=−0.5\cos 120° = -0.5:

p=25+144−2⋅5⋅12⋅(−0.5)=169+60=229≈15.13 cm.p = \sqrt{25 + 144 - 2 \cdot 5 \cdot 12 \cdot (-0.5)} = \sqrt{169 + 60} = \sqrt{229} \approx 15.13 \text{ cm}.

For the second diagonal, flip the cosine sign:

q=25+144+2⋅5⋅12⋅(−0.5)=169−60=109≈10.44 cm.q = \sqrt{25 + 144 + 2 \cdot 5 \cdot 12 \cdot (-0.5)} = \sqrt{169 - 60} = \sqrt{109} \approx 10.44 \text{ cm}.

Final answer: Long diagonal ≈15.13\approx 15.13 cm; short diagonal ≈10.44\approx 10.44 cm.

Check with the parallelogram law: p2+q2=229+109=338=2(25+144)=2⋅169=338p^2 + q^2 = 229 + 109 = 338 = 2(25 + 144) = 2 \cdot 169 = 338 ✓.

Stretch. A parallelogram has adjacent sides aa and bb with one diagonal of length d1d_1. Find the other diagonal in terms of aa, bb, d1d_1 — no angle needed.

Apply the parallelogram law:

d12+d22=2(a2+b2)d_1^2 + d_2^2 = 2(a^2 + b^2)

d2=2(a2+b2)−d12.d_2 = \sqrt{2(a^2 + b^2) - d_1^2}.

Final answer: d2=2(a2+b2)−d12d_2 = \sqrt{2(a^2 + b^2) - d_1^2}.

This is the side-and-one-diagonal version of the problem — common in JEE-Main coordinate-geometry questions where one diagonal is known from the vertices' coordinates and the other must be derived. The parallelogram law bypasses the angle calculation entirely.

Where the Diagonal of Parallelogram Formula Shows Up

The formula isn't a textbook curiosity. It appears wherever rigid two-dimensional structures meet at non-right angles.

  • Truss-bridge engineering. A parallelogram-shaped truss panel has diagonal braces whose length is computed exactly from the parallelogram-diagonal formula — the brace is one of the diagonals.

  • CAD software and 3D modelling. When a designer skews a rectangle to make a parallelogram, the software internally computes the new diagonal lengths using this formula to update grid snaps and dimension labels.

  • Crystallography. Two-dimensional crystal lattices are catalogued by the parallelogram of their unit cell. The diagonal lengths characterise the lattice symmetry and determine the diffraction pattern.

  • Vector addition (the parallelogram law of forces). When two forces F1⃗\vec{F_1} and F2⃗\vec{F_2} act on a body at an angle θ\theta, the resultant force's magnitude is ∣F1⃗+F2⃗∣=F12+F22+2F1F2cos⁡θ|\vec{F_1} + \vec{F_2}| = \sqrt{F_1^2 + F_2^2 + 2 F_1 F_2 \cos \theta} — the same formula. The resultant is the diagonal of the parallelogram formed by the two force vectors.

  • Hinged mechanisms in furniture. A folding table or scissor jack whose linkage forms a parallelogram has a diagonal that determines maximum extension and load-bearing capacity. Mechanical engineers compute it from the parallelogram diagonal formula.

For a Class 10 / Class 11 student, the most-encountered context is the JEE coordinate-geometry vector chapter — but the formula reaches into engineering mechanics, materials science, and any field where two vectors combine to produce a resultant. The parallelogram diagonal is the vector sum.

How the Diagonal Formula Reached Its Modern Form

The result was implicit in classical Greek geometry but didn't have its modern algebraic form until the development of trigonometry.

  • Euclid (c. 300 BCE, Alexandria) in Elements Book I proved the diagonal of a parallelogram bisects it into two congruent triangles, and established the law of cosines geometrically in Proposition II.13 — though without the trigonometric notation.

  • Apollonius of Perga (c. 240–190 BCE, Greece) proved the special case for the median of a triangle — Apollonius's theorem — which is geometrically equivalent to the parallelogram law p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2) applied to a degenerate parallelogram.

  • François Viète (1540–1603, France) developed the trigonometric notation that lets us write the law of cosines as c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab \cos C. Before Viète, the same fact required pages of geometric proportion arguments.

Callout — Apollonius's theorem and the parallelogram law.

Apollonius of Perga earned the title "the Great Geometer" by extending Euclid's results to the conic sections — ellipses, parabolas, hyperbolas. Buried inside his work, almost as a side result, is the statement: in any triangle ABCABC with median AMAM to the midpoint MM of BCBC, we have AB2+AC2=2(AM2+BM2)AB^2 + AC^2 = 2(AM^2 + BM^2). Fold a parallelogram along one diagonal, and the two resulting triangles share that median — which is exactly the parallelogram law in disguise. A theorem from 230 BCE about medians of triangles is, by an algebraic step, the parallelogram law a Class 11 student uses today.

Slip-Ups That Cost Marks on the Diagonal Formula

Mistake 1: Using cos⁡\cos of the wrong angle.

Where it slips in: A parallelogram has angles AA and B=180°−AB = 180° - A. A student computes the diagonal opposite vertex AA but plugs in cos⁡B\cos B instead of cos⁡A\cos A (or vice versa).

Don't do this: Apply the formula without identifying which diagonal originates from which vertex angle.

The correct way: Identify the triangle formed by the diagonal and the two adjacent sides. The angle in the formula is the angle of that triangle at the vertex opposite the diagonal. Or — use the cross-check: cos⁡(180°−A)=−cos⁡A\cos(180° - A) = -\cos A, so the two diagonal formulas are sign-flipped versions of each other.

Mistake 2: Dropping the negative sign on cos⁡\cos of an obtuse angle.

Where it slips in: Computing cos⁡120°\cos 120°, cos⁡135°\cos 135°, or cos⁡150°\cos 150°, a student takes the magnitude and forgets the negative sign.

Don't do this: Treat cos⁡\cos as always positive. For obtuse angles (90°<A<180°90° < A < 180°), cos⁡A\cos A is negative.

The correct way: cos⁡120°=−0.5\cos 120° = -0.5, cos⁡135°=−2/2\cos 135° = -\sqrt{2}/2, cos⁡150°=−3/2\cos 150° = -\sqrt{3}/2. The negative sign means the −2xycos⁡A-2xy \cos A term adds to the length (subtracting a negative). The diagonal across an obtuse angle is the longer of the two.

Mistake 3: Confusing the diagonal formula with the area formula.

Where it slips in: A student computes the diagonal as xysin⁡Axy \sin A — which is actually the area of the parallelogram, not the diagonal.

Don't do this: Memorise the formula by surface pattern (sides + angle) without distinguishing which output it produces.

The correct way: Area of a parallelogram = xysin⁡Axy \sin A. Diagonal of a parallelogram = x2+y2±2xycos⁡A\sqrt{x^2 + y^2 \pm 2xy \cos A}. The units are different — area is in square units; diagonal is in linear units. The unit-check catches the mistake immediately.

A real-world version of "wrong-formula-for-the-output" mistakes. In 1986, NASA's Space Shuttle Challenger disintegrated 73 seconds after launch because an O-ring seal failed at low temperature. Engineers had data showing the O-ring's performance versus temperature — but they read the chart as showing the probability of failure when it actually plotted the number of past incidents. Same shape of data, wrong interpretation of axis. The structural mistake is identical to a student using a formula whose inputs match the problem but whose output answers a different question entirely. Always check what the formula returns, not just what it accepts.

Bottom Line

  • The diagonal of parallelogram formula is p=x2+y2−2xycos⁡Ap = \sqrt{x^2 + y^2 - 2xy \cos A} for one diagonal; the other diagonal uses +2xycos⁡A+2xy \cos A.

  • The formula is the law of cosines applied to the triangle formed by the diagonal and two adjacent sides — no new geometry needed.

  • The parallelogram law, p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2), is the cosine-free cross-check.

  • The single most common error is dropping the negative sign on cos⁡\cos of an obtuse angle — which flips one diagonal into the wrong length entirely.

  • The same formula governs vector addition: the resultant of two forces meeting at angle θ\theta is the diagonal of the parallelogram they form.

Take These for a Test Drive — Three Problems

  1. A parallelogram has adjacent sides 7 cm and 10 cm with the included angle 45°45°. Find both diagonals.

  2. A parallelogram has sides 8 cm and 6 cm, and one diagonal of length 12 cm. Find the other diagonal using the parallelogram law.

  3. A square has diagonal 525\sqrt{2} cm. Find its side length, then verify the parallelogram law.

If Problem 1 gave you the same number for both diagonals, you forgot the sign flip on cos⁡A\cos A. Return to the cosine-sign table in Mistake 2.

Want a live Bhanzu trainer to walk your child through quadrilateral properties and the Class 9 / Class 10 chapters? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the diagonal of parallelogram formula?
p=x2+y2−2xycos⁡Ap = \sqrt{x^2 + y^2 - 2xy \cos A} for one diagonal, q=x2+y2+2xycos⁡Aq = \sqrt{x^2 + y^2 + 2xy \cos A} for the other, where xx and yy are adjacent sides and AA is the included angle.
How do you find both diagonals of a parallelogram?
Use the formula above with cos⁡A\cos A for the diagonal opposite angle AA, and cos⁡(180°−A)=−cos⁡A\cos(180° - A) = -\cos A for the other. Or use the parallelogram law p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2) to get the second diagonal once you have the first.
What is the parallelogram law?
The sum of the squares of the two diagonals equals twice the sum of the squares of the two sides: p2+q2=2(x2+y2)p^2 + q^2 = 2(x^2 + y^2). It's the cosine-free identity that lets you cross-check diagonal computations.
Do the diagonals of a parallelogram bisect each other?
Yes — but they only bisect at right angles in a rhombus (or square). In a general parallelogram, the diagonals bisect each other but meet at an angle that depends on the side lengths.
Are the diagonals of a parallelogram equal in length?
Only in a rectangle (where both equal x2+y2\sqrt{x^2 + y^2}) and a square (a special rectangle). In a general parallelogram, the two diagonals are unequal — and computing them requires the formula above.
How does the diagonal formula relate to the law of cosines?
The diagonal formula is the law of cosines applied to the triangle formed by two adjacent sides of the parallelogram and one of its diagonals. Same algebra, geometric specialisation.
What is the diagonal of a square with side aa?
A square is a parallelogram with x=y=ax = y = a and A=90°A = 90°. So p=a2+a2−2a2cos⁡90°=2a2−0=a2p = \sqrt{a^2 + a^2 - 2 a^2 \cos 90°} = \sqrt{2a^2 - 0} = a\sqrt{2}. Both diagonals are equal to a2a\sqrt{2}.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →