Mary Fairfax was probably about fifteen when one day a friend showed her a monthly magazine containing coloured pictures of ladies’ dresses and puzzles. She was surprised to see strange lines mixed up with letters in the puzzles in a way that she could not understand, and asked her friend what they were. She was told that they were a kind of arithmetic called algebra, but her friend could not tell her what algebra was. On going home she looked amongst the family books to see if there was one which would explain algebra. She could only find one about navigation, which she studied, though she could but dimly understand it. She had no one of whom she could ask questions, and knew that she would only be laughed at if she spoke of her desire for knowledge, so that she often felt sad and forlorn. But she managed to teach herself enough Greek to read Xenophon and Herodotus. The next winter she spent in Edinburgh again and was sent to a drawing school, and got on well with drawing; but it was not till the following summer, when her youngest brother was studying with a tutor, that she ventured to ask the tutor to get her books about algebra and Euclid, and she was able to begin the studies which were to make her famous as a mathematician. She worked very hard, for she had many household duties to perform, and to spend much time on music and painting, which were the only studies of which her mother approved. She could only study mathematics by sitting up late at night, and burnt so many candles that the servants complained to her mother, and her candle was ordered to be taken away when she went to bed. Then she used to keep up her studies by going over in the dark what she had already learnt.

By this time Mary was grown up, and was a remarkably pretty girl, very small and delicate-looking. She began to go out to parties in Edinburgh, which she much enjoyed, and where she was much admired; but all the time she never lost sight of what she felt to be the main object of her life, the pursuit of her studies. She painted at the art school, she practised her piano for five hours every day, she made all her own dresses, even her ball dresses, she spent her evenings working and talking with her mother. To get time for her other studies, she used to rise at daybreak, and, after dressing, wrapt herself in a blanket to keep warm, and read algebra or classics till breakfast time. So amidst difficulties of all kinds she struggled on with her studies; no one, except her uncle Dr. Somerville, ever gave her any help or encouragement.

When she was twenty-four, Mary Fairfax married her cousin, Samuel Grieg, and went to live in London. Her husband was out at his work all day and she had plenty of time for her studies. But though he did not interfere with what she did, he gave her no help or encouragement. He knew nothing of science himself, and did not believe that women were capable of intellectual work. She struggled on as best she could and took lessons in French so as to learn to speak it. After three years her husband died, leaving her with two little boys, one of whom did not live to grow up. Mary went back to live with her parents; she cared for her children with the utmost tenderness, but she still devoted herself to her mathematical studies, and she was able to get advice and help from a professor in Edinburgh. To get time to study she still rose early, for during most of the day she was busy with her children, and the evening she devoted to her father. People thought her queer and foolish, because she did not go into society; but she did not care for their criticisms, and made real progress in her studies.

She had several proposals of marriage, but refused them all till, in 1812, she agreed to marry her cousin, Dr. William Somerville, son of the uncle who had been the only person to help her in her studies when she was a girl. When her engagement was known, one of Dr. Somerville’s sisters, who was younger than herself and unmarried, wrote to her saying she “hoped she would give up her foolish manner of life and studies and make a respectable and useful wife to her brother.” This made Dr. Somerville very indignant, and he wrote a severe and angry letter to his sister. After this none of his family dared to interfere with his wife again. His father was delighted with his choice, for he understood and loved his niece. Some of the family were much astonished, when in the summer after the marriage they were staying together in the lakes, and one of them fell ill and expressed a wish for currant jelly, to find that Mrs. Somerville, in spite of her learning, was able at once to make some excellent jelly.

The marriage was an absolutely happy one. Dr. Somerville loved and admired his wife and was very proud of her learning. For the first time she had encouragement to pursue her studies instead of having obstacles thrown in her way. At first they lived in Edinburgh, but, in 1816, Dr. Somerville received an appointment in London, and they moved there and settled in Hanover Square. Many friends gathered round them, and Mrs. Somerville enjoyed intercourse with other learned people, especially with Sir William Herschel, the great astronomer. She not only went on with her scientific studies, but she took lessons in painting. She and her husband enjoyed making together a collection of minerals. They added to it on their travels in France and Italy, which were an immense delight to her. Several children were born to Mrs. Somerville, but only one son of her first marriage and two daughters of her second marriage lived to grow up. She was a devoted mother, and gave much time to the care of her children. She gave her morning hours to domestic duties, and was determined that her daughters should not suffer as she had done from want of a good education. She taught them herself all the subjects she was able to teach, giving three hours to their lessons every morning. Her house was carefully managed, and she used to read the newspapers diligently as she was keenly interested in politics; she read, too, all the most important new books on all kinds of subjects. Science was her special study, but she loved poetry and read all the great authors in Latin and Greek as well as in French and Italian. She was very fond of music and devoted to painting, and was very clever and neat with her needle, and she also enjoyed society very much. Miss Edgeworth, the novelist, after meeting her in 1822, described her as small and slight, with smiling eyes and a charming face, quiet and modest in her ways, with a very soft voice and a pleasant Scotch accent. She said of her: “While her head is among the stars her feet are firm upon the earth.”

Mrs. Somerville never herself introduced learned subjects into general talk, but when others did she spoke of them simply, and naturally without assuming any superior knowledge. Yet, of course, other learned people soon found out how much she knew. When she was in Edinburgh, she had written, at the request of the editor, a learned article on comets for the Quarterly Review, but she had no idea of writing any book till, in 1827, a letter came from Lord Brougham to Dr. Somerville asking whether Mrs. Somerville would write, for a series he was interested in, a book on a very important French work about the stars written by the famous astronomer, La Place. Mrs. Somerville had met La Place in Paris; he had said of her that she was the only woman who could understand his works, and Lord Brougham wrote that she was the only person who could write the book he wanted, and if she would not write it, it must be left undone. Mrs. Somerville writes herself that she was surprised beyond expression by this letter. She thought Lord Brougham must be mistaken as to her powers, and that it would be very presumptuous in her “to attempt to write on such a subject or indeed on any other.” However, Lord Brougham called in person to press his request, and at last she agreed, on condition that no one should know what she was trying to do, and that if she failed the manuscript should be put into the fire.

She had now to try to make time for more work in her busy life. This she did by getting up earlier to see to her household duties, but she was much disturbed by interruptions. People did not think that a woman was like a man and could have any real work to do. Frequently friends or relations would arrive when she was in the midst of a difficult problem and say, “I have come to spend a few hours with you.” She had no other room to work in but the drawing-room, and as soon as the bell warned her of a visitor, she used to cover up her books and papers with a piece of muslin so that no one should know what she was doing. She learnt by habit to put up with interruptions, and to go back at once when alone again, to the point where she had left off. She did her work in the same room where her children prepared their lessons after she had taught them, and she was never impatient when they brought their little difficulties to her, but answered them quickly and quietly and went back to her own work. She could so abstract her mind that even talking or practising on the piano did not disturb her.

When the book was finished and sent to be looked at, Mrs. Somerville felt very nervous as to what might be thought of it. It made her very happy and proud when the great astronomer, Sir John Herschel, wrote to say that he had read it with the highest admiration, and added: “Go on thus and you will leave a memorial of no common kind to posterity; and, what you will value far more than fame, you will have accomplished a most useful work.” Her book was received with immense praise. The scientific societies hastened to show her honour; her bust was ordered to be executed by the great sculptor, Chantrey, and placed in the hall of the Royal Society of London, and at the prime minister’s request, the king granted her a pension of £200 a year. The relations who had found fault with her ways were now astonished at her success, and were loud in her praise; but most of all she valued the deep delight of her husband, who had always encouraged her, and whose pride in her knew no bounds.

After this success other scientific books were written by Mrs. Somerville. Much of her work was done in Italy, where they went on account of Dr. Somerville’s health. In Rome, as in London, Mrs. Somerville never allowed anything to interfere with her morning’s work, but in the afternoon she enjoyed keenly going about to see the wonderful sights of the city or making excursions into the country. She wrote to her son in 1841 that she had undertaken a book more fit for the combination of a society than for a single hand to accomplish. This was her book on Physical Geography, with which she was at first so dissatisfied that she wished to burn it. But her husband begged her to send it to Sir John Herschel, who advised that it should be published, and it went through six editions.

In 1860, Mrs. Somerville had the great sorrow of losing her husband, who died in Florence at the age of eighty-nine. One who knew them well and had only lately seen them together, spoke of them as giving the most beautiful instance of united old age. Mrs. Somerville continued to live in Italy with her two daughters, first in Spezzia and afterwards in Naples. To the last she worked on, writing a new book, bringing out new editions of her old books, and working at them so as to include in them the latest scientific discoveries. She used to study in bed every day from eight in the morning till twelve or one o’clock. A little bird, a mountain sparrow, was her constant companion for eight years and would sit and even go to sleep on her arm whilst she wrote. It was a real sorrow when one day it disappeared and was found drowned in a water jug. She still painted, and enjoyed sketching the beautiful view that could be seen from her windows.