The elimination we call “Gaussian” today has a surprisingly ancient ancestor. The Chinese treatise Jiuzhang Suanshu, the Nine Chapters on the Mathematical Art (compiled between the 2nd century BC and the 1st century AD), devotes its eighth chapter — titled precisely fangcheng — to solving linear systems. It is the earliest known text in history to treat this problem systematically (Katz).

The method worked on a counting board: the coefficients and constant terms of each equation were laid out in a column of cells, using counting rods (the rod numerals). The system thus appeared as a table of numbers — in effect a matrix — with the equations as its columns. For example the system

{3x+2y+z=392x+3y+z=34x+2y+3z=26\begin{cases} 3x + 2y + z = 39 \\ 2x + 3y + z = 34 \\ x + 2y + 3z = 26 \end{cases}

(taken from that same Chapter VIII) was solved by repeatedly subtracting multiples of one column from the others, until all the coefficients above or below the diagonal vanished: exactly the elementary operations that reduce the system to triangular form. From there the values of the unknowns were obtained “backwards”, by back-substitution.

Two features make fangcheng remarkably modern. The first is that, to avoid introducing fractions, the ancient Chinese calculators worked with whole numbers and accepted negative coefficients, which they indicated with rods of a different colour (black for positive, red for negative, or the reverse depending on the period): these are among the earliest records of the use of negative numbers in calculation (Boyer). The second is the tabular arrangement of the coefficients, which anticipates the idea of a matrix by almost two millennia.

In the 3rd century AD the mathematician Liu Hui produced an annotated edition of the Nine Chapters, adding proofs and justifications to procedures that the original text presented merely as computational recipes. In Europe the same idea would be rediscovered and turned into a standard algorithm only with Carl Friedrich Gauss, at the start of the nineteenth century (Struik).

Topics: Linear systems
Concepts: Gauss’s method · Elementary row operations
People: Liu Hui · Carl Friedrich Gauss