Who invented the movies?

The movies were invented in 1895 by the Lumière brothers, 2 engineers from Lyon, in France.

They were the first to project a film in public thanks to a machine that they built. But to invent this machine, the Lumière brothers were inspired by the work of many other inventors.

So, how were the movies invented?