in 1819 her husband was appointed physician to chelsea hospital and the family moved to hanover square into a government house in chelsea. somerville was a friend of anne isabella milbanke, baroness wentworth, and was mathematics tutor to her daughter, ada lovelace. with somerville, ada attended the scientific gatherings where she met charles babbage. somerville college owns a letter from babbage to somerville inviting her to view his 'calculating engine'. somerville visited babbage frequently while he was "making his calculating-machines". somerville and lovelace maintained a close friendship and when lovelace encountered difficulties with a mathematical calculation she would walk to somerville's house and discuss the matter over a cup of tea.