Mathematical Theory of Localization