He’s known as “AA,’’ but Knicks shooting guard Arron Affalo may just be the Knicks’ X-factor. With Afflalo a pitiful shell across the previous six games, the Knicks limped through a 1-5 stretch.

Afflalo finally found his stroke in a big way Sunday, scorching through a Garden matinee, hitting 12 of his first 13 shots and finishing with a season-high 38 points as the Knicks handled the Hawks for the first time this season, 111-97.

Carmelo Anthony, who petitioned the Knicks to sign his old Denver teammate last July, had his wingman back. With Atlanta paying its usual close attention to Anthony, Afflalo erupted while Anthony was held to 11 points, nine rebounds, five assists and three steals.

As Afflalo goes, so go the Knicks, who are 8-2 when he notches 15 points or better.

“He was able to lock into the game,’’ Anthony said. “I had a feeling he’d have a good game from this morning. The conversations I had with him, I saw something in him this morning. It’s good he got the monkey off his back.

“A team like Atlanta, they forget about everybody out there and they say, ‘We’re not going to let Melo play.’ I embrace that, and I’ll pass the torch to Arron today.’’