Deuteronomy 21:15
If a man have two wives, one beloved, and another hated, and they have born him children, both the beloved and the hated; and if the firstborn son be hers that was hated: If a man have two wives, one beloved, and another hated, and they have born him children, both the beloved and the hated; and if the firstborn son be hers that was hated:
Deuteronomy means repetition of the law, rehearsing the wonderful things God had done for His people and some of the chief laws connected with Israel. It was given through Moses before Israel crossed the Jordan into the promised land after forty years of wandering in the wilderness, to solemnly remind them of what God had taught them and to impress the sacred importance of God's holy law and the need to keep it. It stands in Deuteronomy 18-21, at the close of the portion extending from Numbers 35-36 through Deuteronomy 21.
The description of one wife as hated is comparative, meaning loved less or less favored than the beloved wife, not necessarily detested. It illustrates the idiom that contrasts love with a lesser degree of love. The verse shows that polygamy existed under the Mosaic law, where a man could have both a loved and an unloved wife with children by each.
Together with the following verses it begins the law that the firstborn son receives a double portion of his father's inheritance. It protects the rights of the wife and her children when the firstborn is the son of the less favored wife by requiring recognition of his birthright instead of transferring it to the son of the favored wife. This regulation restricted rather than abolished polygamy under the conditions of that time and safeguarded people compelled to live under an institution contrary to God's order and plan. It did not command, encourage, establish, or make right having multiple wives as a divine institution, and the practice brought evil.
Elisha's request for a double portion of Elijah's spirit was a claim to the firstborn's lot as heir to carry on his work, not a request for twice as much of the Spirit as Elijah had. Since Elijah had no natural children but Elisha was his son in the faith and regarded him as a father, the law of the firstborn applied to him spiritually.