Mathigon: The Best Online Textbook?

Textbooks are usually very dry, but Mathigon managed to create something truly different

In my article "The Future of Online Textbooks", I mentioned Mathigon, a highly interactive online math textbook created by Philipp Legner. Here, I will analyze its design aspects to convince you that it is the most interactive online textbook. Period. I will begin with a design tour followed by a technical overview.

Design Tour

Design Principles

Mathigon stresses active learning, personalization, and storytelling, all of which college textbook platforms like Chegg and VitalSource lack. Mathigon achieves these principles through the following key features:

  1. Steps
  2. Chatbot
  3. Inline Definitions
  4. Interactive Playgrounds

Let's take a look at the lesson on the properties of triangles:


First off, notice Mathigon doesn't render the entire lesson. It breaks the lesson down into digestible steps. Only after the reader completes a task does it render the next step. There are two advantages:

  1. It eases the reader in and eliminates the visual pressure of seeing the entire lesson upfront.
  2. It requires the reader to actively engage with the content by filling out the text fields to progress through the lesson.


The chatbot reminds me that the sum of all angles in a triangle is 180 degrees.

On the bottom right corner, there's a chatbot, which is designed to be a virtual tutor. I believe this is perhaps the most well-designed element of Mathigon. The bot responds to the reader's attempt at tasks and problems: when the reader successfully completes a task, it sends an encouragement, otherwise, it guides the reader towards the right answer. Basically, it mimics the responses of a real teacher.

Inline Definitions

In the text, every concept the reader may need a refresher on is highlighted and can expand into a definition card with the complete definition and even a link to the lesson where it was first introduced.

Interactive Playgrounds

Mathigon has custom-designed interactive figures, like the one shown on the left of the image. If this level of interactivity is brought to college chemistry textbooks, all students need to do is to manipulate ionic and covalent bonds right in the textbook without using an external website.

Technical Overview

Mathigon is more like a technology company than a textbook publisher, which is probably its greatest advantage. This is perhaps not surprising. The founder, Philipp Legner, is a trained mathematician and an ex-Google software engineer. So what's the code that powers this great educational experience?

Special Markdown Flavor & Parser

The content of the textbook is written in Markdown (.md files). But it's not your standard markdown. Mathigon has extended the standard syntax to include things like input fields, sliders, reveals, and custom classes that power the interactive elements of the textbook. The selection of Markdown as the content source strikes a balance between ease-to-edit and customization.

Powerful Javascript Libraries

  • Core.js: A JavaScript library that includes utility functions and classes, including array and string helper functions, type checking, and event classes.
  • Fermat.js: A mathematics, statistics, and geometry library, containing everything from number theory to random numbers, expression parsing, and linear algebra classes.
  • Boost.js: A library for simplifying browser APIs – from DOM manipulation to web components, event handling, animations, routing, multi-threading, and AJAX requests.


From the technical overview, it is not hard to see that Mathigon is truly a technology company, not a content aggregator or publisher. That's perhaps what we need to revolutionize the textbook industry: the collaboration between software engineers, designers, and educators who care about the future of education and the quality of educational resources.

Furthermore, it is important to realize that to produce a truly amazing online textbook, the content has to be reconstructed from the group up. In addition to figures and graphs, which traditional textbooks have, more creativity and customization are needed to design interactive playgrounds like the ones on Mathigon.

Traditional online textbook providers like VitalSource are led by 50-year-old men who are out of touch with how students want and how they learn. They are content aggregators whose technology is outdated and not delightful. They only partner with publishers to distribute textbooks online but take no interest in re-fitting the content for new generations of readers who come to expect high levels of personalization, interactivity, and excellent design.

If any company wants to become a major disruptor and lead the online textbook revolution, it must bring together a group of academics, software engineers, designers, and educators. It also has to look to Mathigon for the excellent example it has set.