Likewise, the wealthy merchant class needed education for their daily business, and their wealth allowed them to be patrons of arts and science. But temple schools (terakoya) educated peasants too, and it is estimated that at the end of the Edo period 50% of the male and 20% of the female population possessed some degree of literacy.
Even though contact with foreign countries was restricted, books from China and Europe were eagerly imported and Rangaku ("Dutch studies") became a popular area of scholarly interest.