The following is a careful translation from the Ari; it is, however, a difficult selection. For an introduction to the topic and extended commentary by our translator, please see part one of this presentation.
Do not cut off the hair on the sides of your head. Do not shave off the edges of your beard. (Lev. 19:27)
When performing a commandment, a person should do so to fulfill the will of his Creator, Who commanded him. For example, when a man's hair is cut, he should bring to mind that he will not allow the hair of the sides of his head to be shaved, nor the hair of his beard.
The mystical explanation is the following: There are the three types of hair of the head - those associated with Arich Anpin, Zeir Anpin and Nukva. However, the hairs of Arich Anpin are of a quality of complete mercy and are all channels of lights that allow the lights to descend below; it is not appropriate to cut them. Therefore, the nazirite whose hair signifies Atik [associated with Arich Anpin] does not cut his hair at all, as has been explained regarding the commandment of the nazirite. However, in Zeir Anpin it is fitting to cut of the hair of one's head, particularly someone whose soul is rooted in the root soul of Cain. The beard hairs are channels of divine spiritual abundance…
It is proper for a man to intend, when getting his hair cut, that he is a reflection of Zeir Anpin, and that he is removing all the judgments from himself by means of the razor [in Hebrew, "ta'ar"], which has the numerical value of the divine name Ado-nai. This numerical equivalency is achieved when each letter of this divine name Ado-nai is spelled out in full, and the total numerical value of each letter is added up. Ado-nai transforms the judgment; therefore, it has the numerical value of "razor" ["ta'ar"] to remove the judgments…
"Ta'ar" is spelled: tav (400), ayin (70), reish (200), with a total numerical value of 670 plus 1 for the entirety of the word, equaling 671.
"Ado-nai" spelled-out is : alef (1), lamed (30), pei (80), dalet (4), lamed (30), tav (400), nun (50), vav (6), nun (50), yud (10) vav (6), dalet (4), with a total numerical value of 671
However, you already know that the head [of a person] incorporates allusions to the ten sefirot, and that its allusion to malchut constitutes the secret of the Sides of the Head. Thus, "side" [in Hebrew, "pe'ah"] has the numerical value of the divine name Elokim, and "pe'ah" is always in malchut.
"Pe'ah" is spelled pei (80), alef (1), hei (5), with a numerical value of 86.
"Elokim" is spelled alef (1), lamed (30), hei (5), yud (10), mem (40), also with a numerical value of 86.
However, there is no sustained existence to the world except through the judgments, and it is not fitting to remove them completely. To that end, we need to retain only the dimension of malchut [i.e. pe'ah], but this applies only to the head of Zeir Anpin [man]. However, Nukva [woman] does not shave her head. The reason is that since she corresponds to Nukva, and since all the judgments are in Asiya [related to Nukva], were she to remove the judgments from the head of Nukva, there would not remain any judgments in the world. Accordingly, a woman needs to keep her hair and does not shave her head.
My master was extremely careful not to get a haircut after midday, that is after the time arrives for praying the Large Mincha. Even on the eve of the Shabbat [i.e. Friday afternoon], he was cautious.
It is fitting that a man not uproot any hair from his beard at all, for the beard hairs are channels of divine spiritual abundance. He should intend that the top of the beard is the First Tikun.
The divine name "E-l", in the secret of the Thirteen Attributes of Mercy, and the hair of the beard on the left and right is twice the numeric value of the Hebrew word for "beard" ["zakan"], which is also the numerical value of the divine name "Sha-dai".
"Zakan" is spelled zayin (7), kuf (100), nun (50), and when doubled has a numerical value of 314.
"Sha-dai" is spelled shin (300), dalet (4), yud (10), also with a total numerical value of 314.
Together the beard as a whole is "E-l Sha-dai". For this reason a man should be mindful at all times not to grasp his beard so that he does not uproot any hair from it.
[Adapted by Zechariah Goldman from Taamei Hamitzvot, Kedoshim]