In Exodus 20:7 we read (what is commonly considered to be) the third Commandment:

You shall not take the name of the Lord your God in vain, for the Lord will not leave him unpunished who takes His name in vain.

I have heard that this means speaking the name of God in a manner that does not preserve the reverence and respect due to Him and His name.

I have also heard that this means taking the name of the Lord in an empty fashion, where "taking His name" signifies an identifying of oneself with Him, similar to a woman taking a man's name in marriage to signify her union to him. In this case it would mean identifying oneself as one of "His people" (e.g. an "Israelite" or a "Christian") though it be in vain (i.e. no heart / action / devotion behind the association.)

Both sound very convincing to me, having never investigated the Hebrew of this passage. Are both possibilities allowed for in the wording of the Hebrew?

I am specifically looking for guidance from a historical-grammatical perspective. Are there any clues in the Hebrew of this text and/or similar Hebrew wordings in the Old Testament that might shed some light on this debate?

@H3br3wHamm3r81 That question was my inspiration for asking this here. The first option that I presented here was taken as a given in the question you linked until I posted my answer (which hasn't received much attention.) For this question, I'm more interested in the exegesis of "take His name" than the definition of "in vain."
–
Jas 3.1Jul 2 '13 at 21:31

Likewise, curses also frequently invoked that same power in the divine name in order to provide alternative collateral for agreements and contracts in order to bolster the credibility of one or the other party in a contract or agreement. While this may seem silly to us, in a culture where every illness or unfortunate event could be the result of a curse or Karma, to intentionally illicit the anger of a god was very dangerous business.

Therefore, in the context of Yahweh, if an Israelite were to swear an oath before God and then not uphold their end of the bargain and should something unfortunate not befall the individual who breached the contract, this would reflect poorly on Yahweh. Likewise, even if unfortunate events did befall unreliable character who breeches the contract, if the people of God were always running round breaching contracts, this would still reflect poorly on God.

As such, this commandment is not a prohibition of certain words, but instead an instruction to Israelites to keep their word and be a people of integrity. This is why in Matthew 5:37 in the Sermon on the Mount when discussing the 10 commandments and the law, Jesus states "Let your yes mean yes, and your no mean no. Anything more than this comes from the evil one." Jesus is directly referring to an summarizing this commandment. It is also a twofold instruction to Israelights to remember that as God's chosen people and as His agents, their actions directly reflect Him.

While the word shav' is used many time in the OT, the KJV bible translated them as vain/vanity/false/lies (e.g. Ps 41:6, Prov 30:8). The root of the word vain comes from old french word vein (=worthless), and latin word vanus (=idle, empty), which up to 1690 (first KJV was published about 1611) strictly meant: devoid of real value, idle, unprofitable. Nowadays, the word vain has gained new meanings, notably: excessively proud of or concerned about one's own appearance, qualities, achievements, etc.; conceited; and also ineffectual or unsuccessful; futile.

Let's get over with the word studies, and move on to what the Bible actually says. When God made covenant with Abraham (Gen 17:1-14), God's part of the promise is to multiply Abraham's offspring into nations, kings shall come from his line, the land of Canaan, and He will be their God. While Abraham's (and his offspring) part were to walk blamelessly before God, and a mark on their flesh (circumcision).

Even Abraham, Isaac, and Jacob did not successfully 'walk blamelessly before God' all the days of their life. Abraham lied about Sarah (Gen 20) after the covenant. Gen 26, Isaac actually lied to Abimelech about Rebekah, this after God reaffirmed His intention to keep the covenant. Not to mention Jacob, who tricked his father and took the birthright of Esau over a meal.

How about Israel? Rebellious to the core, they complained to God over a bitter water (Ex 15) right after the 10 plagues of Egypt and Red Sea episode, after they were freed from 4 generations of forced subjugation. They built a golden calf to be worshiped when Moses first took the 10 commandments. The whole book of Judges, tells the history of rebellious nation who kept going astray. Not to mention, the prophets who called upon the nation to repent and return to God again and again.

Likewise in NT, apostle John wrote that it is not possible for us to have no sin (1 John 1:8-10) throughout our life in this world, yet we can and we should strive for holiness (Hebrews 12:14) and also understanding of Christ (Ephesians 4:11-16). Therefore, while we, believer ("Israelites" or "Christians"), live in this world, there is no way for us to be free of sins, but we do have the responsibility to fight against the temptation of sinning (1 Cor 10:13).

The term 'Christian' has become loosely used, whoever believes Christ (as far as saving our souls go), can be called 'Christian'. It was meant to be an insult to the early Church members, who Peter called 'the elect exiles'(1 Peter 1:1). They faced prosecutions in order to be called Christian. But how many 'Christians' today actually believe-in Christ, and dares to sign an empty 'covenant' with Him without ascertaining the gain and risk? Or do we actually neglect to bear the cost of discipleship (Luke 14:25-33) at all?

Yes, we can call ourselves His People, if we actually try to walk blamelessly before God. We can't do it ourselves, lest we become legalistic (with dos and donts). Yet, we can't sit and do nothing, lest we become a liar (1 John 2:4). The point is not so much as to be holy at the point when we profess our faith as a believer, but to strive to be holy throughout our journey in this earth. We are saved, but not yet made perfect. Christian is not sinless, but we are supposed to sin less.

So, if Christ (and what he did, and what he planned for you) actually matters for you will voluntarily love Him and do what pleases Him (e.g. read the Bible everyday, devotionals, basically things that would be a legalistic action if we do it not because we love Him). This is exactly the foundation of the laws, as stated in Matthew 22:36-40 (The Great Commandment). When we love Him with our hearts, our minds, and our souls, why would we ever want to make fun of His Great Name? Why would we ever want to subjugate our live (with many uncertainty) under Someone unless we believe-in Him and we love Him?