Projection Factors and Generalized Real and Complex Pythagorean Theorems