History of the universe. Illustration showing the universe's evolution from the big bang (top left) to the present day (lower right). As the universe cooled immediately after the big bang atomic nuclei began to form. After 300, 000 years these nuclei combined with electrons to form atoms (mainly hydrogen). Within a million years dense regions of atoms attracted nearby matter, forming gas clouds and, after 300 to 600 million years stars and small galaxies. Gradually the galaxy formation rate decreased and the small galaxies merged into larger galaxies. The solar system came into existence after about 9 billion years. It is presently 13.7 billion years after the big bang.