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.