Hopkins and Gosling enjoy witty banter in ‘Fracture’

We know you’re thinking it. We were, too. So we may as well just acknowledge it, get it out of the way and move on as a group.

Yes, Anthony Hopkins is indeed doing a version of his patented Hannibal Lecter shtick in “Fracture.” So yes, you have seen him do this before. But he does it so richly and it’s still so entertaining, you may as well just give in.

Hopkins and co-star Ryan Gosling get lively, challenging material to work with in the film from director Gregory Hoblit (“Primal Fear,” “Frequency”), with a script from Daniel Pyne and Glenn Gers. They get to needle each other, spar with each other, and generally enjoy fantastically smart, zippy banter.

Gosling, the recent Oscar nominee for his subtly powerful work as a drug-addicted teacher in “Half Nelson,” more than holds his own with such a formidable screen presence. The difference in their demeanors – Hopkins quietly sadistic, Gosling buzzing with ambition – creates a really compelling dynamic.

“Fracture” is suspenseful and darkly stylish; Kramer Morganthau is a cinematographer on the film, which has some Hitchcockian touches and was shot in a vividly recognizable Los Angeles. But it also has an unexpectedly dry sense of humor. It’s actually a lot funnier and a lot less stiff and self-serious than such a thriller might look.

Hopkins stars as wealthy L.A. aeronautical engineer Ted Crawford, who shoots his much younger wife, Jennifer (Embeth Davidtz), in the head after he catches her having an affair. We’ve watched him meticulously work through each step of the crime, then calmly, confidently admit to committing it.

Why would he do that? The eventual big-picture answer is, because he knows exactly how to get away with it; mad-genius types like Ted exist solely in the movies. More immediately, though, it’s to torment the lieutenant who’s called to his house to negotiate with him – the same guy who happened to be having the affair with Ted’s wife.

Looks like a pretty quick case for Gosling’s character, hotshot prosecutor Willy Beachum, who’s on the verge of leaving the district attorney (David Strathairn, solid and authoritative) for a high-paying corporate law gig. But Willy soon realizes that nothing turns out to be as easy as it initially seemed. Evidence disappears, the confession is tossed out and Ted wants to represent himself in court.

And so this sly Southern boy, who’s skated his whole life on his looks, arrogance and charm, finds he actually has to work hard at something for once.

Hopkins and Gosling don’t even share that much screen time with each other, but when they do, it’s exhilarating. Even the expectation of the first time they face each other alone in a jail interview room is delicious.

Ultimately, though, “Fracture” isn’t so much about the case itself as it is about the way it changes star-on-the-rise Willy. Will he develop a moral code and think of someone else besides himself for once? It’s a legal drama that barely sets foot in the courtroom, but rather is more concerned with the journey its characters take. (Hoblit, by the way, also directed and produced episodes of “NYPD Blue,” “L.A. Law” and “Hill Street Blues,” which explains why “Fracture” has the slick pacing of a TV drama.)

Some plot points here and there don’t quite click into place. One of them involves a romance between Willy and his new boss at the private firm, played by Rosamund Pike as an icy blonde in the Hitchcockian tradition (there’s that word again). The relationship might have been hard to believe anyway, but it also transpires with dizzying speed.

Then there’s a bigger, climactic twist that we won’t give away. Whether or not you can catch the potential problem with it, Ted Crawford, mad genius, probably should have.