Who says math should be confined to the classroom? James Stewart, a Canadian mathematician who wrote calculus textbooks for colleges and high schools, certainly didn’t think so.

The books made Stewart a multi-millionaire, and he used some of his fortune to build the Integral House, a gently curving home in Toronto that uses calculus in its design. The 18,000-square-foot structure was completed in 2009. Stewart died of a rare blood cancer last year.

The Integral House is currently up for sale, and it’s priced at just under $23 million Canadian. It boasts an infinity pool, a spa, and a roof garden. Since Stewart was a professional violinist, the house also contains a concert hall, which he used to host private musical events and salons. 

Not in the market for a math-inspired mansion? Take a virtual tour of the home Glenn D. Lowry, director of New York’s Museum of Modern Art, called “one of the most important private houses built in North America in a long time.”

[h/t The Guardian]