Asa Butterfield in "X + Y"

For a film that spends much of its duration tracking a math genius trying to reconcile his command of integers with the unpredictability of people, it’s quite impressive to see how first-time director Morgan Matthews has figured it all out.

Math has never been especially cinematic, with the most memorable imagery usually consisting of numbers somehow bending to a anthropomorphic interpretation of them a la “A Beautiful Mind.” But after giving himself the unenviable task of showing how the prodigal Nathan (Asa Butterfield as a teen and in his younger years, Edward Baker-Close) struggles to apply the algorithmic logic he understands into interpreting the emotions of others — something particularly difficult as an autistic child who burrows deeper into his own head after witnessing the death of his father from the passenger seat in a car crash, Matthews uses a clever mix of color patterns, musical repetition and focal points to convey how he starts to make connections between the two.

Matthews and screenwriter James Graham have also devised a strong premise to bring Nathan out of his shell, forcing him to interact with others when he travels abroad to compete with the best and brightest in the international Math Olympiad competition. However, the film wisely avoids the trap of setting Nathan on the traditional hero’s journey, only using the Math Olympiad as a means of getting him out into the world as opposed to a defining event he has to win to prove himself. “Here you’re not weird or the best mathematician, I’m afraid,” a fellow mathlete warns him on the plane to Taipei after securing a place on the squad. Instead, the victories Nathan accrues are smaller, but harder won – working up the courage to start talking with kids his own age, sharing a room with someone as concerned about its symmetry as he is, and opening himself up to spend quality time with the Chinese partner he’s assigned to familiarize himself with the culture, a girl named Zhang Mei (Jo Yang), who has as nearly as much of a burden to lift off her shoulders as he does as the niece of the Chinese team’s coach out to prove she didn’t get on the squad because of nepotism.

Rafe Spall and Sally Hawkins in "X + Y"Nearly every character in “A Brilliant Young Mind” needs to escape someone’s shadow, but while the film may be centered around a competition, it’s made clear that everyone is fighting their own nature and though it ultimately tells what’s a pretty familiar tale, there’s a fundamental goodness and sincerity in the film that counts for a lot. Additionally, Matthews is generous with his actors, giving Rafe Spall one of his best roles to date as Nathan’s mentor, a former mathlete with multiple sclerosis who lets down his guard after finding an unlikely kindred spirit in his pupil. Sally Hawkins also gets to shine as Nathan’s beleaguered mother, who feels she can never do right by her son after her husband’s death and is told as much by him. In the film’s heartrending opening minutes in which Nathan is diagnosed with autism, what she’s able to express with just a glance is extraordinary, a gift Matthews is given by much of the cast which affords it the simplicity to deny it ever becoming the overwrought melodrama it easily could’ve been.

Perhaps it’s Matthews’ background in documentary that allowed him to pick up such grace notes, but like his central character, Matthews begins to be able to see something new and exciting between two opposite ends of the spectrum. When Nathan’s Math Olympiad coach (Eddie Marsan) invokes John Keats as a master mathematician, having coming up with one of the most profound equations of all, “Truth is beauty and beauty is truth,” it doesn’t come off as some coldly inscrutable theorem, but instead, as “A Brilliant Young Mind” presents it, a comforting emotional fact.

“A Brilliant Young Mind” opens in limited release on Sept. 11.