How does a magnetic field act on matter through space?