Affectionate Gesture to the Head

Adults will pat the head of a child to show them they've done well, tousle the child's hair affectionately to take the sting out of a teasing comment, or do one of the former in a playfully patronizing way.

Also can be done from one adult to another if one feels protective and affectionate of the other, or just wants to annoy them.

The gesture is done to and from people of both sexes, and can be gentle or rough, though the rough version is most common among boys and their dads/older brothers (or substitute father-figures). Expect the dad to be playfully rough, and the boy to shut one eye while letting his head move with the gesture and maybe complain.

The gesture can also be performed genuinely or insincerely. Expect the gesture to be done awkwardly by a closet Child-Hater.

This is mainly true of North America. In Asian countries, this may be considered rude, due to spiritual connotations.

In the Sengoku Basara anime, when Shingen seems about to give a standard Megaton Punch to Yukimura but switches to patting and tousling his hair at the last second, telling him he's done well.

In Higurashi, the missing character Satoshi Hojo had a habit of doing this, especially to Satoko. So much that when Keiichi does it to her in Tatarigoroshi-hen, it actually triggers her.

In Baccano! after thinking that he is going to die, Czeslaw gets a pat on the head from Maiza instead of having his life force sucked from him as he'd expected. This, along with the love that Isaac and Miria had shown him, leads to his breaking free from his past woes in a Crowning Moment of Heartwarming.

In Tiger and Bunny, Kotetsu often pats younger characters on the head as a sort of fatherly gesture.

In Saiyuki, this is one of Sanzo's few outwardly affectionate gestures towards Goku.

Mai gives one to Mii in episode 7 of Popotan, although it's more of a gentle nudge than a pat.

In Disney's Tangled. Mother Gothel pats Rapunzel "sweetly" on the head as a gesture of "affection" but also to remind her that she's dumb, helpless, naive, ditzy, etc. It is a sign that Rapunzel has grown up that she blocks the gesture and grabs Gothel's wrist once Rapunzel realizes who she is.

In Gran Torino, Clint Eastwood pats the head of a child in a Hmong household as a gesture of kindness; the family of the child is shocked by this due to their cultural differences.

Plot-relevant in Definitely Maybe, as recognizing the gesture is how Maya works out which of the women in the story is her mother.

WarGames. During the movie, Dr. McKittrick had been suspicious of and antagonistic toward David Lightman. At the end, after Lightman had prevented World War III, Dr. McKittrick tousled his hair in a friendly way.

Boromir does this to Frodo in Lord of the Rings during their attempted trek over Caradhras. After picking up the Ring, he gives it back to Frodo only after an order from Aragorn. He ruffles Frodo's hair to lighten the mood, but the Fellowship stay wary.

La Reine Margot pets her brothers' hair when they are upset about her wedding night. And again Margot pets Charles when he is crying after the St. Bartholomew's Day Massacre.

In the October Daye novel One Salt Sea, the scary, unaffectionate Luidaeg gives Quentin's hair an affectionate ruffle.

In Cheaper by the Dozen by Frank Gilbreth Jr. and Ernestine Gilbreth Carey, there is a part when the children's Aunt Anne comes to visit and Billy pushes her over the edge to the point where she yanks his hair. They get on better terms with each other, though, to the point where Aunt Anne gives Billy one of these.

The X Wing Series has Han Solo once vigorously muss up Wedge Antilles' hair as demonstration of the fact that he can get away with a lot as a General. For the record, they're friends.

In series one, episode one of Jeeves and Wooster, Bingo Little does this to Oliver Glossup (the boy he's tutoring) during dinner, dismissing something the boy just said.

Community, as is expected of such a troperiffic show, discussed this. Jeff and Annie's relationship is characterized by him being an older brother to her, except that the increasing sexual tension is making that awkward and they can't keep it up, meaning their relationship has to evolve. The discussion ends with "We can't keep doing this kiddo," with a gentle chuck of the chin. "Can't we?" [long pause], "No, it's gross."

JJ from Skins is forever having his hair ruffled; he's well aware that it's mostly patronizing.

"Then I'd tell Freddie and Cook to stop fighting over Effy before they hate each other forever, and not make me take sides. And they'd listen to me for once and not fucking ruffle my hair!"
And then about two minutes later, Karen [Freddie's sister] does exactly that.

Lampshaded in one strip of Dilbert, the Pointy-Haired Boss is criticizing Dilbert's work (while not being overly specific as to what's wrong). As Dilbert becomes more frustrated, the boss asks Dilbert to "come here so I may pat your head in a condescending manner".

Dogbert: So you took the pat on the head?Dilbert: I didn't want to leave empty handed.

Rin's flashback in the prologue of Fate/stay night features a scene where her father pats her on the head. She remarks that because it's the first time he's ever done so, he's using far too much strength and dragging her head around as he does it.

In a certain comic based on The Powerpuff Girls, Buttercup gets annoyed with the Mayor's constant patting her on the head, to the point where she punches his lights out after repeatedly telling him to stop.

A standard gesture of affection among Gargoyles, the equivalent of kissing.