Dave Bayer's hands are broad and slightly hairy, with wide thumbs and a few small scabs—abrasions from a recent rock-climbing trip. At first glance, they're nothing special, but when viewed from certain angles they look a lot like Russell Crowe's. "They're not so dissimilar," Bayer, a forty-six-year-old mathematics professor at Barnard College, said the other day, resting his palms on the living-room table in his apartment on Riverside Drive. "Russell's hands are a shade stouter than mine. He's a very athletic guy. I try to be, but you should see him at the gym."

Bayer discovered this manual affinity while working on the film "A Beautiful Mind," which stars Crowe as the mathematician John Forbes Nash, Jr. The director, Ron Howard, hired Bayer as the film's math consultant after reading Bayer's review—in Notices of the American Mathematical Society—of the play "Proof," which also explores mathematical genius and madness. (Mary-Louise Parker "convincingly traverses a twodimensional parameter space of personas," Bayer raved.)

It was in rehearsals that Bayer's role took on an extra dimension. "We noticed that Russell Crowe and I had very similar handwriting, and then Ron says, 'Put your hands out,' " Bayer recalled. "At which point Ron said, 'You're the hand double.' And I didn't know what that meant." What it meant was that Bayer's hand, made up to match Crowe's, appeared in closeups shot by the film's second unit.

It took Bayer a while to start thinking like a hand double. Early on, he trimmed his fingernails, even though Crowe was growing his nails longer to make them look more like Nash's, so Bayer had to wear acrylic tips for much of the shoot.

"The cool thing is I got to be the hand double for things that had nothing to do with math," Bayer said. "In the Pentagon scene, where they're moving markers on a map, the closeup where you can actually make out the name of the city—that was my hand." Bayer also appears in full, albeit briefly, as a professor at the Princeton faculty club.

"Russell does all his own math," Bayer said. "He just can't be there all the time. I do the math while he's busy getting made up as a seventy-year-old." Bayer thinks Crowe acquitted himself well in his blackboard scenes. "If you're not a mathematician, it's a high-wire act delivering your lines beautifully and writing math equations at the same time," Bayer said.

As the math consultant, Bayer remained on the main set whenever a shot involved mathematics so that he could check the math and answer any questions Crowe might have. "He'd say something like 'I know that the math in this lecture is crazy, but does it feel to you like I'm giving a math lecture?' And I'd say, 'Yeah.' "

Bayer also wrote the equations that appear on windows and blackboards in the film, which was painstaking work, even for a professional mathematician. For one scene, he spent six hours preparing the calculations. "I'd probably gone over the board seven times, and then Russell comes in and looks at it and says, 'Why don't you have me erase this?' " They had only one shot, and Crowe nailed it. The scene lasts just seconds in the movie. "The fact that I spent six hours on what's actually two seconds is not out of line with how films get made," Bayer said.

To most viewers of "A Beautiful Mind," the numbers and Greek letters register as mere set dressing, but mathematicians can follow Nash's story on another plane. In the film, Nash struggles to prove the Riemann hypothesis, one of the great unsolved math problems. Bayer chose an unorthodox path for Nash to work on Riemann's hypothesis, because it made sense for the character.

The real John Nash wrote to Bayer after seeing "A Beautiful Mind." "Nash commented that there was math later in the film that he never knew or thought about," Bayer said. "But, of course, it's fictionalized." In particular, Nash wanted to know about a scene in which the character Nash, heavily medicated, shows an old Princeton classmate a clipboard with pages and pages of numbers on it. "It was supposed to be in some sense numerological gibberish, but he had the sense that it wasn't quite gibberish, and he wanted me to say what it was." And Nash was right, Bayer said: "It wasn't quite gibberish."