An antihero (sometimes spelled as anti-hero) or antiheroine is a main character in a story who may lack conventional heroic qualities and attributes, such as idealism, courage, and morality. Although antiheroes may sometimes perform actions that most of the audience considers morally correct, their reasons for doing so may not align with the audience's morality. An antihero typically exhibits one of the "Dark triad" personality traits, which include narcissism, psychopathy, and machiavellianism.
Antihero is a literary term that can be understood as standing in opposition to the traditional tragic hero, i.e., one with high social status, well liked by the general populace, and possessing a tragic flaw. Past the surface, scholars have additional requirements for the antihero. Willy Loman, as shown through his name ("low man"), embodies the base antihero. Some scholars refer to the "Racinian" antihero, who is defined by several factors. The first is that the antihero is doomed to fail before their adventure begins. The second constitutes the blame of that failure on everyone but themselves. Thirdly, they offer a critique of social morals and reality. To other scholars, an antihero is inherently a hero from a specific point of view, and a villain from another. This idea is further backed by the addition of character alignments, which are commonly displayed by role-playing games.
Typically, an antihero is the focal point of conflict in a story, whether as the protagonist, or as the antagonistic force. This is due to the antihero's engagement in the conflict, typically of their own will, rather than a specific calling to serve the greater good. As such, the antihero focuses on their personal motives first and foremost, with everything else secondary. 
An early antihero is Homer's Thersites. The concept has also been identified in classical Greek drama, Roman satire, and Renaissance literature such as Don Quixote and the picaresque rogue.
The term antihero was first used as early as 1714, emerging in works such as Rameau's Nephew in the 18th century, and is also used more broadly to cover Byronic heroes as well, created by the English poet Lord Byron.
Literary Romanticism in the 19th century helped popularize new forms of the antihero, such as the Gothic double. The antihero eventually became an established form of social criticism, a phenomenon often associated with the unnamed protagonist in Fyodor Dostoyevsky's Notes from Underground. The antihero emerged as a foil to the traditional hero archetype, a process that Northrop Frye called the fictional "center of gravity". This movement indicated a literary change in heroic ethos from feudal aristocrat to urban democrat, as was the shift from epic to ironic narratives.
Huckleberry Finn (1884) has been called "the first antihero in the American nursery". Charlotte Mullen of Somerville and Ross's The Real Charlotte (1894) has been described as an antiheroine.
The antihero became prominent in early 20th century existentialist works such as Franz Kafka's The Metamorphosis (1915), Jean-Paul Sartre's Nausea (1938), and Albert Camus's The Stranger (1942). The protagonist in these works is an indecisive central character who drifts through his life and is marked by boredom, angst, and alienation.
The antihero entered American literature in the 1950s and up to the mid-1960s as an alienated figure, unable to communicate. The American antihero of the 1950s and 1960s was typically more proactive than his French counterpart. The British version of the antihero emerged in the works of the "angry young men" of the 1950s. The collective protests of Sixties counterculture saw the solitary antihero gradually eclipsed from fictional prominence, though not without subsequent revivals in literary and cinematic form.
During the Golden Age of Television from the 2000s and into the present time, antiheroes such as Tony Soprano, Gregory House, Walter White, Don Draper, Marty Byrde and Nucky Thompson became prominent in the most popular and critically acclaimed TV shows.
A new book explains the link between the rise of antihero protaganists and the unprecedented abundance of great TV (and what Dick Cheney has to do with it).