Wednesday, April 10, 2013

The Physics of Magic

Recently I reviewed A Memory of Light by Brandon Sanderson and in the process read Sanderson’s Mistborn trilogy (plus his stand-alone steampunk novel in the same universe). One of the striking features of all of these books is Sanderson’s use of a “hard magic” system, which I enjoyed thoroughly, and which made me want to investigate further. It turns out that Sanderson has written quite extensively about his ideas on magic systems and has penned two laws:

1) “An author's ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic.”

2) “Limitations > Powers”

For those of you who have already read his essays on these two laws, you’re way ahead of me, but for those of you who haven’t, I highly recommend them (he just so happens to be a much better writer than I ever will be). In the first law, Sanderson classifies magic systems as “hard,” “soft,” or “middle,” An example of “hard” would be his own Mistborn system, while Lord of the Rings is a “soft” system, and Harry Potter is a “middle” system. The second law is rather self-explanatory, although in his essay, Sanderson gives some excellent discussion on how limitations can lead to plot and character development.

One of Sanderson’s statements from his first essay, however, particularly caught my interest as a physicist (when I first read this my mind apparently substituted the word physics for science):

“Note that by calling something "Hard Magic" I'm not implying that it has to follow laws of science.”
This is of course very true.  Magic does not have to follow science, but what is interesting to me is that in the end it almost always does, up to a point. For example, every fantasy novel I have ever read maintains gravity, as described by current theory. We don’t see worlds created where massive objects are repelled from each other (rather than attracted with a force proportional to the inverse of the distance squared, like normal gravity) or where gravity is much stronger than electromagnetism (leading to some very strange problems, least of which, atoms not holding together properly). As a matter of fact, most of the physics laws that make the universe habitable to life as we know it are kept just the way they are.

As a brief aside, the only fantasy author I know who actively changes the law of physics is Terry Pratchett. For example, in the opening of Light Fantastic he implies that light interacts directly with magic, much as it does with electromagnetic fields,

“When light encounters a strong magical field it loses all sense of urgency. It slows right down.”

If we were to interpret this with particle physics, we would add a magical field to our Lagrangian density, and be able to draw Feynman diagrams of photons interacting with magical bosons. I sense a very fun yet completely unpublishable physics paper emerging from this train of thought.

Anyhow, getting back on track, there is a very simple explanation as to why authors do not change the laws of physics (which are really rather finicky). If they did, they would end up with a world that would have absolutely no connection with ours, and the story would no longer read like a fantasy novel but more like a very oddly constructed physics paper, and probably a boring one at that. Consequently, when we read a fantasy novel, we subconsciously assume that all the laws of physics hold, unless mentioned otherwise, both implicitly or explicitly.

But what kind of laws are being implicitly broken without us even noticing?

Let us consider Harry Potter. As Sanderson mentions, the Harry Potter system is a “middle” magic system, and there are rules that change or are forgotten throughout the books. But one rule that holds rather constant is that food cannot be created by magic, i.e. we have a magical law that states that mass (or at least a very specific form of mass) cannot be created by magic. One of the results of special relativity is that energy and mass are equivalent, which is quite nicely summed up with the famous equation E = mc^2. This is the law that makes fission (and fusion) possible where mass is converted into energy. Consequently, if we have a magic system where unlimited energy is available, then unlimited mass is also available. Since it is clear that energy is created in Harry Potter (levitation, fireballs, light all available without noticeable change in environment) through magic, E = mc^2 must no longer hold, even though not explicitly stated.

So, indirectly, due to the magical law that food cannot be created, one of the most important results of special relativity is rendered useless in Harry Potter. No nuclear reactors in that universe! But we can take this even further. We have also made the assumption that energy is created and not conserved, which is a common law of many magic systems. In physics, Noether’s theorem states that for every symmetry, there is a conserved quantity. It just so happens that the symmetry that leads to conservation of energy, is the symmetry of time. Symmetry of time essentially states that the laws of physics do not change. In the end, Harry Potter has not only thrown special relativity out the window, but also the constantness of physics laws over time, so we very well might expect gravity to be turned on its head some morning in the Harry Potter universe!

So what is the point of all this? Well, some physicists apparently have too much time to think about these things and should just enjoy the magic of fantasy novels.  And also, Brandon Sanderson was right all along--magic most certainly does not have to follow the laws of science, and in fact, it is perhaps more enjoyable and exciting when it does not.

By Philip Ilten


  1. Your analysis is very interesting, however, limitations like 'you can't X' in fiction should be generally regarded as 'some folk in the past tried tried to X (really hard, over extended periods of time, using different techniques), but it didn't work out'. Just like we speak of conservation of energy. Some folk wasted their time on perpettum mobile, so we think you can't create energy (from nothing).
    This generally brings us to a conclusion that heroes won't be able to do it, unless properly foreshadowed (by having some specifically useful skillset, mindset or even raw power level).
    However, if the verse has science-like approach to magic, we will be facing exactly the domino problem you stated.

  2. The matter of food not being created may have more to do with the complexity of chemicals and the strange disconnection between wizards and the modern world seen in the books. Another point is that matter is a lot of energy, and a wizard might not be able to focus that much energy densely enough to synthesize matter.
    I personally take the approach that magic is science when writing, most of my spellcasters dislike the term and prefer names like Natural Philosophy. Only witches call it magic because they get their power from other beings, and therefore don't understand what they call magic on a scientific nature.
    The result is actually fairly decent and tries to avoid pseudoscience- no mirror dimensions, for instance, and even calling alternate universes and other worlds different "dimensions" is enough to throw most of my spellcasters into a fit of enraged lecturing about the nature of spacetime and what a dimension actually is; in part, this is an expression of everything I hate about pseudoscience. Faerie land where its always daytime is a dyson sphere; the circles of hell are ring worlds and so on. Rational physics based explanations for everything, and my wizards still get to throw lightning around. Some of its vague, but never breaks physics quantum teleportation and exploitation of superposition states explains a lot- I have wands being very complex devices able to manipulate plasmonic interactions (wherever photons and electrons meet, responsible for 90% of physical interactions we experience) and dark magic is literally magic that doesn't have a supporting theory of how it works; but only witches get it from other beings.
    Basically, my message is that magic-as-science because magic is science that peasants don't understand actually works really well, if done right. It gives a good level of power to magic users without having to have odd reasons as to why they're not gods. It also gives fun little peeks into the gears of your world and let's you explore concepts you don't often see in fantasy- never mind it gives a pretty clear idea of the limitations of magic. Why can't wizard x just destroy a while nation? Same reason scientist y in the real world can't. Not enough energy and believed me, quantum teleporting electrons are pretty damn magical if you ask me.