The Homestead Act offered foreign people land in the west. People could own the land after a period of 5 years if they were productive with it.
The Louisiana territory was sold by Napoleon to the U.S through a treaty. Napoleon thought that this land was too problematic to defend and so he gave it to us. The united states bought it, but they did not knew its boundaries and how big it was.
Mexico was obliged to cede its territory to the United States as a result of war. Trough the treaty of Guadalupe Hidalgo U.S paid $15 million for over 500,000 square miles of territory.
Creation of the transcontinental Railroad/Gadsden Purchase
In 1846 a conflict between Britain and the United States started in which both sides claimed the Oregon territory as theirs. This fight was resolved by signing the Oregon Treaty that established a boundary.
After Texas gained its independence from Mexico it wanted to join the United Sates. Texas wasn't admitted to the Union as the 28th state until 1845.
The Gadsden Purchase established the current border between the U.S and Mexico. This purchase added 29,000 square miles of land to the United States. It also secured the area for the transcontinental railroad.