Sofia Magdalena of Denmark ( July 3, 1746 - August 21, 1813) was born in Copenhagen to King Frederick V of Denmark and Louise of Great Britain and Ireland . Her maternal grandparents were George III of Great Britain and Caroline of Ansbach.
At the age of five (1751), she was betrothed to the successor of the throne of Sweden, Gustav. In 1766 she was married to Gustav at Christiansborg in Copenhangen. After King Adolf Frederick of Sweden death in 1771, Gustav III became King of Sweden. The following year Sofia was crowned queen.
In 1778, Sofia gave birth to Gustav Adolf, successor to the throne; and in 1782 she gave birth to a second son, Charles Gustaf who lived for only one year.
Widowed in 1792, after her husband was murdered, Sofia lived a withdrawn life and spent much effort on charity. She was also forced to witness her son, King Gustaf IV Adolf's abdication before she died.