The Queen has posted a photo on the official royal family Instagram account for the first time.

She was applauded after sharing an image of a letter from 19th century inventor and mathematician Charles Babbage to Prince Albert.

The Queen used an iPad to share the photo as she looked at exhibits in the Science Museum's summer exhibition - Top Secret.

The museum's director said it was a "nerve-wracking moment".

The Queen's post read: "In the letter, Babbage told Queen Victoria and Prince Albert about his invention, the Analytical Engine, upon which the first computer programmes were created by Ada Lovelace, a daughter of Lord Byron.

"Today, I had the pleasure of learning about children's computer coding initiatives and it seems fitting to me that I publish this Instagram post at the Science Museum, which has long championed technology, innovation and inspired the next generation of inventors."

During her long reign, the Queen - Britain's longest-reigning monarch - has encountered many technological changes.

She was the first person to have her Coronation filmed when television cameras were allowed inside Westminster Abbey in 1953.

More than half a million extra TV sets were sold in the weeks running up to the historic event.

She has also seen the introduction of colour television, mobile phones and the internet.

Image copyright Reuters Image caption The Queen was shown an Enigma machine - one of the exhibits in the upcoming exhibition

She also made the UK's first "trunk call" - a long distance call made within the same country - in 1958.

She became the first monarch to send an email when the technology was in its infancy during a visit to an Army base in 1976.

Her grandchildren, Princesses Beatrice and Eugenie explained the concept of YouTube to her, and she then launched her own channel on the site in 2007.

She also personally uploaded a video to the video sharing site during a visit to Google's offices in London in 2008.

Five years ago, the Queen also sent her first tweet during a visit to the Science Museum.

During that visit she was also opening an exhibition, tweeting: "It is a pleasure to open the Information Age exhibition today at the @ScienceMuseum and I hope people will enjoy visiting. Elizabeth R".