After having attended primary school in Töss and secondary school in Zürich, Graf studied at the private teachers' college Muristalden, close to Bern, from 1868-1871. He obtained a certificate as a primary school teacher, but went on to do further studies at the Eidgenössisches Polytechnikum Zürich (since 1911 Eidgenössische Technische Hochschule Zürich).
In 1874 he graduated from the Polytechnikum with a certificate as a secondary school science teacher. In the same year, he married Anna Luisa Däniker, from Zürich. Also, he moved back to Bern where he taught mathematics and physics at the private secondary school Lerberschule (founded in 1859, renamed Freies Gymnasium Bern in 1892). Furthermore, he matriculated at the University of Bern as a PhD student. His supervisor was Ludwig Schläfli, whom he admired :-
Schläfli, who held the chair of mathematics at the University of Bern at the time, guided his research and to him became a beloved teacher who he never forgot.Graf was awarded his doctorate for his thesis Beiträge zur Theorie der Riemann'schen Fläche in 1877. In 1878, he became a private lecturer (Privatdozent) at the University of Bern. In addition to his duties at the university, he continued teaching at the Lerberschule and, in 1885, he even became the first deputy headmaster of the school. However, being an "inveterate"  advocate of the sciences, Graf was not deemed a suitable candidate for the position as headmaster of the school a few years later, as the school was based on Christian and humanistic principles. Furthermore, his workload at the university increased.
In 1890 he was appointed as an extraordinary professor; two years later he became Schläfli's successor when Schläfli retired, being appointed to an ordinary professorship. Graf was a popular teacher and lecturer :-
His well-prepared courses, his clear and lively lectures always attracted the sympathy of his audience. Besides, he loved his students. ... Even when they had been released into life, he did not leave them and continued to take an interest in their careers, their success in education or in the pursuit of their scientific research.In 1898, he entered his second marriage, with Maria Magdalena Balli from Aarmühle. He held the chair of mathematics at the University of Bern until his death in 1918.
Graf's main mathematical interests were in Bessel functions, gamma functions and spherical functions. Crelier remarks in  that much of Graf's research was inspired by Schläfli's papers on these functions. Today he is best known for Graf addition theorems for Bessel functions and other such functions. Examples of his papers are: Über die Addition und Subtraction der Argumente bei Bessel'schen Functionen nebst einer Anwendung (1893); Beiträge zur Auflösung von linearen Differentialgleichungen zweiter Ordnung mit linearen Coefficienten sowie von Differentialgleichungen zweiter Ordnung, denen gewisse bestimmte Integrale genügen (1894); and Beitrag zur Auflösung von Differentiagleichungen zweiter Ordnung, denen gewisse bestimmte Integrale genügen (1902). Graf also took a keen interest in actuarial sciences; he published a number of papers on insurance funds and lectured on actuarial mathematics from 1902-1918 at the University of Bern.
His other areas of interest were in the history of mathematics and cartography. Between 1890 and 1912, he wrote numerous articles called Notes on the History of Mathematics and Sciences in Switzerland. He published biographies of a several Swiss mathematicians, cartographers and astronomers, including Ludwig Schläfli and Jakob Steiner. Graf also edited Schläfli's correspondence with Steiner, Arthur Cayley and Carl Borchardt.
Throughout his life, Graf held a large number of administrative positions. At the University of Bern, he served as dean of the faculty of philosophy and sciences for three years (1900-1902 and 1910-1911). During 1905-1906 he was also vice chancellor of the university. Furthermore, he was a member of various committees and introduced several insurance funds, such as the university's fund for widows and orphans.
For most of his professional life, Graf was a member of the Swiss and the Bernese Societies for Natural Scientists; he was the editor of the communications of the Bernese society from 1883-1910.
From 1895 until his death, Graf was president of the Swiss library committee. He was one of the people responsible for the foundation of the Swiss National Library. Moreover, he was a member of the Bernese city council during 1889-1895 and a member of the Bernese district council during 1896-1911. Although originally from Zürich, Graf became :-
... an excellent Bernese who was held in high esteem by all his fellow citizens.
Article by: Stefanie Eminger, University of St Andrews