Fundamental relations for the velocity dispersion of stars in the Milky Way