Basing themselves on the famous statement of R. Yehuda who provided for us three mnemonic phrases for the Ten Plagues: DTza"Ch (for Dam (blood), Tz'fardei'a (frogs), Kinnim (lice)), ADaSh, BACha"B, many of the commentators on both the Torah and the Haggada note that the Makkot (plagues) fall into three repeating patterns of three. R. B'chaye (a student of Rashba), in his commentary to Parshas Bo, notes that before the first of each of the three sets (blood, wild animals, and hail), Moshe Rabbeinu warned Pharaoh that his obstinate refusal to allow the Jewish people to leave Mitzrayim would lead to a catastrophic Makka. This warning's location was at the Nile river (see Sh'mot 7:15, 8:16, 9:13). The second plague of each of the sets of three (frogs, pestilence, and locust, which begins our Parsha) was also preceded by a warning except that this took place in Pharaoh's palace. This is indicated by the statements of Hashem to Moshe "Bo el Par'o" -- "Come to Pharaoh" -- meaning come to his palace (see Sh'mot 7:26, 9:1, 10:1). The third plague of each set (lice, boils, darkness) was not preceded by any warning.
The reason that G-d chose this threefold approach was to demonstrate to Pharaoh the fallacy and folly of his reliance on these two locations. As the Haftora to last week's Parsha, Va'eira, indicates, the Pharaohs of ancient Egypt all claimed to be gods who created not only themselves but the Nile river as well (Ezekiel 29:3). Pharaoh thus staked his claim of divinity and god-like power on the great source of nourishment for Egypt which he maintained that he created. The Nile was therefore a most appropriate location to demonstrate to Pharaoh the utter falsity of his claim and that nothing and no one can prevent the Will of the true Creator of the entire universe, and certainly of Pharaoh and the Nile river, who desired to extract His people from Egypt, from coming to fruition.
However, the Nile was not the only source of Pharaoh's haughtiness. His enormous palace tended to by thousands of servants, where he basked in the glory of the monarchy, where leaders of vassal states offered him presents and homage, where his immense wealth was openly evident, where he felt totally in control, served as the second source for Pharaoh's arrogance. Therefore, the palace was equally suitable as a place of warning for the Makkot. Indeed, even after the warnings that took place at the Nile, we find that Pharaoh immediately enters his palace, which, R. B'chaye posits, he did in order to maintain some sense of power even when presented with imminent disaster.
The third of the plagues in each set was not preceded by any warning. Pharaoh's initial refusals to free his Jewish slaves earned him another plague without any chance for avoiding it.
R. B'chaye, as well as many others commentators, teach that the Makkot had a twofold purpose. One, "l'ma'an shisi ososai eileh b'kirbo" (Bo, 10:1) -- "in order that I place these signs amongst his (Pharaoh's) nation," was directed at Pharaoh and the Egyptian nation. They should become aware of the existence of the one, true G-d. The second purpose was, "u'l'ma'an t'sapeir b'oznei bincha uven bincha eis asher his'alalti b'Mitzrayim" -- "in order that you (the Jewish nation) tell your children and grandchildren that which I wrought in Mitzrayim," that the Jewish people, at the time of their formation as a people, should have a real, absolute, unquestionable experience of the existence, the ominpotence, and the omniscience of the One and Only G-d. This experience was culminated at the Revelation at Har Sinai. This knowledge was then to be faithfully transmitted from father to son, teacher to student and would serve as the bedrock of the faith, based on knowledge and personal experience, of the Jewish nation.
In light of the above, it is not surprising that many powerful lessons about our own lives and thoughts can be gleaned from Pharaoh's sources of arrogance which led to his refusal to submit to the Divine Will. The first was the Nile. Perhaps we can suggest that the Nile also represents Nature in general. Pharaoh, and Man in general, felt that he mastered the Nile, meaning that he mastered Nature. Professor Gerald Schroeder, in his book, The Science of God, quotes that after the "scientists" discovered that the sun, and indeed all stars, produced massive amounts of light and energy through the process of nuclear fusion, the "poets" felt that they did a disservice to humanity. Beforehand, the stars were mysterious, magical, miraculous, even signs of a Creator; now, they were nothing more than nuclear-fusion, energy generators. However, Professor Schroeder indicates that this logic is obviously fallacious. Man's understanding and explanation of Nature and its laws are merely an insight into the great wisdom of Nature's Creator and certainly should not serve as a source for leading Man away from his Creator. As Rav Dovid Hirsch, Shlita, noted in a lecture, "Mother Nature has a Father." And that Father is the Borei Kol Ha'olamos, the Eternal Creator. Man's exploration and amassment of knowledge of the laws of Nature, especially in the last century, are astounding and from the perspective of the previous millennia of scientific endeavor are beyond belief. Space exploration, decoding of genetics, Einstein's theories of Relativity are but a few of the immense insights into G-d's world that have been gleaned by the scientific community. This knowledge often does, as it did in Pharaoh's case, lead to atheism and agnosticism, ultimately caused by arrogance. Many think, either consciously or subconsciously, "we know the world; therefore we are the masters of the world." However, as pointed out above, this could not be further from true. The massive insights into the complexities of the elements of the universe, both human beings and inanimate matter should serve as the greatest boost to belief in the Creator. On the contrary, Adam HaRishon, and Man in general, is commanded "V'Kivshu'a" (B'raishis 1:28) -- conquer the world, study it, know it, master it, utilize its resources. But all for a purpose: to increase our awareness of the Creator and to harness and utilize its laws in His service. Pharaoh's ultimate declaration of "Hashem HaTzaddik v'ani v"ami ha'r'shaim" -- "G-d is the righteous One and I and my nation are wicked" -- speaks to all of us. The wonders of the world, both natural and supernatural, speak of the Creator. "Hashamayim m'sap'rim k'vod Keil" (Psalms 19:2) -- "The heavens declare the glory of G-d." (See, however, _The Lonely Man of Faith, by Rav Yosef Dov Haleivi Soloveitchik zt"l, that this "declaration" is insufficient. It must be coupled with Revelation, the Torah, and its observances, given to the Jewish nation.)
A similar thought can be developed concerning Pharaoh's second source of arrogance, his palace, which can be generalized to mean Man's wealth. This too can, although it should not and need not, distance Man from G-d. (For an exploration of this theme, see "Active Prayer" by this writer, in the archives of TorahWeb.) The gifts of scientific knowledge and wealth granted to G-d's creations, humanity, by Him should only be utilized to draw us nearer to Him.