The history of the preservation of the Quran

How can we be sure that the Qur’an we have today is the same Qur’an that the Prophet Muhammad taught to his companions 1400 years ago? This is a central question to the legitimacy of the religion of Islam, and to answer it, we need to know how the Qur’an was given to the Prophet, preserved by his companions, and distributed around the Muslim world.