India played a significant role in the history of sex, from writing the first literature that treated sexual intercourse as a science, to in modern times being the origin of the philosophical focus of new-age groups' attitudes on sex. It may be argued that India pioneered the use of sexual education through art and literature. As in all societies, there was a difference in sexual practices in India between common people and powerful rulers, with people in power often indulging in hedonistic lifestyles that were not representative of common moral attitudes.
These texts support the view that in ancient India, sex was considered a mutual duty between a married couple, where husband and wife pleasured each other equally, but where sex was considered a private affair, at least by followers of the aforementioned Indian religions. It seems that polygamy was allowed during ancient times. In practice, this seems to have only been practiced by rulers, with common people maintaining a monogomous marriage. It is common in many cultures for a ruling class to practice polygamy as a way of perserving dynastic succession.