The Hetu and Luoshu: The Oldest Matrix
Some diagrams say everything numbers mean without writing a single numeral.
The Hetu and the Luoshu are precisely two such diagrams. Black dots and white dots, clustered or scattered, each holding its position: one and six in the north, two and seven in the south, three and eight in the east, four and nine in the west, five and ten at the center. Before numbers were ever written as words, they were arrayed as formations. Position is the row; the dot is the content — this is already a table, the earliest data structure.
The Luoshu goes further. Nine numbers are settled into a three-by-three grid: nine crowned above, one treading below, three and seven at left and right, two and four as shoulders, six and eight as feet. The elegance comes afterward: every row, every column, and both diagonals sum to fifteen. However the positions are permuted, that fifteen never stirs. In today's language this is a third-order magic square — binding a set of numbers under row-and-column constraints so that they hold one another in place, and none can move alone.
Anyone who writes programs pauses at this point. Is this not a matrix? Rows and columns, dimensions, constraints, invariants — what the magic square plays with is exactly what linear algebra opens with. In an age without paper and brush, the ancients first arranged numbers felt by hand into a structure; once the structure stood, the numbers began to speak: who occupies which position, who neighbors whom, what the sums are — all became relations that can be checked.
So the Hetu and Luoshu are less diagrams than an experiment: lifting numbers from "how much" to "where." Once that step was taken, the table, the matrix, and the coordinate system all lay on the extension of this trajectory. Millennia later we call it a data structure; the people of that time merely looked at the field of dots and said: there is order in this.
This article is a culture-structure explainer from a programmer's perspective only; it does not constitute career, relationship, medical, or investment advice.