Recently, I've been seeing a lot of discussions about works that subvert a given trope. I think I have an understanding of what this means (from context) but can someone offer a clear definition or explanation?
A writing "trope," generally speaking, is a commonly used thematic element. The term is sometimes used interchangeably with "cliche" or "stereotype." To subvert it is to make deliberate use of it, but with a change that undercuts or reverses the typical meaning.
For example, the "Man in Black" turning out to be the hero of The Princess Bride subverts the trope of the hero dressing in white, the villain in black.
A trope is a cliché setup; of any kind, that audiences have come to expect.
An example in a commercial is the great looking guy catching sight of a jaw-dropping girl, dropping everything to approach her as she smiles, and walking past her to the new car, or picture of a stacked burger, or to the nerdy guy with the new iPhone.
Another commercial: A man hears music blasting in his front yard; cut to a teen holding a boom box up, looking to the window on the second floor; cut back to man with his iphone punching a button, cut to teen -- lawn sprinklers come on full blast and the teen is surprised and runs for cover.
In Deep Blue Sea, they subvert a racist trope: LL Cool J plays a black cook in a film where nearly every main character gets eaten by genetically engineered clever sharks. The racist trope, built up over numerous movies in the previous decades, is that black characters die first. (This is racist and was not invented or ever used by ME, please hold any angry comments.) However, in DBS although Samuel L. Jackson does get eaten by a shark, LL Cool J the lowly cook comes close but always escapes by wit and action; in fact he ends up one of the two survivors. (But Samuel L. Jackson breaks the same racist trope in Die Hard with a Vengeance; as a black store owner reluctantly caught up in Bruce Willis' bid to stop a lethal heist; but Jackson's character (Zeus Carver) ends up a brave and useful sidekick that survives the entire ordeal).
Broke Back Mountain is subverting the trope of Cowboy Masculinity.
Buffy the Vampire Slayer subverts the trope of the helpless teen cheerleader that is typically an eye candy cardboard character.
In the series Heroes, Hayden Panettiere played Claire Bennett; another cheerleader type that looks like a petite, beautiful, helpless teen. But she has unlimited magical healing powers and (for a few seasons at least) apparently cannot be killed; making her one of the most formidable fighters of all heroes.
The Truth About Cats and Dogs is a romantic comedy that subverts a trope: Unlike other romantic comedies in which the female romantic interest tends to be beautiful (younger Meg Ryan, Julia Roberts), here the love interest is a short, plain girl (played by Janeane Garofolo).
In the series Psych, the "Sherlockian" detective (uses hyper-observational powers) subverts the Sherlock trope by being an immature, lazy, get-rich-quick liar. (The Sherlock Holmes trope is more like the series Elementary; but they then subvert that trope by making sidekick Watson a female doctor, and often the smartest person in the room except for Sherlock -- and sometimes beating even him to the punch.)
In The Mentalist, the Sherlockian detective subverts the Sherlock trope by being a carny con man. (also female sidekick and eventual love interest.)
In the series Monk, the Sherlockian detective subverts the Sherlock trope by being an obsessive compulsive afraid of just about everything (in advertising, the Defective Detective; although they were not the first to use it).
Subverting a trope is just writing against any "formula" the audience has come to expect (even subconsciously) from a genre; be it horror, romantic comedy, action/adventure, war or drama. It can be a minor part of the movie or a major component of it. It is a way of injecting surprise into the work. But it can be overdone or come off as flat or unsatisfying: Some tropes are founded in human nature, and often if audiences cannot identify with the character violating the trope, the story will fall flat.
Here's a good example of subverting a trope and then subverting the subversion: in the original Mass Effect game trilogy, one of the alien species you encounter is the asari. Asari are the stereotypical beautiful all-female humanoid alien species that have long been a cliché in science fiction, especially when one of the ones you first encounter on one of the first side-missions is, for all the talking around about it, a glorified prostitute, and soon you find more as strippers at a low-life bar. So that's following the standard hypersexual Green Skinned Alien Space Babe (although they're mostly blue, but you get the idea), just like the portrayals of the Orion women in the original Star Trek.
Okay, now subversion: although you see asari as stereotypical initially, as the games go on, most of the asari you meet subvert that stereotype. Liara is a shy, geeky archeologist and a virgin. You meet asari commandos, who are deadly opponents, and asari politicians and diplomats and business people and scientists, and so on and so forth. The Green Skinned Alien Space Babe trope is subverted and although the player can still encounter asari strippers in bars, that's not what you think of the asari as. Now there's several new tropes in play, one of which is that you shouldn't think of the asari as just sexy aliens who will have sex with anyone of any species.
Then they subvert the subversion: you meet one asari matriarch who complains that young asari spend too much time whoring it up around the galaxy. You meet another asari who is a ruthless crime boss who seized control of a space station by having her subordinates sleep their way into the confidence of her rivals before she took them out. And you find out there's a quirk of asari biology and reproduction that makes it desirable for them to mate outside their species. In short, the stereotypes people have about the asari are somewhat justified, as the asari themselves admit (and some take advantage of).
So there is an example of subverting a trope: the game set up the player to believe the asari were following a standard SF trope, then subverted it, then went and subverted that by justifying the original trope.
Note that the original Green Skinned Alien Space Babes, the Orions, likewise subverted their own trope on Enterprise when it was revealed that the females emitted pheromones that controlled their males and could affect other species. They intentionally played up their role as simple sex objects in order to manipulate others.