The inventor of the whip is unkown; as its use (more specifically, the crack of the whip) has been traced back all the way to ancient Egypt and Japan in motivating slaves to continue working.
What’s certain, however, is that as long as whips have been cracking, they have been the first man made devices to break the sound barrier. Certain types of whips have a loop in the material that can be moved down the whip and increase the speed to more than 768 miles per hour (more than 30 times the speed of the hand movement involved), breaking the sound barrier.
The "crack" of the whip is actually a sonic boom. The whip was primarily designed for inflicting pain, for compliance, and for punishment or torture purposes. The crack of the whip was used very commonly in animal training to encourage obedience from the animal at the reminder of pain.
It is still used today, especially in horses, but its use is limited, and overuse can result in fines and is often considered animal cruelty. The cracking of whips is also used to indicate commands for animals, like in herding livestock, or to indicate proper behavior.