Ulrika Eleonora the Elder was the daughter of Fredrik III of Denmark and Sofia Amalia of Braunschweig-Lüneburg. She was engaged to Karl XI in 1675 for political reasons, but the wedding did not take place until five years later. This confirmed the peace between Sweden and Denmark in 1679.
The couple had seven children in just eight years, three of whom reached adulthood. Two of them, Karl (XII) and Ulrika Eleonora the Younger, eventually ruled Sweden.
The queen exerted no political influence. Instead, she devoted herself to her children and to charitable causes, including establishing poorhouses and orphanages.