This question illustrates what happens when something which has been done by hand is now capable of having a machine do the work. The cotton industry had been very labor intensive, requiring many hands to harvest a crop, clean it, bale it, deliver it to the mill etc. The cotton industry was one of the biggest users of slave labor because so many people were required. When the cotton gin was invented, the requirements for labor dropped to almost nothing, and cotton became a profitable crop again. Where profit is possible, people follow, so the cotton industry came alive again with many more people planting cotton.