Generalization of the Pythagorean Eigenvalue Error Theorem and Its Application to Isogeometric Analysis