Some useful mathematics.