The plot twist at the end of Prisoner of Azkaban is that Sirius Black is in fact a secret Animagus, the mysterious black shaggy dog that Harry has been seeing all year. Harry doesn't even contemplate that the dog may be an Animagus because he thinks it's the Grim. However, there were two people at Hogwarts who did know Sirius' secret and indeed had an interest in catching him.

Both Remus Lupin and Severus Snape believe Sirius to be guilty of thirteen murders at this stage. Neither of them believe in his innocence. Both of them cared deeply about protecting Harry. Both of them believed that Harry was Sirius' number one target. Both of them believed that he was breaking into Hogwarts to try and kill Harry. And both of them, as upstanding wizarding citizens, had a more general interest in catching a dangerous fugitive. Snape also has the added incentive that he hates Sirius' guts.

So they would both have handed in Sirius if they'd known where he was. And they both knew what Sirius looked like in his Animagus form and would've instantly recognised him. Yet Sirius made numerous appearances that year around the Hogwarts grounds. Namely:

He appeared at the Quidditch Stadium in front of the whole school.

...at that moment a flash of lightning illuminated the stands, and Harry saw something that distracted him completely: the silhouette of an enormous shaggy black dog, clearly imprinted against the sky, motionless in the topmost, empty row of seats.(Prisoner of Azkaban, Chapter 9, Grim Defeat).

Harry thought he saw him on the way back from training one time.

They were half-way towards the castle when Harry, glancing to his left, saw something that made his heart turn over - a pair of eyes, gleaming out of the darkness...He took a deep breath as relief seeped through him; he had been sure for a moment that those eyes had belonged to the Grim.(Prisoner of Azkaban, Chapter 13, Gryffindor Versus Ravenclaw).

Harry definitely does see him on the edge of the Forbidden Forest with Crookshanks.

And next moment, it had emerged: a gigantic, shaggy black dog, moving stealthily across the lawn, Crookshanks trotting at its side. Harry stared. What did this mean? If Crookshanks could see the dog as well, how could it be an omen of Harry's death?(Prisoner of Azkaban, Chapter 15, The Quidditch Final).

Finally, he attacks Ron/Wormtail.

But before they could cover themselves again, before they could even catch their breath, they heard the soft pounding of gigantic paws. Something was bounding towards them out of the dark - an enormous, pale-eyed, jet-black dog.(Prisoner of Azkaban, Chapter 17, Cat, Rat and Dog).

Harry, a random student, sees Sirius in dog form four times at Hogwarts (not including the time he saw him in Surrey after blowing up Marge). How did Snape or Lupin not see Sirius the entire school year? He seems to be roaming the Forbidden Forest pretty openly the whole time and even turns up to a Quidditch match.

In addition, Lupin had the Marauder's Map for the second half of the year. He eventually saw Wormtail on the Map through a random chance encounter. Why didn't he notice Sirius on the Map?

Is there any explanation for how Sirius managed to hide himself from Lupin and Snape for a whole year despite the fact that they knew his secret disguise?

5 Answers
5

Harry is a particularly curious and observant student
At this point he had already managed to retrieve the Philosopher's stone and get into the Chamber of Secrets before his voice had even broken. Plus he became the youngest Seeker in a generation. If anyone is going to spot Sirius (especially considering he is specifically looking out for a spectral dog resembling the Grim), it's going to be him.

Sirius was following Harry
Other than seeing Sirius in the forest with Crookshanks, every time Harry spots the dog it's because he was following or observing Harry. It's not like anyone else was going to stumble across him.

Sirius is very good at hiding
He managed to be the only wizard who ever escaped from Azkaban unaided. Sirius then managed to spend 2 full years on the run without the Ministry ever catching him, even when in the second year there was a huge manhunt for him (all of Voldemort's murders were being blamed on Sirius at this point). He also spent years sneaking around Hogwarts with Lupin, James & Peter, and helped to invent the Marauder's Map, so he will have known the grounds very well, and also where to hide.

What about the map?
I don't really have any evidence for this one. Presumably Lupin didn't make a habit of staring at the map for hours on end like Harry did. He only saw Peter by absolute coincidence, and on the day they went to the Shrieking Shack he was watching Harry, Ron & Hermione and he managed to see him with them. If Peter, who was presumably on the grounds for the entire year, managed to evade Lupin seeing him on the map, Sirius would have had a much easier time, even if Lupin was specifically looking for him on occasion. Sirius never had to stay on the grounds, he only ventured there a handful of times.

@user21820 I think if Lupin wanted to see what was going on with his 2 former best friends suddenly returning to Hogwarts, the last thing he wanted to do was let anyone else know. He was ready to execute Pettigrew along with Sirius when he found out the truth, until Harry stopped him. And Dumbledore was down at Hagrid's hut for Buckbeak's execution with Fudge, which he would have been able to see on the map, so he would have had to tell both the headmaster and the Minister of Magic.
– Mike.C.FordJan 17 '17 at 9:54

Normally Lupin is a very careful, thoughtful and fair person. Of course, people can make mistakes when overcome by emotion, so I grant that perhaps he was not thinking straight at that moment and didn't realize that catching Peter alive would exonerate Sirius. He would surely have some way of getting Dumbledore to follow him without Fudge, but I can see that he has to think clearly first.
– user21820Jan 17 '17 at 10:04

5

@user21820 Also, in the Shack, Lupin says he was "too cowardly" to tell Dumbledore that Sirius was an Animagus, because it would've meant admitting he'd betrayed Dumbledore's trust as a student. Showing him the map would've had similar implications, so Lupin wouldn't have been in a hurry to do that. It would take courage of a sort he's never been good at. Likely a moment to think it through and prepare himself; possibly prodding from someone else.
– Shay GuyJan 17 '17 at 17:34

Harry saw something that distracted him completely , the silhouette of
an enormous shaggy black dog, clearly imprinted against the sky,
motionless in the topmost, empty row of seats.

Harry's numb hands slipped on the broom handle and his Nimbus dropped a
few feet. Shaking his sodden bangs out of his eyes, he squinted back
into the stands. The dog had vanished.

In this case, Sirius came only to see Harry fly, just for a second. Everyone was focused on the game, it was raining pretty nastily and vision was impaired for everybody, and he was there only for a second. Then he went back to the forest:

"I've been living in the
forest ever since, except when I came to watch the Quidditch, of course.
You fly as well as your father did, Harry...."

So Sirius was living on the grounds in the forest as a dog, like Crookshanks. On one day he took a risk to see Harry fly, but nobody saw him because of the reasons I already laid out.

The next two instances you speak of are trivial. The first one can be easily dismissed. It was night and only Ron was with Harry at the time. Harry stops and lights his wand so they can see, but it's only Crookshanks. It probably was Sirius in this case, but only for a moment, and nobody else could have seen.

The other one is even easier to dismiss. He sees the Grim outside the Gryffindor window. It's all dark, as Ron says when Harry has to wake him up because it's like 5 in the morning. There's no way anyone else could have seen him, let alone Snape or Lupin.

The fourth time, when Sirius pulls Ron into the Whomping Willow, Lupin does see him on the map.

"And then I saw another dot, moving fast toward you, labeled Sirius
Black.... I saw him collide with you; I watched as he pulled two of you
into the Whomping Willow --"

And Snape did too:

"Lying on your desk was a certain map. One
glance at it told me all I needed to know. I saw you running along this
passageway and out of sight."

The only question remaining is that of how Lupin didn't see Sirius during the second half of the year when he had the map. There are two answers I can think of. One is that he didn't really look at it until that night. Possible, but I don't think so. In this year, with the threat of Sirius and stuff, it's likely he would look at it. If he did, he probably just didn't look in the forest, where Sirius was. It was probably swamped with dots of animals [citation: Harry sees Mrs. Norris on the map in chapter 10 of PoA] and he just didn't look there, or if he did, didn't see Sirius. As to why he didn't see Pettigrew, that's a different question

@TheDarkLord "Bangs" is an American term referring to the part of your hair that hangs down over your forehead (presumably CHEESE has a US version of the books). In British English it's your "fringe". Sodden just means soaked, though I suspect that's not the part you were confused by (assuming, of course, that my assumption that you were confused about the meaning of any part of it is correct, which it may not be).
– Anthony GristJan 17 '17 at 14:09

@AnthonyGrist You are correct; I didn't realize there was an alternate term for bangs.
– CHEESEJan 17 '17 at 14:11

1

@AnthonyGrist That's helpful. I just thought it was a horrific typo, though it amused me. I was thinking, "How can you get from fringe to bangs"? This explains it.
– The Dark LordJan 17 '17 at 14:16

It seems pretty clear that Snape did not recognize the dog as Sirius until that point.

Further evidence of Snape not knowing of Sirius's animagus form is that if he had known he would presumably have reported it to the authorities. As there is no evidence that the authorities had any inkling of Sirius being an animagus, we can assume that Snape didn't tell anyone. If he didn't tell anyone we can assume that he did not know.

If [Harry] hadn’t known it was the same person, he would never have guessed it was Black in this old photograph. His face wasn’t sunken and waxy, but handsome, full of laughter.

— Prisoner of Azkaban, Chapter 11: The Firebolt

A mass of filthy, matted hair hung to his elbows. If eyes hadn’t been shining out of the deep, dark sockets, he might have been a corpse. The waxy skin was stretched so tightly over the bones of his face, it looked like a skull. His yellow teeth were bared in a grin. It was Sirius Black.

— Prisoner of Azkaban, Chapter 17: Cat, Rat and Dog

Sirius’ gaunt face broke into the first true smile Harry had seen upon it. The difference it made was startling, as though a person ten years younger was shining through the starved mask; for a moment, he was recognisable as the man who had laughed at Harry’s parents’ wedding.

— Prisoner of Azkaban, Chapter 20: The Dementors' Kiss

Given a decent view, Lupin, as an old friend, would be more likely than Harry to recognize Sirius despite Sirius' condition. However, if Lupin had just a few distant, fleeting glimpses of a large, somewhat unfamiliar-looking dog, he may have mistaken Sirius for Hagrid's dog Fang.