The history of science in early cultures refers to the study of protoscience in ancient history, prior to the development of science in the Middle Ages. In prehistoric times, advice and knowledge was passed from generation to generation in an oral tradition. The development of writing enabled knowledge to be stored and communicated across generations with much greater fidelity. Combined with the development of agriculture, which allowed for a surplus of food, it became possible for early civilizations to develop and more time to be devoted to tasks other than survival, such as the search for knowledge for knowledge's sake.
From their beginnings in Sumer (now Iraq) around 3500 BC, the Mesopotamian peoples began to attempt to record some observations of the world with extremely thorough numerical data. A concrete instance of Pythagoras' law was recorded as early as the 18th century BC—the Mesopotamian cuneiform tablet Plimpton 322 records a number of Pythagorean triplets (3,4,5) (5,12,13) ..., dated to approx. 1800 BC, over a millennium before Pythagoras, —but an abstract formulation of the Pythagorean theorem this was not.
Astronomy is a science that lends itself to the recording and study of observations: the vigorous notings of the motions of the stars, planets, and the moon are left on thousands of clay tablets created by scribes. Even today, astronomical periods identified by Mesopotamian scientists are still widely used in Western calendars: the solar year, the lunar month, the seven-day week. Using these data they developed arithmetical methods to compute the changing length of daylight in the course of the year and to predict the appearances and disappearances of the Moon and planets and eclipses of the Sun and Moon. Only a few astronomers' names are known, such as that of Kidinnu, a Chaldean astronomer and mathematician who was contemporary with the Greek astronomers. Kiddinu's value for the solar year is in use for today's calendars. Astronomy and astrology were considered to be the same thing, as evidenced by the practice of this science in Babylonia by priests. Indeed, rather than following the modern trend towards rational science, moving away from superstition and belief, the Mesopotamian astronomy conversely became more astrology-based later in the civilisation - studying the stars in terms of horoscopes and omens, which might explain the popularity of the clay tablets. Hipparchus was to use this data to calculate the precession of the Earth's axis. Fifteen hundred years after Kiddinu, Al-Batani, born in what is now Turkey, would use the collected data and improve Hipparchus' value for the precession of the Earth's axis. Al-Batani's value, 54.5 arc-seconds per year, compares well to the current value of 49.8 arc-seconds per year (26,000 years for Earth's axis to round the circle of nutation).
all subsequent varieties of scientific astronomy, in the Hellenistic world, in India, in Islam, and in the West - if not indeed all subsequent endeavour in the exact sciences - depend upon Babylonian astronomy in decisive and fundamental ways.
Significant advances in ancient Egypt included astronomy, mathematics and medicine. Their geometry was a necessary outgrowth of surveying to preserve the layout and ownership of farmland, which was flooded annually by the Nile river. The 3-4-5 right triangle and other rules of thumb served to represent rectilinear structures including their post and lintel architecture. Egypt was also a centre of alchemical research for much of the western world.
Egyptian hieroglyphs, a phonetic writing system, have served as the basis for the Egyptian Phoenician alphabet from which the later Hebrew, Greek, Latin, Arabic, and Cyrillic alphabets were derived. The city of Alexandria retained preeminence with its library, which was damaged by fire when it fell under Roman rule, being completely destroyed before 642. With it a huge amount of antique literature and knowledge was lost.
The Edwin Smith papyrus is one of the first medical documents still extant, and perhaps the earliest document that attempts to describe and analyse the brain: it might be seen as the very beginnings of modern neuroscience. However, while Egyptian medicine had some effective practices, it was not without its ineffective and sometimes harmful practices. Medical historians believe that ancient Egyptian pharmacology, for example, was largely ineffective.  Nevertheless, it applies the following components: examination, diagnosis, treatment and prognosis, to the treatment of disease, which display strong parallels to the basic empirical method of science and according to G. E. R. Lloyd played a significant role in the development of this methodology. The Ebers papyrus (c. 1550 BC) also contains evidence of traditional empiricism.
According to a paper published by Michael D. Parkins, 72% of 260 medical prescriptions in the Hearst Papyrus had no curative elements. According to Michael D. Parkins, sewage pharmacology first began in ancient Egypt and was continued through the Middle Ages, and while the use of animal dung can have curative properties, it is not without its risk. Practices such as applying cow dung to wounds, ear piercing and tattooing, and chronic ear infections were important factors in developing tetanus. Frank J. Snoek wrote that Egyptian medicine used fly specks, lizard blood, swine teeth, and other such remedies which he believes could have been harmful.
In the Sassanid period (226 to 652 AD), great attention was given to mathematics and astronomy. The Academy of Gundishapur is a prominent example in this regard. Astronomical tables—such as the Shahryar Tables—date to this period, and Sassanid observatories were later imitated by Muslim astronomers and astrologers of the Islamic period. In the mid-Sassanid era, an influx of knowledge came to Persia from the West in the form of views and traditions of Greece which, following the spread of Christianity, accompanied Syriac (the official language of Christians as well as the Iranian Nestorians). The Christian schools in Iran have produced great scientists such as Nersi, Farhad, and Marabai. Also, a book was left by Paulus Persa, head of the Iranian Department of Logic and Philosophy of Aristotle, written in Syriac and dictated to Sassanid King Anushiravan.
A fortunate incident for pre-Islamic Iranian science during the Sassanid period was the arrival of eight great scholars from the Hellenistic civilization, who sought refuge in Persia from persecution by the Roman Emperor Justinian. These men were the followers of the Neoplatonic school. King Anushiravan had many discussions with these men and especially with the man named Priscianus. A summary of these discussions was compiled in a book entitled Solution to the Problems of Khosrow, the King of Persia, which is now in the Saint Germain Library in Paris. These discussions touched on several subjects, such as philosophy, physiology, metabolisms, and natural science as astronomy. After the establishment of Umayyad and Abbasid states, many Iranian scholars were sent to the capitals of these Islamic dynasties.
In the Early Middle Ages, Persia becomes a stronghold of Islamic science.
Scientific thought in Classical Antiquity becomes tangible from the 6th century BC in pre-Socratic philosophy (Thales, Pythagoras). In c. 385 BC, Plato founded the Academy. With Plato's student Aristotle begins the "scientific revolution" of the Hellenistic period culminating in the 3rd to 2nd centuries with scholars such as Eratosthenes, Euclid, Aristarchus of Samos, Hipparchus and Archimedes.
In Classical Antiquity, the inquiry into the workings of the universe took place both in investigations aimed at such practical goals as establishing a reliable calendar or determining how to cure a variety of illnesses and in those abstract investigations known as natural philosophy. The ancient people who are considered the first scientists may have thought of themselves as natural philosophers, as practitioners of a skilled profession (for example, physicians), or as followers of a religious tradition (for example, temple healers).
The earliest Greek philosophers, known as the pre-Socratics, provided competing answers to the question found in the myths of their neighbours: "How did the ordered cosmos in which we live come to be?" The pre-Socratic philosopher Thales, dubbed the "father of science", was the first to postulate non-supernatural explanations for natural phenomena such as lightning and earthquakes. Pythagoras of Samos founded the Pythagorean school, which investigated mathematics for its own sake, and was the first to postulate that the Earth is spherical in shape. Subsequently, Plato and Aristotle produced the first systematic discussions of natural philosophy, which did much to shape later investigations of nature. Their development of deductive reasoning was of particular importance and usefulness to later scientific inquiry.
The important legacy of this period included substantial advances in factual knowledge, especially in anatomy, zoology, botany, mineralogy, geography, mathematics and astronomy; an awareness of the importance of certain scientific problems, especially those related to the problem of change and its causes; and a recognition of the methodological importance of applying mathematics to natural phenomena and of undertaking empirical research. In the Hellenistic age scholars frequently employed the principles developed in earlier Greek thought: the application of mathematics and deliberate empirical research, in their scientific investigations. Thus, clear unbroken lines of influence lead from ancient Greek and Hellenistic philosophers, to medieval Muslim philosophers and scientists, to the European Renaissance and Enlightenment, to the secular sciences of the modern day. Neither reason nor inquiry began with the Ancient Greeks, but the Socratic method did, along with the idea of Forms, great advances in geometry, logic, and the natural sciences. Benjamin Farrington, former Professor of Classics at Swansea University wrote:
The level of achievement in Hellenistic astronomy and engineering is impressively shown by the Antikythera mechanism (150-100 BC). The astronomer Aristarchus of Samos was the first known person to propose a heliocentric model of the solar system, while the geographer Eratosthenes accurately calculated the circumference of the Earth. Hipparchus (c. 190 - c. 120 BC) produced the first systematic star catalog. In medicine, Herophilos (335 - 280 BC) was the first to base his conclusions on dissection of the human body and to describe the nervous system. Hippocrates (c. 460 BC - c. 370 BC) and his followers were first to describe many diseases and medical conditions. Galen (129 - c. 200 AD) performed many audacious operations--including brain and eye surgeries-- that were not tried again for almost two millennia. The mathematician Euclid laid down the foundations of mathematical rigour and introduced the concepts of definition, axiom, theorem and proof still in use today in his Elements, considered the most influential textbook ever written.Archimedes, considered one of the greatest mathematicians of all time, is credited with using the method of exhaustion to calculate the area under the arc of a parabola with the summation of an infinite series, and gave a remarkably accurate approximation of Pi. He is also known in physics for laying the foundations of hydrostatics and the explanation of the principle of the lever.
Theophrastus wrote some of the earliest descriptions of plants and animals, establishing the first taxonomy and looking at minerals in terms of their properties such as hardness. Pliny the Elder produced what is one of the largest encyclopedias of the natural world in 77 AD, and must be regarded as the rightful successor to Theophrastus.
For example, he accurately describes the octahedral shape of the diamond, and proceeds to mention that diamond dust is used by engravers to cut and polish other gems owing to its great hardness. His recognition of the importance of crystal shape is a precursor to modern crystallography, while mention of numerous other minerals presages mineralogy. He also recognises that other minerals have characteristic crystal shapes, but in one example, confuses the crystal habit with the work of lapidaries. He was also the first to recognise that amber was a fossilized resin from pine trees because he had seen samples with trapped insects within them.
Excavations at Harappa, Mohenjo-daro and other sites of the Indus Valley Civilization (IVC) have uncovered evidence of the use of "practical mathematics". The people of the IVC manufactured bricks whose dimensions were in the proportion 4:2:1, considered favourable for the stability of a brick structure. They used a standardised system of weights based on the ratios: 1/20, 1/10, 1/5, 1/2, 1, 2, 5, 10, 20, 50, 100, 200, and 500, with the unit weight equaling approximately 28 grammes (and approximately equal to the English ounce or Greek uncia). They mass-produced weights in regular geometrical shapes, which included hexahedra, barrels, cones, and cylinders, thereby demonstrating knowledge of basic geometry.
The inhabitants of Indus civilisation also tried to standardise measurement of length to a high degree of accuracy. They designed a ruler—the Mohenjo-daro ruler—whose unit of length (approximately 1.32 inches or 3.4 centimetres) was divided into ten equal parts. Bricks manufactured in ancient Mohenjo-daro often had dimensions that were integral multiples of this unit of length.
Early astronomy in India--like in other cultures-- was intertwined with religion. The first textual mention of astronomical concepts comes from the Vedas--religious literature of India. According to Sarma (2008): "One finds in the Rigveda intelligent speculations about the genesis of the universe from nonexistence, the configuration of the universe, the spherical self-supporting earth, and the year of 360 days divided into 12 equal parts of 30 days each with a periodical intercalary month."
Classical Indian astronomy documented in literature spans the Maurya (Vedanga Jyotisha, c. 5th century BCE) to the Mughal (such as the 16th century Kerala school) periods. The first named authors writing treatises on astronomy emerge from the 5th century, the date when the classical period of Indian astronomy can be said to begin. Besides the theories of Aryabhata in the Aryabhatiya and the lost Arya-siddh?nta, we find the Pancha-Siddh?ntika of Varahamihira. The astronomy and the astrology of ancient India (Jyotisha) is based upon sidereal calculations, although a tropical system was also used in a few cases.
Alchemy (Rasastra in Sanskrit)was popular in India. It was the Indian alchemist and philosopher Kanada who introduced the concept of 'anu' which he defined as the matter which cannot be subdivided. This is analogous to the concept of atom in modern science.
Linguistics (along with phonology, morphology, etc.) first arose among Indian grammarians studying the Sanskrit language. The Sanskrit grammar of Pini (c. 520 – 460 BCE) contains a particularly detailed description of Sanskrit morphology, phonology and roots, evincing a high level of linguistic insight and analysis.
Ayurveda medicine traces its origins to the Vedas, Atharvaveda in particular, and is connected to Hindu religion. The Sushruta Samhita of Sushruta appeared during the 1st millennium BC. Ayurvedic practice was flourishing during the time of Buddha (around 520 BC), and in this period the Ayurvedic practitioners were commonly using Mercuric-sulphur combination based medicines. An important Ayurvedic practitioner of this period was Nagarjuna, accompanied by Surananda, Nagbodhi, Yashodhana, Nityanatha, Govinda, Anantdev, Vagbhatta etc. During the regime of Chandragupta Maurya (375-415 AD), Ayurveda was part of mainstream Indian medical techniques, and continued to be so until the Colonial period.
The main authors of classical Indian mathematics (400 CE to 1200 CE) were scholars like Aryabhata, Brahmagupta, and Bhaskara II. Indian mathematicians made early contributions to the study of the decimal number system, zero, negative numbers, arithmetic, and algebra. In addition, trigonometry, having evolved in the Hellenistic world and having been introduced into ancient India through the translation of Greek works, was further advanced in India, and, in particular, the modern definitions of sine and cosine were developed there. These mathematical concepts were transmitted to the Middle East, China, and Europe and led to further developments that now form the foundations of many areas of mathematics.
The first recorded observations of solar eclipses and supernovae were made in China. On July 4, 1054, Chinese astronomers observed a guest star, a supernova, the remnant of which is now called the Crab Nebula. Korean contributions include similar records of meteor showers and eclipses, particularly from 1500-1750 in the Annals of the Joseon Dynasty. Traditional Chinese Medicine, acupuncture and herbal medicine were also practised, with similar medicine practised in Korea.
Among the earliest inventions were the abacus, the public toilet, and the "shadow clock".Joseph Needham noted the "Four Great Inventions" of China as among some of the most important technological advances; these were the compass, gunpowder, papermaking, and printing, which were later known in Europe by the end of the Middle Ages. The Tang dynasty (AD 618 - 906) in particular was a time of great innovation. A good deal of exchange occurred between Western and Chinese discoveries up to the Qing dynasty.
However, Needham and most scholars recognised that cultural factors prevented these Chinese achievements from developing into what might be considered "modern science".
It was the religious and philosophical framework of the Chinese intellectuals which made them unable to believe in the ideas of laws of nature:
It was not that there was no order in nature for the Chinese, but rather that it was not an order ordained by a rational personal being, and hence there was no conviction that rational personal beings would be able to spell out in their lesser earthly languages the divine code of laws which he had decreed aforetime. The Taoists, indeed, would have scorned such an idea as being too naïve for the subtlety and complexity of the universe as they intuited it.-- 
The Elements of Euclid not only was the earliest major Greek mathematical work to come down to us, but also the most influential textbook of all times. [...]The first printed versions of the Elements appeared at Venice in 1482, one of the very earliest of mathematical books to be set in type; it has been estimated that since then at least a thousand editions have been published. Perhaps no book other than the Bible can boast so many editions, and certainly no mathematical work has had an influence comparable with that of Euclid's Elements.Missing or empty
Shortly after Euclid, compiler of the definitive textbook, came Archimedes of Syracuse (c. 287-212 BC.), the most original and profound mathematician of antiquity.