It was an unusual sight for many, as the Chinese capital is normally shrouded in smog.
You have been sending in your pictures of rainbows taken around the world. Take a look at our selection.
Nirav Haria is studying in Perth, Australia and took this picture, below, of a stunning double rainbow from his apartment window. "It was raining behind me in the hills," he said via WhatsApp.
Meera Nerurkar was on a rainy street in Dusseldorf, Germany when she tweeted this image:
Ivar Liebers captured this rainbow picture, showing a faint hint of a second rainbow, while on holiday in Värmland, Sweden.
After a heavy spell of rain, V Cadaverini was treated to a spectacular double rainbow over a driving range in Lincolnshire, UK.
Olena Herasimova tweeted this picture of a smiley rainbow:
Viv Walker took this photo whilst in Paleochora, Greece. "It was a very showery day", she said.
Ewan Shannon took this picture, below, which his wife Lesley tweeted, showing a rainbow in cloudy Dunbartonshire, Scotland. The rainbow managed to make an appearance on a "miserable day", she said.
Thank you for sharing your pictures with us via @BBC_HaveYourSay and thank you to followers of @BBCBrasil for their contributions to this gallery.
If you take any images of news events or something striking, please email your pictures to yourpics@bbc.co.uk, upload them here, tweet them to @BBC_HaveYourSay or text 61124. If you are outside the UK, send them to the international number +44 7624 800 100.
You could also send us pictures on WhatsApp. Our number is: +44 7525 900 971.
Read our terms and conditions.
After hours of rainfall, residents of Beijing were treated to a stunning rainbow which dominated the city skyline on Monday.