Tucson is a city in and the county seat of Pima County, Arizona, United States. The city is located 118 miles (188 km) southeast of Phoenix and 60 miles (98 km) north of the U.S.-Mexico border. The 2009 Census Bureau estimate puts the city's population at 543,910, with a metropolitan area population at 1,020,200 as of July 1, 2009. In 2009, Tucson ranked as the 32nd largest city and 52nd largest metropolitan area in the United States. Tucson is the largest city in southern Arizona, the second largest in the state after Phoenix. It is also the largest city in the area of the Gadsden Purchase. Tucson is home to the University of Arizona. Roughly 150 Tucson companies are involved in the design and manufacture of optics and optoelectronics systems, earning Tucson the nickname Optics Valley.