Probably one of your first experiences with maths was *adding*. The very first experience was probably learning to count: 1, 2, 3, and so on. Graphical linear algebra has interesting things to say about counting, but that story will have to wait for another time.

Learning about adding coincides with learning about mathematical formulas such as

3 + 4 = 7 ①

Three plus four equals seven. If you have three apples and I give you four more apples, how many apples do you have?

Let’s talk a bit about the formula ①. You’ve seen equations like this so many times that you are totally comfortable with it and have internalised all of the concepts. You don’t even remember **not understanding it**, right? Even the people who hate maths learn this stuff before they learn to hate it.

But appearances deceive, and ① is actually quite subtle. Before we go any further, let’s talk about the symbols involved. First, ‘+’ is an *operation*. The left hand side of equation ①, the stuff to the left of the symbol ‘=’, can be understood as a *procedure*, a computation. It’s the processing that you did with your fingers when the teacher was talking about apples.

The symbol ‘+’ is the name of the procedure, and it takes two *arguments:* here the numbers 3 and 4. The first argument is 3, the second argument is 4. The right hand side of ①, 7, is the *result* of the computation. So we can understand the symbol ‘=’ as saying to us “the result of the the computation on the left of me is the thing on the right of me”.

But then maybe the teacher wrote

7 = 3+4 ②

and confused you: in ② the computation is on the right and the result is on the left! You probably went on to become a professor of Computer Science. You like to keep your inputs on the left and your outputs on the right. Please stay with us, because in graphical linear algebra the relationship between ① and ② is extremely important and we will spend **a lot** of time discussing it. Technically speaking, this is because ‘=’ defines a relation, and relations will be vital for us.

For now, let’s forget about the advanced topic of ②. We will first concentrate on trying to get our heads around ①. Actually, there are several ways to understand ①. In graphical linear algebra we will understand it in two ways. In this episode, we are going to talk about the first of those two ways.

As you already know, in this blog we try to avoid writing equations like ① and ②. Equations are so last century and now it’s high time for our first diagram. We will draw ‘+’ as a white circle. The two arguments come in from the left, the first through the top arrow, the second through the bottom. The result then comes out on the right. Because the word “arrow” is boring, generic and overused, we will call the lines “wires”. The word “wire” is quite evocative: data travels on wires all around us. For example, wires are carrying bits of information to and from your wireless router as you read this.

Go ahead and imagine numbers moving on the wires, going in the directions indicated by the arrow-heads. When a 3 arrives on the first argument wire, and a 4 arrives on the second argument wire, a 7 will exit on the result wire. Similarly, if 43 arrives on the first argument wire and 57 arrives on the second argument wire, 100 will exit on the result wire. Easy enough, right?

Mathematicians don’t usually talk about the symbols they use. Part of the “fun” of being a mathematics undergraduate is learning a foreign language that no one actually bothers to teach you explicitly. You’re supposed to just assimilate it, as if it were something as natural as the concepts it describes.

To be fair, mathematicians have had hundreds of years to find efficient ways to write about the concepts they love. I mean, as much as we diss formulas in this blog, let’s admit that 43 + 57 = 100 is fairly short and concise. It wasn’t always like this. We have some nice, efficient, ways of doing the actual calculation too: remember you draw the second argument below the first, carefully so that the digits line up from right to left, then you draw a line below, etc. You know the procedure; just don’t forget to carry the 1. It wasn’t always like this. Thank Fibonacci. When people hear this name, they usually think of the Fibonacci number sequence 0, 1, 1, 2, 3, 5, 8, …. Don’t worry if you’ve never heard of it: we will eventually explain this famous stream of numbers using graphical linear algebra. For now, I want to try to convince you that this sequence was not Fibonacci’s greatest contribution to civilisation.

Some context: Fibonacci came from a wealthy trading family of the 12^{th} century medieval merchant republic of Pisa. Pisa was one of the world’s richest cities back then — if you’ve ever visited Piazza dei Miracoli in Pisa then you’ve seen the splendour first hand. Back then, much of the rest of Europe consisted of wooden shacks.

When Fibonacci was a boy he travelled with his dad to trading posts in North Africa, where he played with the kids of local merchants and learned about the Hindu-Arabic positional number system that we still use today. Europeans, back then, used Roman numerals: I, II, III, IV, V, and so on. As an exercise, let’s try to use the clever technique that we know for adding, but using Roman numerals. It doesn’t work.

Romans were great at so many things, but their number system sucked. I’m sure that even Cicero, a great Roman patriot, would agree given the evidence.

Anyway, Fibonacci realised how great the Hindu-Arabic number system was and wrote a book about it, the Liber Abaci. To Fibonacci, the superiority of a positional number system was obvious: calculation was so much easier, more efficient, less prone to error. It is also obvious to us **now**, of course.

In Fibonacci’s day, he did manage to convince some people, who became known as the *algorists*. The conservatives, those who preferred to stick with the status quo, were called *abacists*. They used the abacus, and converted to and from the Roman number system between calculations. The conservatives won the day: it took a long, long time before Fibonacci’s convictions became more widespread. In fact, the conversion from Roman to Arabic only finished towards the end of the 16^{th} century, 400 (!) years after the publication of Liber Abaci.

I’m sure that Fibonacci would have had problems with the Pathways to Impact document. Although “Pathways to Impact” sounds like a Hollywood disaster movie, it is actually a document that all UK scientists have to include with their grant applications. You have to write on two A4 pages how your research will impact society and academia, but mainly how it will impact the economy.

For fun, let’s suppose that Fibonacci had access to a time capsule and saw how his ideas would transform the Western world. Let’s suppose even that his grant application made it to the interview round, held in a beautiful palazzo on the Piazza dei Cavalieri.

“Mr Fibonacci, we asked you very clearly to provide us an Impact Statement about how your so-called ‘Arabic numerals’ will impact the Pisan economy in the 5-10 year period. All of our greatest merchants use the abacus. I don’t see how this technology will bring them any competitive advantage. In fact, all of this ‘positional number system’ nonsense sounds a bit abstract and useless to us. I mean, you expect us to wait 400 years to make a profit on this? Are you insane?”

The wise heads of the Research Council of the Republic of Pisa (RCRP) then nodded politely as Mr Fibonacci tried to explain, but after a short panel discussion they ended up investing tax-payers’ money in advanced abacus technology instead. Fair enough, they were right. The glorious Pisan republic ended in early 15th century, when Pisa fell under Florentine domination. Obviously the key stakeholders of RCRP couldn’t be expected to wait 400 years to see their investment bear fruit.

Seriously though, the Republic of Pisa actually treated Fibonacci very well. With such poor economic decisions, no wonder that they eventually lost out to Florence.

Our graphical notation can be a little bit more concise: the diagrams we have been drawing so far have some redundant information that we can throw away safely, without losing anything important. It is usually good to throw away redundant things. And it makes sense to do this now, because we will be drawing a lot of diagrams.

Remember, the numbers travel on wires from left to right. So the arrowheads are redundant. Also, we will not write the + symbol inside the circle from now on. Whenever you see a white circle in a diagram on this blog, it will always mean adding. Actually, by throwing away the arrowheads I’m also doing something a little bit underhanded here. I’m preparing us for the second way of understanding the addition operation, that will help us to solve the mystery of passing between ① and ②. Throwing away arrowheads seems to be in the air at the moment, many people are doing it. We will discuss all of that in more detail in a later episode.

It’s time for our first equation. You may remember an interesting thing about adding. If I try to calculate 3 + 4 and I don’t make any mistakes, I will get the same result as when I calculate 4 + 3. In fact, if I use x and y as *variables*, to stand for any two numbers, then a mathematician might write:

∀ x,y. x + y = y + x ③

The upside down A means “for all”. So ③ simply says that it is the case that for **all possible** choices of assigning numbers to x and y, say x = 42 and y = 24, or x = 43 and y = 57, or x = 3 and y = 4, we know that the calculations x + y and y + x will have the same result. This property is known as* commutativity* of addition.

Here’s how we can express the same thing as ③ with diagrams. “Comm” is short for “commutativity”. Before I explain any further, I want you to imagine a white square of paper. Imagine the square to be exactly the right size so that when I cover either of the two diagrams in (Comm), I get two pictures that both look the same: something like an electric plug. In particular, notice that the parts that are still uncovered are parts where the two diagrams agree — both the diagrams in (Comm) have their *dangling wires *in the same places. Dangling wires are wires in which one of the two ends is not connected to anything. In both of the (Comm) diagrams two wires are dangling on the left, and one wire is dangling on the right.

This brings me to an **important principle of graphical linear algebra**: whenever we write an equation between two diagrams, the number of dangling wires on the left and on the right will be the same. By the way, there will never be any dangling wires on the top or on the bottom. Maybe there will be no dangling wires at all, but if there are some, they must dangle from the left, from the right, or from both left and right.

So why is (Comm) correct? Let’s see what happens when we provide some arguments. We could try to feed in some numbers to convince ourselves, but maybe we’d get lucky and convince ourselves of something that is false. Like, for example, it happens to be the case that 2 + 2 = 2 × 2 but it’s not the case that for all possible choices of x and y we have x + y = x × y. Right? Letting x = 3 and y = 5, 3 + 5 = 8 but 3 × 5 = 15. So let’s use variables instead. We’ve already seen that. For the right hand side of (Comm), notice that the value of the first dangling wire on the left is actually connected as the second argument to addition. So we get. But we know that addition is special and it satisfies the commutativity property. So even if we “can’t see inside” the two diagrams any more, for example if we cover them up with a big white square so that they both look like we know that their **behaviour** is the same. The anonymous white box, in each of the two cases, simply adds the two arguments provided on the left and spits out the result on the right.

Look again at ③ and look at (Comm). Which one do you prefer? If you say ③ then that’s cool. I will give you many more reasons to love (Comm). For now, the reasons are mainly aesthetic. For example, we don’t need to introduce any upside down letters in (Comm), nor learn how to use them in practice.

If you are confused, don’t worry. I still need to explain a bit more about what diagrams are exactly, and how we construct them. What kind of things we can and can’t do with them. The rules of the game. You already know one, the one about having the same number of dangling wires in equations. The rules of the game are the subject of the next episode. If you’ve ever played with Lego, it should be smooth sailing.

Continue reading with Episode 4: Dumbing Down and Magic Lego.