How to Square a Wall or Layout for a Foundation
When laying out the foundation for a house the way I always square a house is this. First of all, you know you will have one straight wall or line, and you will know the length. Pop a line for that first wall and make a mark at each end. You now have the first wall, the length and location.
Now from one end of the first line hook your tape on that mark that is the end of the wall. You know the length wall running 90° of the first wall. Now is when you figure the two walls for square. A squared + B squared = C squared, you want to figure the hypotenuse of the triangle. Say the wall is 16 feet 4 inches, convert the feet and inches to all inches this will = 196 inches. Now the wall running 90° to the first wall lets say 13 feet 7 inches which = 163 inches. With a calculator multiply the first number by itself. 196X196 =38,416, not put that in your memory plus of the calculator. Next multiply the second number by itself, 163X163 =26,569, add that number to the memory plus on your calculator. Now hit memory recall button and next hit the square root button. This will give you the number 254.92159 which is the distance from one corner to the other of that room. Convert this back into inches and feet which is by dividing by 12. This = 21.243465 so you have 21 feet .243465. Multiply .243465 by 12 inches (one foot) which will = 2.92158 which is 2 and a fraction of an inch. This fraction of an inch is so close to 15/16 that it is safe to round it up. so the measurement from one corner of the room is 21 feet 2 15/16 inch. This will be the hypotenuse of the triangle the two walls form. You already have the first wall line where it is supposed to go. Now take two tape measures, hook one on the end mark of the first wall. At the other end of that wall hook the other tape on the end of that wall at the mark you made. Now just lay the first tape down anywhere. Pull the second tape out the measurement of the wall running 90° of the first wall. You will want the number on the tape to be 13 feet 7 inches, now take the first tape that is hooked on the other end of the first wall and pull it across the second tape, you will want the number 21 feet 2 15/16 to intersect with the number 13 feet 7 inches. Mark right there, that is the corner of the room and will be square. I hope this isn't too confusing. 
Nice! I used to use that theory for framing foundations and decks, it's a good one! Even nicer with the old "construction master" calculator, lol. When I needed a 45* brace on a 7' high gable end, I thought; There must be a quicker way than all that math... Realizing when I made the cuts for rafters using the framing square set on 1' each way (tongue/blade) the diagonal measurement always added 5" or 17" total in the flat plane  used as a standard. So applying that to the length I needed for the brace; 7' times 5 = 35" + 7' = 1" short of 10' or 9'11" Math= 9' 1013/16"..... 5' height = 5x5 = 25" (2' 1") plus 5' = 7'1" Math= 7' 7/8" Close enough for a brace.
I'll use this for rough square on footings, etc. obviously it won't work on accuracy needed measurements, 20' footing leg each way for a rightangle is 20 x 5 = 100" OR in ft./in. = 8'4" + 20' = 28'4" Math check= 28' 37/16"  so I'm off 9/16" in diagonals of 20', good enough for a quick footing set without a calculator or phone just head math. Neat part is; go to an larger number than needed (for feet/with inches) and set the pin/mark there for the roughset, snap the line to that. Gary PS. Though I'd share that, if you don't mind... 
square a wall? use the 3,4,5 triangle method
use the 3 4 5 triangle concept...(6 8 10 also works)

All times are GMT 5. The time now is 08:14 AM. 