Quantum mechanics is the branch of physics that studies the behavior of matter and energy in the presence of an observer. It is the foundation of modern physics and the theory of the wave-particle duality.