Eli Whitney is granted a patent for the cotton gin.