...Before Shae makes a surprise appearance to testify against Tyrion (more on that in a moment), so much of what makes the trial so fascinating are those constant cuts to Jaime watching the action and recognizing what a sham of a mockery of a travesty the whole thing is. Tyrion recognizes that from the start and is barely making an effort — the only times he speaks up in the early going are when Meryn Trant is only telling half the story of Tyrion slapping Joffrey, and when his pal Varys sadly turns against him (Varys believes in Tyrion's goodness, but can also recognize a lost cause) — but it takes Jaime longer to recognize how rigged this particular game is. And we get to appreciate that transformation bit by bit, even as Bryan Cogman's script turns into a terrific, if warped, trip down memory lane as Trant, Cersei, Pycelle and others bring up Tyrion's transgressions — some imagined, some exaggerated, some real — against the sainted King Joffrey.
And in showing us all the testimony and Tyrion's defeated, indifferent reaction to most of it, the episode sets us up beautifully for the gut punch that is Shae's entrance. We were told several episodes ago that she had safely made her way onto a ship to Braavos, so either she got cold feet, or Tywin or Cersei arranged for her return. And it's here that Tyrion's cruel-to-be-kind approach to protecting his lover appears to be coming back to bite him terribly, as Shae comes across not as someone who has been coerced into giving false testimony, but someone who relishes the opportunity, given the last conversation they had and her previous fears about Tyrion's affections transferring to Sansa.
I didn't expect Peter Dinklage to spend the entire season in a cell, but the story has understandably kept him sidelined for the last few weeks. Here, though, he got a chance to shine (as of now, this is his clear Emmy submission episode) in an episode that played as a dark mirror of his trial in the Eyrie back in season 1. There, he was afraid for his life but also reasonably confident he could outwit crazy Lady Arryn and her smug knights. Here, he starts out having given up, knowing both how powerful his father and sister are and how much they despise him. When Jaime explains the compromise he reached with Tywin, Tyrion rightly recognizes it as the same deal Ned Stark was offered, but seems willing to take his chances with it. But then Shae comes in, and his world turns upside down. Tyrion understands a life where his father and sister resent him, even one where people laugh at him, as the crowd does as Shae talks about their first night together(*). But a world where Shae has turned so completely and utterly against him — where his public humiliation and impending death are now tied to such betrayal from the one good and safe thing he once had? That utterly breaks him, and leads to the incredible thing that happens next, when Tyrion tears into the crowd and then demands a trial by combat.
(*) What makes that so effective, as both convincing testimony and something that will hurt Tyrion emotionally, is that, like most of what's said on the witness stand, it has elements of truth. Bronn did take Shae away from a knight in another tent, Tyrion really did ask her to make love to him like it was his last night on earth, just as he made the threat against Cersei that she quotes back to the court (albeit in an altered context). Lies are always easier when they have some honesty backing them up.
...