Shrewdly calculated to warm hearts with formulaic yet affecting elements of emotional uplift, “X+Y” zeroes in on a young math whiz who only gradually comprehends the basics of establishing relationships with other people. Deconstructionist critics and mainstream moviegoers alike may find it difficult not to reference “Rain Man,” “A Beautiful Mind” and “David and Lisa” while describing the movie to potential ticketbuyers. But even though such comparisons are hardly inapt, director Morgan Matthews’ debut fiction feature  inspired by his acclaimed 2007 documentary “Beautiful Young Minds”  proves potent on its own terms as a satisfying, compelling drama with definite crossover potential on screens of all sizes.

Much like its nonfiction predecessor, “X+Y” focuses on student competitors in the Intl. Mathematics Olympiad (IMO). In concert with scripter James Graham, Matthews has spun off a scenario about a character not unlike one of the more memorable subjects in “Beautiful Young Minds,” a neurodevelopmentally challenged math prodigy named Daniel Lightwing.

In the world according to “X+Y,” the prodigy is Nathan Ellis, a Yorkshire youngster who, during the film’s early scenes, is diagnosed as being on the autistic spectrum, and credibly portrayed by Edward Baker-Close as a skittish introvert who fixates on the fascinating “patterns” of mathematics. Young Nathan manages to forge an affectionate bond with his simpatico father (Martin McCann). But after Dad dies in an auto mishap, the boy is unable, or unwilling, to share a similarly warm connection with Julie (Sally Hawkins), his indefatigably attentive and endlessly patient mom.

Nathan is scarcely more emotionally open with Martin Humphreys (Rafe Spall), a sardonic yet sensitive teacher who once excelled as a math prodigy, and even competed in the IMO, before a toxic mix of self-loathing and multiple sclerosis undermined his ambitions. But Martin is quick to recognize and eager to nurture Nathan’s nascent skills. By the time Nathan is old enough for Baker-Close to pass the character over to top-billed Asa Butterfield (“Hugo”), Martin is ready for a return to the IMO  this time, as the tutor for a most promising up-and-comer.

Humphreys and Hawkins give such fine, full-bodied performances in their richly detailed roles, and develop such pleasing chemistry as Martin and Julie warily warm to each other, that “X+Y” veers perilously close to losing its balance during its middle section. Indeed, there are times when some viewers will feel disappointed, or frustrated, when the narrative shifts away from the Martin/Julie subplot  and from Martin’s understandable anxiety about the inevitable failing of his health  so the film can continue charting Nathan’s progress.

Fortunately, Matthews and Graham have made Nathan’s own narrative sufficiently engrossing to sustain empathy and generate a rooting interest as the protagonist journeys to Taipei for an IMO preliminary, interacts with other young prodigies  including Luke (an outstanding Jake Davies), a socially maladroit autistic who’s a closet Monty Python fan  and ultimately arrives at Cambridge for the IMO version of the main event.

Butterfield is admirably unafraid to duly emphasize Nathan’s less endearing qualities  his arrogant self-absorption, his refusal to even hold his mum’s hand when she longs to express maternal love  while at the same time subtly expressing first the aching loneliness of his character’s obsession, and later the first signs of Nathan’s emergence from his emotional isolation. The latter development is expedited by Nathan’s sweetly chaste budding relationship with Zhang Mei (Jo Yang), a member of the Chinese IMO team.

At several points throughout “X+Y,” but especially during the locally colorful Taipei street scenes shot by ace lenser Danny Cohen, Matthews’ background as a documentarian is obvious and beneficial. But Matthews also demonstrates expertise as a director of actors, getting creditable performances across the board, including a slyly funny supporting turn by Eddie Marsan as squad leader for Team UK at the IMO. There are a few heavy-handed touches to the storytelling  most notably, an almost comically portentous closeup of a traffic light to presage the death of Nathan’s dad  but nothing unforgivable.

By the way, mathephobes shouldn’t fret: Matthews and Graham avoid delving too deeply into the specifics of mathematics, offering only snippets of questions and calculations to keep the plot moving. Still, “X+Y” does communicate an unabashed awe for the prowess demonstrated by Nathan and his fellow IMO competitors, which should delight those viewers who actually know what the characters are talking about.

Toronto Film Review: ‘X+Y’

Reviewed at Toronto Film Festival (Discovery), Sept. 7, 2014. Running time:<strong> 111 MIN.</strong>

  • Production: (U.K.) A BBC Films and BFI presentation in association with Head Gear Films, Metrol Technology, Screen Yorkshire and Lipsync Prods. of an Origin Pictures/Minnow Films production. (International sales: Bankside Films, London.) Produced by Laura Hastings-Smith, David M. Thompson, Ed Rubin. Executive producers, Christine Langan, Joe Oppenheimer, Lizzie Francke, Phil Hunt, Compton Ross, Hugo Heppell, Norman Merry, Peter Hampden.
  • Crew: Directed by Morgan Matthews. Screenplay, James Graham. Camera (color), Danny Cohen; editor, Peter Lambert; music, Mearl; production designer, Richard Bullock; art director, Julie Ann Horan; set decorator, Duncan Windram Wheeler; costume designer, Suzanne Cave; special effects supervisor, Ben Ashmore; sound, David Mitchell; assistant director, Matthew Hanson; casting, Shaheen Baig.
  • With: Asa Butterfield, Rafe Spall, Sally Hawkins, Eddie Marsan, Jo Yang, Martin McCann, Jake Davies, Edward Baker-Close.