Before her marriage, Sophia, as the daughter of Frederick V, Elector Palatine of the Rhine, was referred to as Sophie, Princess Palatine of the Rhine, or as Sophia of the Palatinate.
On
30 September 1658, she married Ernst August, Duke of
Brunswick-Lüneburg, at
Heidelberg, who in 1692 became the first
Elector of
Hanover. (Electors were princes who had the right to vote to elect the emperor of the
Holy Roman Empire). Ernst August was a second cousin of Sophia's mother
Elizabeth Stuart, as they were both great grandchildren of
Christian III of Denmark.
Sophia became a friend and admirer of
Gottfried Leibniz while he was a courtier to the House of Brunswick, from 1676 until his death in 1716. This friendship resulted in a substantial correspondence, published in the 19th century (Klopp 1973), that reveals Sophia to have been a woman of unusual intellectual ability and curiosity.
Sophia commissioned significant work on the
Herrenhausen Gardens surrounding the palace at
Herrenhausen, where she died.