It has been interesting this week to see the reaction online to a certain big TV event earlier in the week (keeping it vague to avoid spoilers — if you’ve seen it, you’ll know what I’m talking about, but if you haven’t, this is still about writing). It looks to me like a significant portion of the Internet is unclear on the concept of what a Mary Sue is and skipped class the day they talked about deus ex machina when studying literature.
A Mary Sue is not a female character who’s at all competent. It’s a mocking term for a fan fiction trope. The term was coined in a satirical piece mocking the trope of the author’s self-insert character who takes over the story. “Ensign Mary Sue” in a Star Trek story was the new crew member who could navigate better than Chekov, pilot better than Sulu, outthink Spock, quickly solve engineering problems that baffled Scotty, and had a beautiful singing voice and was a brilliant dancer. Everyone loved her, and Kirk, Spock, or whichever character the author was in love with fell madly in love with her. Since fan fiction is written mostly for fun, I really have no problem with someone writing a Mary Sue. I think that’s how a lot of writers begin, in imagining a role for themselves in their favorite stories. It’s just not a lot of fun for anyone else to read because they’re reading for the characters they love, not for someone else’s self insert. To be totally honest, I’ve mentally “written” tons of Mary Sue stuff. That really was how I started making up stories, creating roles for myself and imagining how an idealized version of myself might fit into that world. I hope mine weren’t quite that egregiously perfect, but there’s a reason I never wrote them down and never shared them with others. They were for my own amusement.
There’s a huge disagreement over whether there can be a Mary Sue in original fiction, since there’s no new non-canon character being inserted into an established cast. I think it does happen when there’s a character an author is incapable of being objective about, either because they identify too closely with that character or because they’re in love with that character. An original Mary Sue tends to be a bland character with little development because the author’s love means she already thinks the character is fascinating, so there’s no need to do the usual work of making the character interesting to the audience. The rules of the universe warp around this character, so she gets everything she wants, is good at everything just because she’s special, and other characters bend over backward to serve her (unless we’re dealing with a Victim Sue, who is unfairly vilified in spite of being perfect, with everyone hating her because they’re just jealous). I happen to think that Anakin Skywalker in the Star Wars prequels has more than a tinge of Gary Stu (the male version) to him. It really seems like Lucas overidentified with him, for whatever reason, and that meant he was just automatically good at everything, he was the Chosen One With Magical Specialness, everyone adored him even though he was actually kind of a jerk, and it was so very unfair when they didn’t give him everything he wanted that he turned evil.
A character can be incredibly skilled and competent without being a Mary Sue. We just need to see the work that goes on to gain that skill. Spending years in training and gaining experience in preparation for doing something big means the character probably isn’t a Mary Sue. We’re seeing the work and the struggle behind the skill.
Meanwhile, “deus ex machina” means “god from the machine” and comes from ancient Greek drama, in which situations were often resolved with a god coming down from on high (using rigs, and thus the “machine”) to resolve the mortals’ problems. That was kind of the point of ancient Greek drama, to show that the gods were in control, but in modern fiction, the term has come to mean some random thing that comes out of nowhere to resolve the problem. It’s some object that happens to appear that’s just what they need or some new character who shows up to fix everything.
When a character who’s been there from the beginning and has spent years training to do a thing uses a thing that’s been there almost from the beginning and that’s been part of the story all along, and when it was a plot point that this character was given this thing, and when there was even a prophecy years ago suggesting that this character might do this thing, it’s not a deus ex machina. A deus ex machina would be if the exact magical device they needed to resolve the problem had just happened to show up at the right time, or if the problem was resolved by some new random character just showing up.
I also find it amusing that people who boast about how great something is because it busts tropes get so upset when that thing busts a trope.