Answer
Greig, the surname of Mary Somerville's second husband, played a pivotal role in her scientific achievements. William Greig, a physician, actively supported her intellectual endeavors and encouraged her to pursue her scientific studies. His unwavering belief in her abilities and his own scientific background allowed them to engage in fruitful discussions and collaborate on scientific ideas, thus fostering Mary Somerville's scientific growth and success.