Theory of light-matter interaction