The Mathematics Genealogy Project keeps track mathematics PhD students and advisors. I was surprised to find that such information has been preserved for hundreds of years. I was able to trace my mathematical lineage back to Marin Mersenne (1588–1648) of Mersenne prime fame.
I did my PhD under Ralph Showalter, who studied under Tsuan Wu Ting, and so on back to Siméon Poisson (1781–1840).
Then things start to become more complicated. Poisson had two advisors: Joseph Louis Lagrange and Pierre-Simon Laplace. Lagrange also had two advisors: Leonhard Euler and Johann Bernoulli. Etc. One line goes back to Mersenne. Another line goes back to Demetrios Kydones (1324–1397).
Update: Thanks to Frederik Hermans for creating a graph by crawling the Mathematics Genealogy Project site and using Graphviz. It’s too big to view as an ordinary image; the graph gets very bushy in the 16th century. Here’s a PDF version that lets you zoom in and out to see the whole thing.
I was surprised to see Erasmus on the graph. I didn’t run across him when I was just clicking around the web site.