When was torture invented?

Torture, as a whole, has basically been around since the beginning of humankind. Until the second century AD, it was ( with a few exceptions) used on slaves. In the colonial United States, it was documented that women were put into stocks with wooden clips on their tongues or dunked for "talking too much."