The Mathematics of Mixers: Basic Principles