One of the oldest tricks in the woodworking book, so to speak, is a simple method for determining when any assembly or item is square. This basic trick really isn't a trick at all; it is based on Pythagorean's Theorem, which states:
The sum of the squares of two sides of a right triangle is equal to the square of the third side, or hypotenuse.
In other words, if you wanted to determine if an assembly was square using math, select the face that you want to check for square. Check one corner of the assembly with a framing or combination layout square to make sure that it is a right angle. Then, using a tape measure, measure along one edge from that right angle to get the length, and using a calculator, multiply that length value times itself (or square the length value). Save this squared length into the calculator's memory.
Next, measure one of the edges adjacent to the edge that you previously measured to get the width of the assembly. Perform the same task, multiplying this value times itself (or squaring the value), then add it to the original value in the memory of the calculator. You now have one half of the equation complete.
To obtain the third value, measure diagonally (unobstructed) from the open end of the long edge to the open end of the wide edge. This will provide what is called the hypotenuse. Multiply the hypotenuse times itself and if that value matches the sum of the two squared sides (in other words, the value that you have stored in memory, your assembly is square.
The 3-4-5 Rule
This is sometimes referred to in woodworking as the 3-4-5 rule. While you can always use the 3-4-5 Rule to determine square on any scale when you're laying out a project, there is a more precise (and much faster) way to determine whether your nearly-completed assembly is square.
Measure the diagonals with a tape measure and check to see if the two distances match. If they are equal, your assembly is square.
Case in point: take a look at a drawing of a raised-panel exterior door. If we measure from one corner to the opposite corner diagonally (as shown by the red line), and then compare that distance to the opposite diagonal measurement (as depicted by the blue line), the two distances should match exactly. If they are equal, the assembly is square.
Now, what do you do if the two diagonal measurements don't match? Adjust the assembly. In the image above, if the red line's length is longer than the blue line's length, push inward on the two red corners. If the blue line's length is longer, push inward on the two corners of the assembly at the ends the blue line. After adjusting, cross-measure both diagonals to check for square again. Keep adjusting and cross-measuring both diagonals until the distances match, and your assembly will be square.