A nerd who is also a Jerkass.
In many stories, especially High School-related ones, the nerds and geeks are the heroes. This makes sense, since these groups are often bullied and victimized by "popular" and "cool" people. The nerdy characters are the underdogs who fight against their oppressors. But some nerds are just jerkasses. And this is what that trope is all about: jerkass nerds. In less sympathetic cases, these nerds will be unpopular because they're jerks and no one likes them. Their outcast status is portrayed as their fault. In these cases, the Jerkass Nerd's nerdiness may be played to make the audience dislike them. The nerd may be obnoxious or repulsive, or a Sickly Neurotic Geek. When the obnoxiousness is combined with the jerkassery, the audience thinks, "See, that's why no one likes them. I don't like them either." The nerd's nerdiness doesn't make them into The Woobie, it makes them into The Scrappy. In more sympathetic cases, a nerd's life as an outcast will lead them to become a jerk. The Jerkass Nerd may be a Jerk with a Heart of Gold. If nerds are heroes, then a Jerkass Nerd may serve as a good but jerky hero. Alternately, a Jerkass Nerd can serve as an enemy to the "good" nerds. This can create a war on two fronts: a war between the nerds and the "cool"/"popular" kids, and another war between the good nerds and the Jerkass Nerds. Even Nerds Have Standards may be invoked if even the nerdy heroes think the Jerkass Nerd's nerdiness is repulsive. Sadly, individuals with autism or Asperger Syndrome are sometimes portrayed this way. People on the autism spectrum are known for their difficulties with social interaction and for having narrowly defined interests, which can make them seem "nerdy" or "geeky." And an autistic person's difficulty with expressing emotion or following social norms may be mistaken for rudeness or jerkassery. Sometimes autistic people, and especially people with Asperger Syndrome, are portrayed as not having a problem at all, but simply claiming they do so they can get away with being rude. Often overlaps with Insufferable Genius. An online jerk, like a troll, griefer, or Internet Tough Guy, may also count. Compare Jerkass Woobie and Nerd in Evil's Helmet.