Mathematical formulation of quantum mechanics