Gravity is the force that attracts all matter to each other. It causes planets, stars, and galaxies to form and influences the motion of objects in space. Isaac Newton first proposed that gravity depends on the masses of objects and the distance between them. Later, Einstein's theory of general relativity explained that gravity is caused by the curvature of spacetime due to the uneven distribution of mass. Tests have supported Einstein's theory, such as observations of gravitational lensing and gravitational waves. Gravity plays a key role in the formation and evolution of astronomical objects throughout the universe.