The Master and the Doctor are shown to have similar levels of intelligence, and were classmates on Gallifrey. This is mentioned several times in different stories ("The Five Doctors", "The Sea Devils" and "Terror of the Autons"). In the 2007 episode "Utopia", the Doctor calls the disguised Master a genius and shows an immense admiration for his intellect before discovering who he is.