It is here where he meets Erhard Weigel, Professor of mathematics and philosopher. Through him Leibniz began to understand the importance of mathematical demonstration method for disciplines such as logic and philosophy. Weigel believed that number was the fundamental concept of the universe and their ideas had a considerable influence on Leibniz. In October 1663 he returned to Leipzig to begin his PhD in law. He obtained his degree (M.A.) in philosophy for a dissertation which combined aspects of philosophy and law studying linkages between these disciplines and the mathematical ideas he had learned of Weigel. Few days after the submission of his dissertation, his mother died. After getting his law degree, he worked on his Habilitation in philosophy. His work, art Dissertatio (dissertation on the art of combination) combinatorics, was published in 1666.

In this work Leibniz raises the reduction of all the reasoning and findings to the combination of basic elements such as numbers, letters, sounds and colors. Against wind and tide by his growing reputation you was denied the doctorate in law in Leipzig. It is not very clear why happened, perhaps because I was very young and there was no sufficient charges. It was suggested to wait to the next year, but Leibniz was not willing to accept delays and went to the University of Altdorf where he obtained his doctorate in February 1667 for his dissertation De Casibus Perplexis (on perplexed cases). Leibniz broke the oath of a professorship in Altdorf because he had other issues in view. He was for a time Secretary of the society of Alchemy in Nuremberg, where he met the baron Johann Christian Boineburg. In November of 1667 Leibniz was already living in Frankfurt, employed by Boineburg.