Integral House is undeniably an architectural marvel. Nestled in a canopied ravine in Toronto’s Rosedale neighbourhood, the home’s alluring curved walls and sweeping open spaces make it one of Canada’s most unique private residences.

But the story behind Integral House, captured in the documentary “Integral Man,” may rival its striking beauty.

Canadian artist and director Joseph Clement set out to capture the property’s architectural mastery in a documentary. But as filming began, he shifted his focus to the home’s owner, mathematician Jim Stewart.

Stewart is one of the most published Canadian mathematicians in the world, and he used his fortune to build the house. He wanted to combine his passion for mathematics with his love for music. The result: the 17,000-square-foot space, which was listed for $28-million a few years ago.

“The house and Jim are inextricably linked, because it was the mathematics that allowed the house to come to fruition, but it was also the music that was the driving force behind creating a space like this,” Clement told CTV News Channel in an interview on Thursday.

“So there was this great kind of duality that existed that led to this piece of architecture coming to be.”

In the music world, Stewart was known for the private concerts he hosted at his home. Integral House has its own concert hall with double-high ceilings, and guests such as award-winning Canadian soprano Measha Brueggergosman were known to perform in the expansive space.

Even in silence, the house has a powerful presence, Clement said.

“It’s in this lush ravine, and so you get surrounded by this space. And it has this very calm feeling to it. So it’s almost the calmness that is equally as striking.”

The film was about halfway through production when Stewart found out that he had bone marrow cancer. Again, the film’s focus shifted.

“It really became this legacy film,” Clement said. “A very meditative, calm, reflective film on life and existence and what that means.”

The sudden news didn’t change Stewart’s commitment to the movie, and the director says the two discussed his death while filming. Stewart eventually died in 2014.

“Jim was such a pragmatic individual that death was never a thing that we didn’t talk about,” Clement said. “And so it felt like Jim was very much embedded into the film, in that respect, because he was so pragmatic.”

Now complete, “Integral Man” is set to premiere at Toronto’s Hot Docs film festival on Friday. It captures the many angles of the unique home, as well as Stewart’s multifaceted persona.

“Jim was really this dynamic character who had these dualities: that kind of classic mathematician professor, kind of a quiet guy, and then the very performative aspect in holding these events and these concerts and himself being involved and a musician.”

Clement said he was proud to be given the chance to tell Stewart’s story, and that the mathematician’s family and friends had a chance to see an advanced screening of the film.

“They loved it. They said it really expressed Jim and his character and they felt that it was a really great tribute to him,” he said.