# Formula for length of the diagonal of a parallelepiped

Let $$a,b,c$$ and $$\alpha, \beta, \gamma$$ are sides and angles ($$\alpha$$ is the angle between the sides $$b$$ and $$c$$ and so on) of a parallelepiped. By using the vector algebra it is easу to prove the formula for the length of the diagonal $$d$$ of this parallelepiped $$d=\sqrt{a^2+b^2+c^2+2ab\cos \gamma+2ac\cos \beta+2bc \cos \alpha}$$ Question. How to prove the formula without vectors?

It is clear that we have to use two times the cosine theoren but what is the angle between one side and the diagonal of parallelogram formed by two other sides?

• What don't you like about vectors? – YiFan Oct 26 at 9:33
• I need an elementary solution – Leox Oct 26 at 10:47
• Why aren't vectors elementary? – YiFan Oct 26 at 11:09
• Working backwards from the formula you already have, one can compute that $cos(\varphi)=\frac{a\cos(\beta)+b\cos(\alpha)}{\sqrt{a^2+b^2+2ab\cos(\gamma)}}$ with $\varphi$ the angle you need but proving this without the vector based results looks much harder than just using vectors. – quarague Oct 28 at 11:41
• yes, I also have derived this formula – Leox Oct 28 at 15:57

The formula can be derived from two geometric results/theorems:

1. Parallelogram law

In a parallelogram $$ABCD$$ with $$AB = CD = a, BC = DA = b$$, one has $$AC^2 + BD^2 = 2(AB^2 + BC^2) = 2(a^2+b^2)$$

Since in a parallelogram, $$\angle A = \angle C$$ and $$\angle B = \angle D = \pi - \angle A$$, one can easily derive this result from law of cosines.

2. The second result concerns parallel lines in space.

Two lines in space are parallel if either they are the same line or they lie in a common plane and didn't intersect. The results we need is "parallel-ness" among lines is transitive:

Given any three lines $$a, b, c$$; if $$a$$ is parallel to $$b$$ and $$b$$ is parallel to $$c$$, then $$a$$ is parallel to $$c$$. $$a \parallel b\quad\text{ and }\quad b \parallel c\quad\implies\quad a \parallel c$$

This can be proved from first principle using Hilbert's axioms. For a proof, see this answer.

Back to the original problem.

Let $$\mathcal{P}$$ be a parallelepiped with sides $$a,b,c$$. Let $$O$$ be a vertex of $$\mathcal{P}$$. Let $$A,B,C$$ be the three vertices adjacent to $$O$$ such that

$$|OA| = a, |OB| = b, |OC| = c, \angle BOC = \alpha, \angle COA = \beta, \angle AOB = \gamma$$ Let $$A_1,B_1,C_1,D$$ be the remaining 4 vertices of $$\mathcal{P}$$ oppositie to $$A, B, C$$ and $$O$$ respectively.

Being a parallelepiped, it faces are parallelograms. In particular, $$OAB_1C$$ and $$AC_1DC$$ are parallelograms. This implies $$OC \parallel AB_1, |OC| = |AB_1| \quad\text{ and }\quad AB_1 \parallel CD_1, |AB_1| = |C_1D|$$ By second result, $$OC \parallel CD_1, |OC| = |CD_1|$$ and $$OC_1DC$$ is a parallelogram. By a similiar arguments, $$OA_1DA$$ and $$AC_1A_1C$$ are parallelograms too.

Apply parallelogram law to parallelograms $$OC_1DC, OA_1DA, AC_1A_1C, OAB_1C$$, we obtain

\begin{align} OD^2 + CC_1^2 &= 2(OC^2 + OC_1^2)\\ OD^2 + AA_1^2 &= 2(OA^2 + OA_1^2)\\ AA_1^2 + CC_1^2 &= 2(AC^2 + AC_1^2) = 2(AC^2 + OB^2)\\ AC^2 + OB_1^2 &= 2(OA^2 + OC^2)\\ \end{align}

Sum the $$1^{st}$$ and $$2^{nd}$$ equation and subtract $$3^{rd}$$ equation from it, we obtain

\begin{align} OD^2 &= OC^2 + OC_1^2 + OA^2 + OA_1^2 - AC^2 - OB^2\\ &= OC^2 + OC_1^2 + OA^2 + OA_1^2 - (2OA^2 + 2OC^2 - OB_1^2) - OB^2\\ &= OA_1^2 + OB_1^2 + OC_1^2 - OA^2 - OB^2 - OC^2 \end{align}\tag{*1} Apply parallelogram law and law of cosines to faces $$OAB_1C$$, $$OBC_1A$$ and $$OCA_1B$$, we find

\begin{align} OA_1^2 &= b^2 + c^2 + 2bc\cos\alpha\\ OB_1^2 &= c^2 + a^2 + 2ca\cos\beta\\ OC_1^2 &= a^2 + b^2 + 2ab\cos\gamma \end{align}

Substitute this back into $$(*1)$$, the desired formula follows: $$d^2 \stackrel{def}{=} OD^2 = a^2 + b^2 + c^2 + 2bc\cos\alpha + 2ca\cos\beta + 2ab\cos\gamma$$

• the statement "Given any three lines a,b,c, one has" is incomplete – Leox Nov 2 at 7:13
• Nice. What about angles $DOA,DOB,DOC?$ – Narasimham Nov 2 at 11:59
• @Narasimham No idea about the angles. the whole point of this answer is to get rid of the use of angles as much as possible. – achille hui Nov 2 at 12:03

This solution is from SPHERICAL TRIGONOMETRY For the Use of Colleges and Schools.

by I. TODHUNTER, FIFTH EDITION. London, 1886 (p.125, ex.157)

(I post the links since for my reputation this site still does not allow to embed images..)

second

Hope this helps!

At last, I have found a solution in the book

Casey, John (1889). A Treatise on Spherical Trigonometry: And Its Application to Geodesy and Astronomy with Numerous Examples. London: Longmans, Green, & Company. p. 134. Problem 125  • References from a century and quarter before but still relevant! – Narasimham Nov 2 at 11:55