Chapter 1. Early Edo Period
The Edo period is the early modern of Japanese history, running about 270 years from 1603 to 1867. Wasan, the native Japanese mathematics, was established in the beginning of the Edo period and was replaced by its Western counterpart immediately after the start of the Meiji era. In short, the history of Wasan perfectly overlapped that of the Edo period.
First, we would like to describe the situation of Wasan at the beginning of the Edo period, or from the 1600's to the 1660's.
(1) Beginning of Wasan  introduction of soroban (Japanese abacus)
As only a few historical materials are left relating to mathematics in Japan before the Edo period, we only have general knowledge of this matter. It has been known that people performed daily calculation techniques (the four arithmetical operations) with computing rods , which comprised the main computing tool in use before the soroban (abacus) was introduced to Japan. The introduction of the soroban to Japan marked the beginning of the history of mathematics in the Edo period in Japan.
The soroban was not invented in Japan. It was invented somewhere in mainland China sometime around the fourteenth century, although there are various opinions on this matter. Then, it spread rapidly across China and was introduced to Japan across the sea. We can easily imagine traders going back and forth between China and Japan playing a great role in serving as mediators in its spread. Vocabulario da Lingoa de Iapam, published in 1590's, includes the item "soroban," with a summarized description of it as a computing tool. This leads us to understand that the soroban had begun to come into wider use in Japan by that time.
The soroban was a very simple and convenient computing tool for that time. Compared to the computing rods which constituted the previous computing tool, people could do calculations using the soroban by hand and therefore obtain results faster. It must have come in handy in actual trading fields and manifested its power in other areas such as outdoor surveying and civil engineering work. A byobue (picture drawn on a folding screen) that is said to show a castle construction site in the early Edo period depicts a character using the soroban ("Chikujozu Byobu" housed by Nagoya City Museum). It was these sorobans that became a necessity for those who involved in overseas trade, civil engineering work, and reclamation work in Japan before the socalled "national seclusion."
A diary (Kawachiya Yoshimasa Kyuki) written in the 1650's by a person living in Kawachinokuni (in present day Osaka Prefecture) noted words to the effect that "Our generation uses the soroban. The elders seem to have calculated with computing rods, which is beyond our imagination." So this hints to us that knowledge of the soroban permeated rapidly throughout the Japanese society within about one generation.

Computing rods and board
Lager image for Computing rods and board
Owned by Ichinoseki City Museum 
Explains use of the soroban as a computing tool by the Chinese and Japanese
Lager image for Vocabulario da Lingoa de Iapam
Vocabulario da Lingoa de Iapam
(2) After Jinkoki  from the four arithmetical operations to advanced mathematics
What greatly contributed to diffusing knowledge of the soroban was Jinkoki (first issued in 1627), by Yoshida Mitsuyoshi (15981673), published as a manual for the soroban . The author Yoshida came from the Suminokura family, a wealthy merchant in Kyoto, and stated that he had learnt how to use the soroban from a young age. As Jinkoki was compiled to learn the calculating methods for the four arithmetical operations using the soroban, and in addition included utilizationfocused approaches such as methods for calculating areas of arable land and for simple surveying techniques, as well as a wide range of problems such as mathematical games (for example, geometric progression and the Josephus problem ), it quickly gained popularity. After the death of Yoshida, many books similar to Jinkoki were published, which conferred the foundation of introductory arithmetical knowledge to Japanese in the Edo period. Coincidently, the regime of the Tokugawa Shogunate was stabilized and civil engineering projects accompanying the development of farmland were carried out across Japan. Bureaucrats who supervised such projects were expected to be not the traditional samurai, who would climb the social ladder by rendering distinguished military service with spears and swords in the conventional way, but new types of samurai, who would stand out by taking charge of civil administration. Characters with such ability were employed for such positions across the country, and some of them even published mathematical books. Imamura Motoaki, known as the author of Jugairoku, who was employed by the Iwaki Taira Domain in the early Edo period, served as a county magistrate in charge of civic administration. Meanwhile, Ando Yueki (16241708) from the Aizu Domain is an example of such a mathematician.
Yoshida's Jinkoki not only showed solutions to practical problems to the Japanese, but it also assumed a role of stimulating interests and concerns among math lovers in those days. Particularly, the problems (called "idai"), which were presented to readers as puzzles, gave rise to intellectual curiosity among readers, and subsequent books introduced new types of problems as if they were competing with each other just to succeed Jinkoki. Mathematical books such as Dokaisho, Sanpo ketsugisho, and Kokon sanpoki, came to include many challenging problems. Those books presented not problems that could be solved only with the four arithmetical operations using the soroban like in Jinkoki, but ones that were further advanced and could not be solved even today without using algebraic equations.
Figuratively speaking, the four arithmetical operations that were taught in Jinkoki are something like a compilation of the arithmetic taught in current elementary schools, and the challenging problems presented as "idai" after that book could be compared to those taught in mathematics at the level of senior high school or the university freshman year. A new kind of mathematics was needed that was totally different in quality, but Japan of that time actually lacked any means to address such a need.
Fortunately, however, a mathematical book called Suanxue qimeng (Sangaku Keimo) published in China at the end of thirteenth century that was introduced to Japan in the Edo period became well known, and the tian yuan shu (tengenjutsu ), or one of the mathematical techniques that was introduced in the book, came to attract attention. This tengenjutsu (tian yuan shu) is a technique for setting quadratic equations or cubic equations using computing rods in modern mathematical terms. If one were able to use it, it could have been substantially applied to difficult mathematical problems in those days. Suanxue qimeng included a very few explanations about tengenjutsu, but Wasan scholars such as Sawaguchi Kazuyuki, the author of Kokon sanpoki (1671), understood the concept well and applied it to solutions to mathematical problems. In addition, other scholars such as Takeda Sadanao, a scholar from the Fukuoka Domain, also known as a disciple of Kaibara Ekiken (16301714), studied Suanxue qimeng in depth. It was Seki Takakazu (?1708), a famous Wasan scholar, who adapted this tengenjutsu in the Japanese style to further extend the range of its application; we would like to say more about this remarkable figure in the next chapter.
 Column Influences from Chinese Mathematics (Level 0)
 Column Chinese Remainder Theorem (Level 2)

Explanation of soroban
Library of Shinpen jinkoki
Shinpen jinkoki
NDL Digital Collections 
The "Josephus problem," which involves an inheritance problem
Library of Shinpen jinkoki
Shinpen jinkoki
NDL Digital Collections 
Rare figure illustrating how surveying necessary for driving in a mine tunnel is being conducted. The author and creation date are unknown.
Lager image for Sanchu kenbunzu
Sanchu kenbunzu (owned by the University of ElectroCommunications) 
Idai in Shinpen jinkoki
Lager image for Jinkoki
Jinkoki 
After setting an unknown quantity to "Tengen no ichi," the book proceeds with calculations.
Library of Shinpen sangaku keimo
Shinpen sangaku keimo
NDL Digital Collections
(3) Practicality of mathematics  calendars and maps
When speaking of the mathematics in the Edo period, there were two large fields we cannot ignore from the viewpoint of practicality, in addition to calculating the areas of fields, etc. One was calendar calculation, to create the annual calendar, and the other was surveying, to create maps.
In the calendar calculation field, the system (calendar) used to create the Senmyo calendar (Tang lunar calendar) in as early as the Heian period was transmitted from generation to generation to the professional court nobles such as the Abe family and the Tsuchimikado family, until the Edo period. As discrepancies began to occur between the calendar and the actual paths of the celestial bodies, however, an overhaul of the system was widely demanded by the time of the Edo period, and calendar reform was forced through based on the ChineseUighur Calendar developed in the Yuan dynasty in China. The reformed calendar was the Jokyo calendar implemented in 1685. The Wasan scholars of that time were required to have a comprehensive mathematical processing ability based on observations and calculations, such as forecasting solar eclipses or confirming dates based on lunisolar calendars. For your information, it was Shibukawa Harumi (16391715), a goplayer belonging to the shogunate, that developed the Jokyo calendar; he was later employed by the Shogunate Tenmonkata (office in charge of compiling the calendar, astronomical measurements, and surveying, and later translating Western books, etc.). In addition, the contemporary mathematicians presented problems relating to the calendar.
On the other hand, surveying to create maps underwent technological innovation throughout the seventeenth century. The shogunate ordered daimyos (feudal lords) across Japan to create "kuniezu" (ancient regional maps) compiled from the maps of their own domains and required them to submit the kuniezu to the shogunate. The shogunate issued three major orders throughout the seventeenth century (in the Kan'ei, Shoho, and Genroku eras). In the surveying of lands, which differs from astronomical observations, one must conduct tasks while moving in the field, and perform calculations and draw maps promptly.
In the Japanese surveying that had been systematized to create the kuniezu, calculation with the soroban was used as an auxiliary means, but surprisingly, the prototype of a surveying technique or planetable surveying, which is still being used today, was introduced via Holland. A person called Shimizu Teitoku (16451717), a contemporary of Seki Takakazu, systematized Shimizuschool chokenjutsu (surveying), with its surveying content derived from the adaptation of surveying techniques used in Europe, which were the most advanced of their time, in Japanese style. That was one of the most interesting examples of combining Wasan and European technology.

Observed records on solar and lunar eclipses
Library of Sendai jissoku shi
Sendai jissoku shi
NDL Digital Collections 
One of the surveying textbooks used in the Shimizu school. Illustrates methods for measuring elevation angles and depression angles with a tool called Kikugenki (for measuring bearings).
Lager image for Kiku gen po
Kiku gen po (owned by the University of ElectroCommunications)