Every time a grisly murder ordered by his father, King Taejong, takes place, King Sejong despondently buries himself in magic squares—*n* x *n* matrices in which each number from 1 to *n*^{2} appears just once and the sum of numbers in each row, column and main diagonal (a value known as “magic constant“) is identical. But the troubling news would not leave him alone in this introductory portion of **Tree With Deep Roots**, a political thriller depicting the invention of the Korean alphabet, Hangul. Couriers, guards and his mournful queen storm his problem solving chamber, where a gigantic and incomplete 33 x 33 magic square reflects the scale of his woes.

Taejong, who has abdicated but continues to wield power, invites himself in as well, proposing an easy solution to the conundrum. He throws away all the tiles of a magic square and places the number one right in its center. Now, Taejong proudly pronounces, the sum will be the same in all directions however large the square, and he has not needed any experience with magic squares to accomplish this. That is his political philosophy: eliminating all dissenters and calling all the shots as the number one in the kingdom, while others just have to stay out of the way and, he adds, keep playing magic squares.

The former king has unnerving ideas about cuisine too. After Sejong finally unleashes his fury about the elder’s despotism and vows to build a Joseon different in ways he has yet to decide, Taejong sends him an empty lunchbox, to everyone’s horror. In Chinese literary classic *Romance of the Three Kingdoms*, tyrannical warlord Cao Cao has sent his dissenting subordinate Xun Yu an empty lunchbox symbolizing abstinence from food as a hint to commit suicide. But the younger king now has an epiphany. Inspired by the grid arrangement of the lunchbox compartments and spaces around them, he takes the tile for “one” outside a magic square and arranges the numbers in a pyramid pattern to solve the square.

Working for magic squares of odd order (i.e. squares with odd numbers for *n*), the method, pioneered by Song China mathematician Yang Hui and expanded on by French scholar Claude Gaspard Bachet de Méziriac, requires the solver to arrange smaller squares inside and around the intended frame of the magic square in such a way that there is a space the size of a smaller square between neighboring squares and the center row and column form the bases of four pyramids. Align numbers on the squares such that the outermost diagonal of one pyramid reads “1, 2, 3 … x” and the diagonal directly underneath reads “x+1, x+2, x+3, …” in the same direction and so on. Slide the resulting patterns of smaller squares outside the magic square into corresponding spaces inside it without changing the order of the numbers. Smaller numbers should go into the side of the magic square containing larger numbers and vice versa so that the sums would be the same.

With an army of court attendants at his disposal, the gigantic 33 x 33 square, too, does not take too long to complete. Helpers beavering away at the abacus and stationery benches confirm that all rows, columns and main diagonals have the same sum: 17, 985. There are various other methods to construct magic squares, but we do not really have to draw one to verify this number. Knowing that each row adds up to the magic constant *M(n)* and that there are *n* rows, we find that the sum of all numbers in a magic square is *nM(n)*. Since no number is duplicated in the square, this total value can also be expressed as the sum of an arithmetic progression: *1+2+3+…n*^{2}. Recall that the sum of an arithmetic series is half the product of (i) the number of terms in the series and (ii) the sum of the smallest and largest terms in the series. We thus have the equation:

*nM(n)* = *1+2+3+…n*^{2 }= *n ^{2}(1+n^{2})/2*.

Therefore *M(n)* = *n(1+n ^{2})/2*.

*M(33)* = *33(1+33 ^{2})/2* = 17985.

[Reference: Anything but square: from magic squares to Sudoku]

Sejong’s elaborate workout, nonetheless, motivates him to prepare for a Joseon where Taejong is no longer around and everyone, including the common people, has a place in the governance system. The ruler will hear out a diversity of opinions and likewise influence the country through words instead of military might, which will be restricted for defense purposes. Towards this end, he ventures beyond the existing framework of government and sets up the research institute “Hall of Worthies,” staffing it with talented scholars who are historically credited with the compilation of texts on virtues and explanatory guides for Hangul. Hangul itself is a cultural innovation attributed by historical records to Sejong himself and considered more suitable for transcription of the Korean spoken language and thus knowledge transmission among the common people than Chinese characters traditionally used in the peninsula.

In this visually stunning sequence of events, we also see an allegory unfold as a mathematics hobbyist tries to tame the unruly beast of politics through dispassionate logic. Whereas theoretical mathematics appeals with the idea of unchanging, abstract truths, politics threatens to destabilize even the practice of mathematics through shifting semantics and superimpose meanings onto originally neutral objects. But precisely because political players may have no eternal interest in the rules they advocate, only eternal want of control, resources and purportedly moral goods, a mathematician has a fighting chance of successfully pressing on with his rules for his game. Nevertheless, in that transitory moment between experiencing the disruptive vocabulary and system of thought imposed by politics and brushing them off to assert its own identity, mathematics may visualize itself free from its own rules and detect among them unwarranted tacit assumptions arising from biases in its practitioners. Perhaps, only then does the discipline truly distinguish itself a little more from the irrational creature politics often behaves as.

The result feeds into political imagination in more ways than one. It embodies a more powerful vision of a world ruled by reason rather than murky emotions. And the solution leading to this would hopefully be as elegant and simple as Bachet’s serendipitous answer to magic squares. Much has been written about the austere beauty of mathematics while its humanistic beauty is especially evident through the numerous life-enhancing technological miracles around us, but in instances like the current one we witness its spiritual beauty as well. The caveat is, given the messy interference of psychological factors in the human agents involved, perfect rationality is probably attainable in neither mathematics nor social affairs. Even so, the dream of moving towards such a direction is alluring and sometimes empowering.

On his deathbed, Taejong continues to mock at Sejong’s supposedly quixotic idea of governing through words instead of swords. Later, Hangul is to meet with opposition for its lack of cultural legacy and fears that widespread literacy would produce a populace susceptible to indoctrination through written communication. The battle will not be easy. But Taejong then grabs Sejong by collar and commands him to realize that dream so that putting this son on the throne would be the Joseon co-founder’s greatest accomplishment. Startled but composing himself in no time, the younger monarch affirms his intention. With a satisfied smirk, Taejong falls into an eternal sleep. Viewers learnt this grey-bearded king’s back story only four years later in the prequel **Six Flying Dragons**.

Absolutely brilliant!