Tax optimization: the theory of matter