ENThe article analyses the formation of scientific thinking in ancient Greece. The overview of the philosophical ideas as regards to their influence on mathematics is done. The influence of Pythagorean mathematical orientation and the further development of their ideas is emphasized. Mathematical knowledge is discussed as an insight into the fundamental structure of the Universe because mathematical structures express quantitative relations and spatial forms of the real things. The main goal is to show how mathematics is transformed into the science of deduction in order to satisfy the growing needs for stricter requirements to logics. The relationship between the foundation of mathematics as fundamental science and formation of criteria for scientific research as such is discovered.