 He was the grandson of John O. Cooper (1755–1838), a hatmaker who served in the Continental Army during the American Revolutionary War, and Margaret Campbell (1762–1841).He attended the New York public schools and Columbia College, afterwards entering the iron business with the aid of his father.He completed his studies in 1842 and in 1845, Columbia awarded him the honorary degree of Master of Arts.