Asked to name a great physicist, most people would mention Newton or Einstein, Feynman or Hawking. But ask a physicist and there’s no doubt that James Clerk Maxwell will be near the top of the list.Maxwell, an unassuming Victorian Scotsman, explained how we perceive colour. He uncovered the way gases behave. And, most significantly, he transformed the way physics was undertaken in his explanation of the interaction of electricity and magnetism, revealing the nature of light and laying the groundwork for everything from Einstein’s special relativity to modern electronics.Along the way, he set up one of the most enduring challenges in physics, one that has taxed the best minds ever since. ‘Maxwell’s demon’ is a tiny but thoroughly disruptive thought experiment that suggests the second law of thermodynamics, the law that governs the flow of time itself, can be broken. This is the story of a groundbreaking scientist, a great contributor to our understanding of the way the world works, and his duplicitous demon.