he was born in edinburgh in 1855 the only son of marianne ballantyne and her husband, william walker nicol, both from the scottish borders. he was educated first in england then returned to edinburgh to be educated at edinburgh academy alongside robert haldane. he entered the university of edinburgh in 1872 studying sciences and specialised in chemistry graduating with a bsc. in 1875 he became a demonstrator assisting the professor.