From Box Edges to Diagonals
A rectangular box has edges of three lengths, and its faces are rectangles. If we know the component vectors of the edges that start at one corner, we can find the displacement to other vertices by adding those vectors. Two edge vectors give a face diagonal; three give a space diagonal.
The directions of the edge vectors matter. To use addition for a diagonal starting at a particular corner, each edge vector must point outward from that same corner. A vector describing an edge but directed the other way will not give the required displacement when added.
In the coordinate examples here, the coordinate axes are chosen parallel to the box edges. This makes the edge vectors especially simple: each has one nonzero component. The same addition principle applies whenever the edge vectors are given by their components.
Edge Vectors at a Chosen Corner
Suppose the three edges from \(A\) have lengths \(a\), \(b\), and \(c\), with \(a,b,c>0\). Choose coordinates so those edges point along the positive coordinate directions. Their outward edge vectors are
The endpoint reached by following an edge vector from a point is found by adding that vector to the point’s coordinates. Thus, if \(A=(x_0,y_0,z_0)\), the three adjacent corners are \(A+\mathbf{u}\), \(A+\mathbf{v}\), and \(A+\mathbf{w}\). The vector from a point \(P\) to a point \(Q\) is \(Q-P\), component by component.
If the box extends in negative coordinate directions instead, the corresponding components are negative. For example, an edge of length \(a\) pointing in the negative \(x\)-direction has vector \((-a,0,0)\). The length is positive; the sign records direction.
Face Diagonals
Consider the rectangular face containing the two edges represented by \(\mathbf{u}\) and \(\mathbf{v}\). Starting at \(A\), follow \(\mathbf{u}\) and then follow a copy of \(\mathbf{v}\). The resulting endpoint is \(A+\mathbf{u}+\mathbf{v}\), so the displacement from \(A\) to that endpoint is \(\mathbf{u}+\mathbf{v}\).
With the coordinate-aligned edges above, the face diagonal vector and its length are
The length follows from the three-dimensional magnitude formula: for a vector \((x,y,z)\), its magnitude is \(\sqrt{x^2+y^2+z^2}\). Here the third component is zero. The other faces use the corresponding pairs of edges.
Space Diagonals
A space diagonal joins a corner of the box to the corner opposite it through the interior. From a chosen corner, the opposite corner is reached by moving along all three edges. Therefore its displacement vector is the sum of the three outward edge vectors.
For coordinate-aligned edge vectors, this gives
These length formulas use the coordinate-aligned representation. The diagonal vector itself is obtained by vector addition; its length is then found from its components using the magnitude formula.
Why Adding the Edges Gives the Diagonal
The reason is that consecutive displacements add. This can be checked directly from endpoint coordinates, without relying on a sketch that might obscure the vector directions.
Let its position be \(A=(x_0,y_0,z_0)\), and let the outward edge vectors be \(\mathbf{u}=(u_1,u_2,u_3)\), \(\mathbf{v}=(v_1,v_2,v_3)\), and \(\mathbf{w}=(w_1,w_2,w_3)\).
After moving along \(\mathbf{u}\), the position is \(A+\mathbf{u}\). After then moving along \(\mathbf{v}\), it is \(A+\mathbf{u}+\mathbf{v}\).
The displacement to the resulting corner is \((A+\mathbf{u}+\mathbf{v})-A=\mathbf{u}+\mathbf{v}\). Including the third edge gives \((A+\mathbf{u}+\mathbf{v}+\mathbf{w})-A=\mathbf{u}+\mathbf{v}+\mathbf{w}\).
This also explains the condition about outward directions. Each vector in the sum must describe the next edge displacement along the route from the selected starting corner. If one vector points toward that corner instead, its sign does not describe the required step.
Worked Examples
Worked Example: Face and Space Diagonals from Edge Lengths
A box has coordinate-aligned edge vectors \(\mathbf{u}=(3,0,0)\), \(\mathbf{v}=(0,4,0)\), and \(\mathbf{w}=(0,0,12)\) from \(A=(2,-1,3)\). Find a face diagonal using \(\mathbf{u}\) and \(\mathbf{v}\), and find the space diagonal vector and its length.
First add the two outward edge vectors for the face diagonal:
The opposite face corner has coordinates \(A+\mathbf{u}+\mathbf{v}=(2+3,-1+4,3+0)=(5,3,3)\). The displacement back-check is \((5,3,3)-(2,-1,3)=(3,4,0)\), as required. Its length is
For the space diagonal, add all three edge vectors:
The opposite box corner is \((2+3,-1+4,3+12)=(5,3,15)\). Subtracting the starting point gives \((5-2,3-(-1),15-3)=(3,4,12)\), which checks the diagonal vector. Its length is
Worked Example: Edge Vectors with Negative Components
From \(A=(5,-2,7)\), a box has outward edge vectors \(\mathbf{u}=(-6,0,0)\), \(\mathbf{v}=(0,2,0)\), and \(\mathbf{w}=(0,0,-3)\). Find the face diagonal using \(\mathbf{u}\) and \(\mathbf{v}\), and the space diagonal vector and length.
The face diagonal vector is
Its endpoint is \(A+\mathbf{u}+\mathbf{v}=(5-6,-2+2,7+0)=(-1,0,7)\). The endpoint difference is \((-1-5,0-(-2),7-7)=(-6,2,0)\). Its length is \(\sqrt{(-6)^2+2^2+0^2}=\sqrt{36+4}=\sqrt{40}=2\sqrt{10}\).
The space diagonal vector is
The opposite corner is \((5-6,-2+2,7-3)=(-1,0,4)\), and subtracting \(A\) gives \((-1-5,0-(-2),4-7)=(-6,2,-3)\). Its length is \(\sqrt{(-6)^2+2^2+(-3)^2}=\sqrt{36+4+9}=\sqrt{49}=7\). The negative components correctly record the directions of travel; they do not make the corresponding edge lengths negative.
Worked Example: Recovering Edge Vectors from Coordinates
A box has one corner \(A=(-3,1,2)\). Three adjacent corners are \(B=(-3,1,8)\), \(C=(-3,5,2)\), and \(D=(2,1,2)\). Find the three outward edge vectors, the space diagonal vector to the opposite corner, and its length.
Subtract \(A\) from each adjacent corner:
Adding these three outward vectors gives the space diagonal:
The opposite corner is \(A+(5,4,6)=(-3+5,1+4,2+6)=(2,5,8)\). Subtracting \(A\) from this point gives \((2-(-3),5-1,8-2)=(5,4,6)\), confirming the vector. Its length is \(\sqrt{5^2+4^2+6^2}=\sqrt{25+16+36}=\sqrt{77}\).
A Direction Pitfall
It is not enough to identify two edges that meet at a corner. Their vectors must both point from that corner if their sum is to give the diagonal starting there. For a concrete check, consider a rectangle with corners \((0,0)\), \((5,0)\), \((0,2)\), and \((5,2)\). Take the starting corner to be \(R=(5,0)\). The opposite corner is \((0,2)\), so the required diagonal displacement is \((-5,2)\).
A wrong calculation might use \((5,0)\) and \((0,-2)\), then add them to get \((5,-2)\). Those vectors describe edges, but they do not both point outward from \(R\): the outward vectors from \(R\) are \((-5,0)\) and \((0,2)\). Their sum is \((-5,2)\), which agrees with the actual displacement \((0,2)-(5,0)=(-5,2)\).
Why These Diagonals Are Useful
In coordinate geometry, a box often models a region with three independent side lengths—for example, a storage container, a room, or a three-dimensional grid cell. Edge vectors record both direction and length, while diagonal vectors give direct displacements between corners. These are useful distinctions: a displacement is a vector, whereas a diagonal length is a nonnegative number.
The component method also makes it straightforward to check a result. For a face diagonal, the unused coordinate stays unchanged when the box edges are coordinate-aligned. For a space diagonal, all three edge contributions appear. In either case, adding vectors gives the displacement; applying the magnitude formula gives its length. Keeping those two operations separate helps prevent confusing a diagonal vector with its magnitude.
Check Your Understanding
For each question, pay attention to the starting corner and to the direction of every edge vector.
- From \(A=(1,2,0)\), the outward edges are \((4,0,0)\) and \((0,3,0)\). What is the face diagonal vector and its length?
- From a corner, the outward edge vectors are \((-2,0,0)\), \((0,5,0)\), and \((0,0,6)\). What is the space diagonal vector?
- Why must edge vectors used in a diagonal sum point outward from the same corner?
- A space diagonal vector is \((2,-3,6)\). What is its magnitude?
- How can endpoint coordinates be used to check a proposed diagonal vector?