Character Analysis
McGonagall is the head of Gryffindor House, Dumbledore's second in command, and professor of Harry's transfiguration class. She may be the greatest witch on the planet… but she's the Glinda kind of witch instead of the Wicked kind. Lucky for us.
She's also played by Maggie Smith. Make that super lucky for us.
Oh she may be a little sour and crusty—she's Scottish, and it comes with the territory up there—but she's dedicated herself completely to the welfare of Hogwarts and its students, and woe be to anyone who gets in her way.
That devotion means that she doesn't suffer fools lightly, even (or especially) if they come from Gryffindor. She cuts Harry and Ron absolutely zero slack, and in some ways she's as hard on them as Snape. Even when she gives them praise, as she does after they defeat the mountain troll, she adds a stinger on top of it:
MCGONAGALL: Five points will be awarded to each of you…for sheer dumb luck.
You know, just so they can tell she's not nearly as impressed as they'd like her to be.
In storytelling terms, she's a mentor, though a secondary mentor to Dumbledore (and frankly speaking, she plays a larger role later in the saga than she does here). She also serves as an example that someone can make things very tough for you and ultimately still be on your side.
She's like that teacher who knows you're capable of great things…but only if you apply yourself and make sure you keep your nose in your books even when you'd really, really, really rather be on the X-Box.