An apparent error exists in the pivotal throne room sequence in Return of the Jedi, but by carefully considering the knowledge and motivation of all players concerned, we can reconcile this error and learn more about the scene. The apparent error occurs in this exchange:
PALPATINE: Your hate has made you powerful. Now, fulfill your destiny. Take your father's place at my side.
LUKE: Never. I'll never turn to the dark side. You've failed, your highness. I am a Jedi, like my father before me.
PALPATINE: So be it, Jedi.
The apparent error occurs when Luke Skywalker address Emperor Palpatine as "your higness." The proper form of address for an Emperor is, "Your Imperial Majesty." Luke used, "Your highness," which is the form of address for, "reigning dukes and members of reigning ducal houses, members of some grand ducal houses, junior members of some royal houses, emirs and sheikhs" (Wikipedia). Why did Luke use the incorrect form of address?
The first possibility is that the creators of Return of the Jedi simply did not know how to address an Emperor. Certainly, few people have occasion to interact with an Emperor. But this is unlikely; Lucas had spent years designing the story of a rebellion against an empire, which is certainly enough time to discover those courtesies on adopts around an emperor. Furthermore, the Emperor was played by Ian McDiarmid, a subject of HRH Elizabeth II. Any well-read subject of Elizabeth would know that the HH style is inappropriate for a sovereign.
The second possibility is that Luke did not know the proper way to address the Emperor. Darth Vader failed to provide any social cues when he addressed Palpatine as, "My master." Luke must have known, or suspected, that Palpatine was Vader's master in the Sith cult, and that only Vader could address Palpatine as such. But Luke would have had any number of other cues instructing him on how to speak to the Emperor. By this point in galactic history, Palpatine had reigned for over twenty years; he would have been the subject of innumerable news broadcasts, documentaries, propaganda pieces, and entertainments. Even on Tatooine and with the Rebel Alliance Luke would have been exposed to at least some of these materials, providing him with an education in Imperial courtesies.
The third possibility is that Luke deliberately used a lower style in order to insult the Emperor, or bring him down a notch. It seems Palpatine suspects this, too; when he calls Luke, "Jedi," his voice is full of mocking derision. But if Luke did use a lesser form of address to insult the sovereign, why did he choose, "Your highness?"
Luke was not intent on simply slinging harsh language at the Emperor; he wanted his barb to have a true point. He chose to delegitimize the Emperor with a lesser style, probably one in accord with the last position held by Palpatine that the Rebel Alliance consideres legitimate. If that position had been President, Luke would have used, "Your Excellency;" had it been Senator, he would've used, "Senator." Why did he instead choose a style of nobility that had no place in galactic governance? The answer must lie further back than Palpatine's galactic career.
We know that Naboo has an elected sovereign; it is possible they create other noblepersons by election or royal fiat. Palpatine may have held a minor title and style on Naboo before being elected a planetary or sectorial representative. When he took up his duties on the offworld parliament, this courtesy title would have been superceded by his new title ("Senator" in the Galactic Senate), which was later superceded by the titles of Supreme Chancellor and Emperor, and the HH style superceded by HE and HIM.
When Luke faces down Palpatine, he denies thoroughly Palpatine's authority.
"You are no Emperor, you're not a legitimate President, and you don't even have the right to sit on the Senate you've disbanded! You are a minor noble from a backwater world with a sinecure office and a courtesy title! And I shall show you that courtesy, and no more!"
Scruffy's gonna die the way he lived.