The Mexican-American War was fought between the Mexican and American governments over the recognition of Texas as a member of the union and as used to expand the Union towards the Pacific. The war was short-lived and regarded favorably by most Americans due to its successful nature, however, it soured Mexican-American relations. The war made a hero of its two leading generals, Zachary Taylor and Winfield Scott.
The war resulted in the westward expansion of the union. In order to prevent conflict with Great Britain while war was brewing with Mexico, Polk signed the Oregon Treaty with Great Britain, limiting the border as shown on the map. This lead to some north-south tensions, as northerners saw that Polk, a southern democrat, was willing to go to war over southwards expansion but not over northwards expansion.
After Scott invaded Mexico City, the country ceded all of its territory north of the Gila River and recognized Texas as part of the Union. This directly lead to the admission of California into the Union, as shown on this map. The territories gained in this conflict are shown as part of the United States on this map.