I am the Lord thy God


"I am the thy God" is the opening phrase of the Ten Commandments, which are widely understood as moral imperatives by ancient legal historians and Jewish and Christian biblical scholars.
The text of the Ten Commandments according to the Book of Exodus begins:
The conventional "the " in English translations renders in the Hebrew text, the proper name of the God of Israel, reconstructed as Yahweh. The translation "God" renders אֱלֹהִים, the normal biblical Hebrew word for "god, deity".
The introduction to the Ten Commandments establishes the identity of God by both his personal name and his historical act of delivering Israel from Egypt. The language and pattern reflects that of ancient royal treaties in which a great king identified himself and his previous gracious acts toward a subject king or people.
Establishing his identity through the use of the proper name, Yahweh, and his mighty acts in history distinguishes Yahweh from the gods of Egypt which were judged in the killing of Egypt's firstborn and from the gods of Canaan, the gods of the gentile nations, and the gods that are worshipped as idols, starry hosts, or things found in nature, and the gods known by other proper names. So distinguished, Yahweh demands exclusive allegiance from the Israelites. “I am the your God” occurs a number of other times in the Bible also.

Hebrew Bible

By saying, "I am the your God, who brought you out of Egypt, out of the land of slavery", it introduces him by name to establish his authority behind the stipulations that follow. The implicit imperative is to believe that God exists and that his proper name is “Yahweh.” By invoking the exodus from Egypt, it also suggests the archetype of God as the redeemer and intervener in history. This verse also serves as the motive clause for the following imperatives.
The text follows an ancient royal treaty pattern, where the speaking monarch begins by identifying himself by name and notable deeds.
Yahweh thus establishes his position relative to the Israelites, who are expected to render complete submission, allegiance, and obedience to him. The covenant logic establishes an exclusive relationship in which the subject population may have only one sovereign, as expressed explicitly in thou shalt have no other gods before me.

New Testament

quotes Deuteronomy when tempted to worship Satan in exchange for all the kingdoms of the world.
Jesus repeats the Shema as the most important commandment:
Those who eat food sacrificed to idols are rebuked. Just as in the Hebrew Bible, where sacrificing to other gods is portrayed as sacrificing to demons, idolatry is connected with the worship of demons in the New Testament, and God is described as jealous regarding idolatry.
The New Testament asserts that God brings consequences to those who worship other gods. God commands "all people everywhere to repent." Idols are described as “worthless things” and people are exhorted to turn away from them to the living God. The teaching of Moses and the experience of Israel when they departed from it are used to support the insistence that believers abstain from idolatry and sexual immorality.

Roman Catholic doctrine

The Catechism of the Catholic Church teaches that “The first commandment summons man to believe in God, to hope in him, and to love him above all else.” It cites the requirement of the Shema, that “You shall love the Lord your God with all your heart, and with all your soul and with all your strength” and the answer Jesus gave when tempted by Satan.
In their explanation of the first commandment, the Catechism quotes Justin Martyr's dialogue to support their teaching that Christians and Jews have trusted the same God.
The Catechism describes the phrase “I am the ” at the beginning of the Ten Commandments as an expression of God's existence and his authority.

Protestant views

viewed “I am the thy God” as a preface to the Decalogue and “have no other gods” as the first commandment. However, he also allowed for viewing “I am the thy God” as the first commandment, provided one also allows it to serve as a preface to the whole Decalogue. In his commentary on the first commandment, Calvin describes superstition as akin to a wife committing adultery in front of her husband.
Martin Luther describes the first commandment as prohibiting both the literal honoring of other gods as well as trusting in idols of the heart: money, good works, superstition, etc.
Like Calvin, Matthew Henry considers “I am the thy God” to be a preface. Henry explains the preface and the first commandment from a covenant viewpoint: God delivered Israel from Egypt, and they belong to him by mutual agreement, so they are bound to obey his covenant stipulations.
John Wesley makes the common observation that Israel is obligated to obey God's commandments because he delivered them from Egypt, and he adds the observation that Christians are likewise obligated to serve Christ, having been rescued out of bondage to sin.
John Wesley uses the first commandment in Deuteronomy 5 as a motivation to pose a list of introspective questions.
In his exposition of Exodus 20 on the “Thru The Bible” radio program, J. Vernon McGee, quotes Romans 1:21-25 and Colossians 3:5 to support his assertion that the idolatry forbidden by the first commandment includes not only the worship of idols and foreign gods, but also idols of the heart such as greed, alcohol, and sexual immorality.

Jewish doctrine

"I am the your God who brought you out of the land of Egypt, from the house of slavery. You shall have no other gods before Me..." Maimonides interpreted this as a command requiring one to know there is a God. Ibn Ezra interpreted this as a command to believe that Yahweh alone is God. This command prohibits belief in or worship of any additional deities:
"Do not make an image or any likeness of what is in the heavens above..." This prohibits the construction or fashioning of "idols" in the likeness of created things and worshipping them.

Other occurrences

The phrase "I am the your God" אנכי יהוה אלהיך appears a number of times in the Hebrew Bible outside of the Decalogue.
Thus, Leviticus 18 gives a number of commands prohibiting sexual perversions and the sacrifice of children. It demands that God's people behave differently from the nations around them, lest they be destroyed in the same manner.
In a similar manner, Leviticus 19 gives additional commands regarding separation from mediums and spiritists, the honoring of the aged, and kindness to foreigners.
The prophet Isaiah asserts that failure to obey the commandments is the reason for Israel's captivity and had the nation obeyed the commandments, they would have had peace like a river.
The prophet Joel looks forward to future blessing through which God's people will know that Yahweh is their God through his wondrous deeds on their behalf.