James Abram Garfield (1831–1881) was the 20th president of the United States, serving from March 4 to September 19, 1881. Garfield was born into poverty in a log cabin in Northeast Ohio. He was a Union major general during the American Civil War. Elected to Congress in 1862 to represent Ohio's 19th district, he served nine terms, gaining a reputation as a skilled orator. He also wrote a notable proof of the Pythagorean theorem, published in 1876. Selected as a compromise candidate at the 1880 Republican National Convention, Garfield won the general election. As president he oversaw a resurgence of presidential authority against senatorial courtesy in executive appointments, a purge of corruption in the Post Office, and the appointment of a Supreme Court justice. Garfield advocated an educated electorate and civil rights for African Americans. He was shot on July 2, 1881, and died from infections caused by his doctors. (This article is part of a featured topic: 1880 United States presidential election.)