R&D LAB Method Complete, not published Learning instrument

Vedic Maths: Sutra Lab

Vedic Maths, thirty-nine calculation rules as machines you can turn

Vedic Maths is a 1965 rulebook, not an ancient inheritance. Thirty-nine of its calculation methods, each a parametric machine with animation, derivation and drill, in one HTML file.

  • 39methods, each its own module
  • 16 + 13sutras and sub-sutras, fully covered
  • 202procedure items, each bound to a step
  • 1HTML file, no build step

Rule S2, Nikhilam, computing 97 × 96 in one run: base 100, the gaps −3 and −4, the cross-subtraction to 93, the gap product 12, the result 9312. Each step arrives on its own and the timeline marks the one currently running.

Why this is published

Rule systems are our daily working material: test procedures, configuration logic, funding rules, calculation methods. Sutra Lab shows how we make one readable, as a model someone can operate, in which every number on screen comes from the same computation that places the drawing. For a client project that means technical communication, interactive explainers and small rule engines, built from the source rather than from a summary of it. It also means the limits of a method sit inside the tool instead of in a footnote.

Vedic Maths sounds ancient and is not. What runs under the name is a twentieth-century rulebook: sixteen sutras and thirteen sub-sutras for mental calculation, gathered by Bharati Krishna Tirtha and published in 1965. Set the origin claim aside and something usable remains: thirty-nine calculation methods, each a special case of an ordinary algebraic identity, several of them genuinely faster than the school procedure. Sutra Lab takes that rulebook and rebuilds it. Every rule becomes a machine with sliders: change the numbers and the whole drawing, the sequence of steps, the working lines and the derivation recompute. Beside it sits a second document, The Sutra Ledger, which carries the same rules as text and states the provenance question rather than stepping around it. Together they are our evidence for how a rule system can be turned into an instrument someone can operate, without carrying along a claim that does not hold.

Thirty-nine machines, one contract

Every method is an object with the same seven fields: parameters, a compute function, a draw function, a procedure in plain words, a derivation, a drill and a warning function for the range. All thirty-nine modules carry all seven. The step engine and the stage know no individual method, they know only this contract.

That is why thirty-four further modules could be added after the first five without touching the machinery underneath. That is the real work in a tool like this: not the animation, but the question of what all the cases have in common.

The index groups the methods into six families: multiplication 5, division 3, squares, cubes and roots 6, decimals and divisibility 6, algebra and equations 12, checks and codes 7.

The Sutra Lab index page with a looping worked example and the method directory grouped by family
The index runs 97 times 96 on a loop, with the counter of methods opened and the directory below it.

From rule to instrument

How a sutra becomes a machine

  1. 01 Read the rule Sanskrit, transliteration, literal meaning. The aphorism names the move, not the procedure. Nikhilam means all from nine and the last from ten, which is not yet an instruction.
  2. 02 Find the identity behind it Behind every rule sits an ordinary algebraic identity that makes it true. For Nikhilam it is the expansion of (B+d1)(B+d2). Without that identity there is nothing to draw and nothing to prove.
  3. 03 Name the parameters What may the reader turn, and between what limits? For Nikhilam it is the base and two numbers whose permitted range depends on the base chosen. Bounds may be functions of other parameters.
  4. 04 Write the calculation as a trace The compute function returns no result but a sequence of steps. Each step carries a title, its narration, the line for the working column and the number of the procedure item that currently applies. Across all modules that is 202 procedure items.
  5. 05 Hang the drawing off the same step numbers The draw function builds the SVG from that same trace and throws it away on every parameter change rather than diffing it. No retained scene graph, and therefore a whole class of stale-state bugs removed.
  6. 06 Add the limit and the drill All thirty-nine modules carry their own warning function saying where the method stops paying off, and a drill that generates a fresh question of the same type and checks the answer itself.

How a module is built

One object drives the stage, the procedure and the drill at once

The compute function returns a trace of steps. Each step carries its narration, the line for the working column and the pointer to the procedure item that currently applies. The draw function hangs its groups off the same step numbers. That is why the picture and the text cannot drift apart: there is only one source.

The same machinery, three unlike jobs

Three of the thirty-nine

The Katapayadi module decoding a Sanskrit verse syllable by syllable into digits and comparing the result against the digits of pi
The Graphite theme, one of ten. The red line marks the place where the verse departs from pi.

Numbers inside verseThe Katapayadi system encodes digits in consonants. The well-known verse yields thirty-one correct digits of pi and diverges at the thirty-second. The module writes both down, the encoding and the divergence, and says in the same panel that the encoding is genuine while the attribution to a Veda is not.

The second document, which states the provenance

Beside the application sits a static rulebook, The Sutra Ledger. It carries twenty-nine named rules, the sixteen sutras and the thirteen sub-sutras, plus thirteen derived techniques the book develops but never names. Each one comes with the modern identity that makes it true.

Before the first rule stands the title page with three answer cards: whether the arithmetic is correct, whether it is Vedic, whether it is faster. The document answers them one at a time before it begins.

The title page of the rulebook The Sutra Ledger with three answer cards on correctness, origin and speed
Three questions, answered separately, before the first rule appears.

The question before the build

Correct, not Vedic, sometimes faster

Three questions regularly collapse into one on this subject. Asked separately they have three different answers, and only that separation makes the material usable at all.

Is the arithmetic correct? Yes. Each of the thirty-nine methods is a special case of an ordinary algebraic identity, and every one of those identities sits in the tool beside the method that rests on it. Numerically there is nothing wrong with the system.

Is it Vedic? No. Bharati Krishna Tirtha, 1884 to 1960, said he reconstructed the sutras in solitary study between roughly 1911 and 1918 and took them from a lost appendix of the Atharvaveda. No such appendix has ever been produced. Of sixteen announced volumes a single introductory one survives, published in 1965, five years after his death. The canonical list of rules carries the editor's own note that it was compiled from stray references in the running text. What remains is an early twentieth-century synthesis, cast in Sanskrit aphorism.

Is it faster? Sometimes. A few of the rules are excellent mental shortcuts inside the narrow range they were built for. That is exactly where each module puts its warning: for Nikhilam it appears as soon as both gaps from the base grow wider than about a quarter of it. Asymptotically none of these methods beats the standard algorithm.

A learning tool carrying an unsettled origin claim would be wrong in exactly the place where it is least likely to be noticed.

From the rulebook

The filter row of the six families with their counts, and beneath it the method cards of the multiplication section
Six families, thirty-nine modules: multiplication 5, division 3, squares cubes and roots 6, decimals and divisibility 6, algebra and equations 12, checks codes and tools 7.
Nikhilam fully computed, with left part 93, right part 12 and the result 9312, all six timeline steps visible
The same calculation at the end: left part 93, right part 12, result 9312. The six steps stay on screen so the trace can be read back.
43² = 1849 stays put while eight of the ten themes cycle. Only the palette changes, not the calculation.

Same calculation, changing palette

One instrument, ten skins

Sutra Lab in the light Saffron Paper theme: the running 97 times 96 calculation and the method directory on a cream ground
The default theme, light on paper, with a rust accent.

Saffron PaperThe theme changes the palette only. Numbers, steps and drawing stay identical, and the choice is remembered per reader.

Where it fits

  • Test and calculation procedures that exist only as text and are therefore rarely followed through.
  • Training on a method where the participants are meant to change the inputs themselves.
  • Product logic with special cases whose limits have to be visible rather than footnoted.
  • Documentation that has to carry the route to the result as well as the result.
  • Subjects with a contested origin, where the presentation must not overstate what the sources support.

Image credits: every capture is a screenshot of our own applications. The Sanskrit aphorisms shown, the work title Vedic Mathematics (Bharati Krishna Tirtha, Motilal Banarsidass, 1965) and the names of the scholars cited come from the project's source material. There is no connection to the rights holders or to the people named.

“The rules are correct, some are excellent, and teaching them as mental-calculation technique is entirely defensible. What is not defensible is the historical claim.”

iiterate Technologies · From our own rulebook, vedic-mathematics-rulebook.html, section 05

Why this is published

What this means for your project

More from the lab

Do you have a rule system that exists only as a document? It can be turned into an instrument someone can operate.

Get in touch

Grace Hopper

“The most damaging phrase in the language is: it's always been done that way.”