The Mathematics of Cornrows

Last semester we had a lot of discussions around the questions: What is a pattern? Why do we care about them? How we analyze them and what is the intersection between patterns found in specific cultures and the people that analyze them?

We wanted to bring our discussions into the practical world.  Sharon and I will be working on a particular pattern this semester: (drum roll) Cornrows, braids, and hairstyle! It is a fascinating subject from many perspectives: Culturally speaking, hairstyles have held significance across space and time, helping people identify themselves as members of a group, or as an individual, making statements, etc. They can also take form as intricate sculptures like those of Joanne Petit-Frere’s work. Mathematically, braids and hairstyles offer us a great way to learn braid theory, knot theory, and even fractal and spherical geometry. We’re inspired by the work of Rob Eglash around culturally relevant math pedagogy and decided to put theory to the test! I have to confess that before starting this project, I knew absolutely nothing about the math, art, culture of braids and hairstyles. So, how do we approach the subject? We don’t know the right way but we believe that we will learn by creating through “serious play”. We invite all readers to send suggestions, comments, and of course to stop by Studio Lab during an open hour to talk to us and see what we are doing! In the meantime, we will be regularly updating this blog with more information.

Mathematically, we will start focusing on the braids themselves, to follow with the repetition of braids, and ending with designs on the scalp/head. With the help of Sophie, our brave mannequin head, a computer, and a comb, Sharon and I will explore these different pieces of what makes a hairstyle theoretically, computationally and practically.

Sophie on the left with no braids. Box braid on right.

In this short blog post, I wanted to start with a note about the box braid (the basis for making cornrows), and a preliminary attempt at a notation that a computer can understand. This may change in the future as we learn more about braid theory, but for now, I think this will be good enough.

We will neglect, for now, the possibility of twisting the hair, or splitting it or merging two strands of hair into one. Notice how each of the movements we make when we’re braiding hair (“the right under the middle, the left over the right…”) can be combined with a next movement, and furthermore how (hopefully!) we can undo the braiding of hair. There is also always the possibility of doing nothing with the strands of hair. All this together forms what in mathematics is called a “group”. In particular, if we have 1 single strand of hair, all we can do is nothing, if we have two strands of hair we can either do nothing, move the right strand over the left one, or vice versa. We can associate “do nothing” with 0, right-over-left with -1, left-over-right with +1. Notice that if we first move the right strand over the left one, and then we move the (now) left strand over the right one we’re left with no braid or “do nothing” (in mathematical terms, one is the inverse of the other), so we can associate any combination of actions to a number negative or positive (+5 for example would be passing the left over the right strand five times). With three strands we have a much more complex realm of possible combinations (which may be why there are no hair braids with two strands?). In fact, it is related to the mathematical field of knot theory (of which there are, of course, world experts in Princeton) and in particular to the “Trefoil knot”.

Let us consider the following “braids” (or actions) and their inverses (and the “do nothing” action):

mathematics of cornrows

Note that any long braid can be written as a combination of these four (question, which one is inverse of which one?). To see this, scan the braid as we proceed through it and write which of these happened. Finally, note that doing the first action, then the second, and then the first again is equivalent to doing the second action, first action, then second. That is true mathematically (draw it if you don’t believe it) but is it true when we’re braiding hair? This is one of the tests we’ll do with Sophie.

We will encode these actions in a way that is generalizable for the computer. We will label each of the positions a strand can be in 1, 2, 3 (from up to down or left to right). Then we will write [1, 2] when strand in one goes above strand in 2 (note: now that strand is 2 and the strand that was 2 is 1 now) and [2, 1] in the other case. These are actions 1 and 3 in the above diagram. The other two actions will be [2, 3] and [3, 2].

Here are the instructions for a box braid that we would give a computer:

Repeat [2, 1], [2, 3] until done.

The french braid, on the other hand, would be:

Repeat [1, 2], [3, 2] until done.

With the properties that we have mentioned above, should these two braids look/be essentially the same? We know that doing [2,1], [3, 2], [2, 1] is the same as doing [3, 2], [2, 1], [3, 2], and we know that doing [1, 2], [2, 1] is the same as doing nothing. But that doesn’t really tell us anything about the braids. Indeed, we can see that they are not the same when we actually do them on real hair.

(Cornrow to the left, french braid to the right)


We chose a notation that is convenient for a computer, but is it convenient for humans? It may be interesting to explore “translators” from human instructions to computer and vice versa. Is labeling strands by numbers and translating the instructions to these numbers erasing a culture? What are your thoughts?

Vocabulary of the day:

COMMUTATIVE- involving the condition that a group of quantities connected by operators gives the same result whatever the order of the quantities involved. In this case what we’ve learned is that the order of operations matter and braiding is NON-COMMUTATIVE.

Bernat Guillén Pegueroles