Add isOrthogonal function