His schoolbooks all originated in the necessities of his own work as a teacher. The first thus to force itself upon his attention was an arithmetic. He was already at work on it in 1868, and it went to press while his brother John was superintending the plant at Shanghai. The preparation of such a book, to one unacquainted with the conditions under which this one was made, may seem to have been a rather easy undertaking, and to have required little more than a sufficient mastery of the Chinese language and of English; yet there were some perplexing questions that arose in connection with it. For instance, the method of writing numbers horizontally was wholly unknown to the Chinese. Should the new arithmetic use the western, or should it retain the Chinese method? To retain the Chinese would be to train the pupils in a usage that would be confusing in subsequent reading of western mathematics; to abandon it would be equally confusing in printing the text of the book, which, according to Chinese usage, must be arranged perpendicularly. The difficulty was gotten over by duplicating each pattern example, giving it once horizontally and once perpendicularly. Pupils using the book were permitted to take their choice in performing their work, but in the text proper all numbers appeared vertically. Such lines as those dividing the numerator and denominator of a fraction stood perpendicularly, with the figures to the right and the left. Until he published his arithmetic, the Chinese numerals had been employed; he introduced the Arabic. At the dawn of the new era subsequent to the Boxer outbreak, almost the first book in demand by Chinese teachers and pupils outside the mission schools was a western arithmetic; and among others put upon the market were many “pirated” editions of Mateer’s book, printed on cheap paper and with wooden blocks. The publishers had not yet learned the significance of “copyright.” The circulation of the book, however brought about, had at least the effect of immediately increasing the reputation of its author among the scholarly classes outside the church. Of the editions issued by the press at Shanghai tens of thousands of copies have been sold. Dr. Fitch writes that “it is impossible to state the total number,” and that “the book has gone into all parts of the empire.”

In October, 1884, he submitted to the schoolbook committee of the Educational Association the manuscript of his geometry, and in doing so he said of it:

It is the result of much pains and labor.... The book is written in plain Wen-li, and much pains has been taken to make it smooth in style and accurate in meaning. In the few equations used I have introduced the mathematical signs employed in the West, of which I have given a full explanation in the beginning of the book.... Mathematical signs and symbols are a species of universal language, used alike by all civilized nations, and it is unwise to change them until it is absolutely necessary. The young men who have given most effective assistance in the preparation of this geometry are decided in their opinion that we should not change or garble the mathematical symbolism of the West, but give it to them in its integrity. The only change made is in writing equations perpendicularly instead of horizontally,—a change which is necessitated by the form of Chinese writing.

The book was published the following year. To the same committee he reports in March, 1882, that his algebra was then all in manuscript, and only needing revision and some rearrangement before printing. The geometry was followed by his algebra, first part. These have had a large sale, though, because fewer studied this branch, not the equal of the arithmetic.

On January 14, 1908, he sent to the manager of the press the preface to the second volume of his algebra, which covers the same ground as the “University” edition in the United States. Of this Dr. Hayes says: “Over twenty years ago he began the preparation of Part II of his algebra, and the draft then made was used in manuscript for many years. Other duties pressed upon him, and he was compelled to lay it away unfinished. Yet he had not forgotten it, but from time to time he would make a step in advance. It was only a few months before his death that the work was completed and published.”

There were a number of other books which he planned, on some of which he did considerable work, but none of which he completed. One of these was so colossal in its projected scope and scholarship that it deserves special notice because indicative of the large things to which early in his missionary career he was already eager to give his time and abilities. This was a Mandarin dictionary. In its preparation he sought to associate with himself Rev. Chauncey Goodrich, of Peking; and in writing to him under date of June 6, 1874, he thus stated his conception of the work:

My idea of the book is a dictionary of the spoken language of north China, in all its length and breadth, including on the one hand all the colloquialisms that the people use in everyday life,—all they use in Chi-li and in Shantung, and in all the Mandarin-speaking provinces, so far as we can get it, noting, of course, as such, the words and phrases we know to be local. Further, let it include as a prominent feature all sorts of ready-made idiomatic phrases, and in general all combinations of two or more characters in which the meaning coalesces, or varies from the simple rendering of the separate characters.

Considerable preliminary work had already been done, when the death of Mrs. Goodrich compelled her husband to withdraw from the partnership; and the project was abandoned by Mateer, though with a hope that it might be resumed. In 1900, however, as the fruit of this and kindred studies he published an analysis of two thousand one hundred and eighteen Chinese characters. This little book was designed to help children in dictation exercises to write characters, and is still largely used for this purpose by mission schools. The huge dictionary, though never completed, had three direct descendants. With Dr. Goodrich it produced first a Chinese phrase book, and then a pocket Chinese-English dictionary, which for brevity and comprehensiveness is a marvel, and which is regarded by almost every student of Chinese as a necessity. In marked contrast with these two volumes is an immense dictionary left behind in manuscript by Dr. Mateer. It is wholly in Chinese; and as it lies unfinished it occupies more than a cubic foot of space, and consists of a set of volumes. No comprehensive dictionary of the Chinese language has been published for two hundred and fifty years, and the last issued had been mainly classical. The object of this was to supply the evident need of a great new work of that sort. One insurmountable difficulty encountered was a phonetic arrangement commanding common usage. None had the requisite approval. Fortunately, on this undertaking Dr. Mateer did not spend his own time, except so far as that was necessary to direct the preparation of it by his scribes when they were not otherwise employed.

In his letter to his college classmates in 1897 he says that he has “well in hand a work on electricity, and one on homiletics prepared when teaching theology.” Neither of these was finished and published. To his college classmate, S. C. T. Dodd, Esq., he wrote in 1898 that he was trying also to finish a work on moral philosophy. In March, 1878, he wrote to Dr. W. A. P. Martin, of Peking: “You will remember probably that when you were here I spoke of my intention to make a natural philosophy by and by. You said, ‘Go ahead,’ and that you would retire in my favor by the time mine was ready, say, ten years hence. If I am spared I hope to have the book ready within the time, if not sooner. As you know, natural philosophy is my hobby, and I have taught it more thoroughly probably than has been done in any other school in China. I intend when I visit America to prepare myself with the material and the facilities for such work.” He was not able to find time for this work; and when later Dr. Martin invited him to write for the revised edition of his treatise the chapter on electricity, this privilege had for the same reason to be put aside. He had also advanced far toward the completion of a translation of “Pilgrim’s Progress” into Mandarin.

His “Mandarin Lessons” was published early in 1892, and immediately commanded a success even larger than its author may have anticipated. Ever since, it has gone on toward a more general use by foreigners wishing to master the language, and has now far outstripped every other work of its kind. He was a quarter of a century in making the book. June 28, 1873, he made the following entry in his Journal concerning it: