A frequent particular case occurs when is a function from to another set ; if whenever , then is said to be a morphism for , a class invariant under , or simply invariant under .
Any function itself defines an equivalence relation on according to which if and only if .