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 12th 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 16th 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.
26 thoughts on “3. Adding (Part 1) and Mr Fibonacci”
Enjoying this a lot! Could you make references to equations into links?
Thanks for the suggestion, done!
You know, this method reminds me of Matlab… though as a programmer that drag and drop witchcraft tended to confuse me, as in C++ z = 1+1 not 1+1 = z, it took me AGES to get used to. But very well done :D.
And I double posted. Like a noob…
This reminds me of matlab actually, it took me ages to adapt to the notation from good old fashioned C++ where z = 1+1 but 1+1 did not equal z :D.
LikeLiked by 1 person
I find it very strange when people say they’re going to do a ‘graphical’ guide to linear algebra, but then just come up with more elaborate symbols instead of, you know, drawing and visualizing things.
LikeLiked by 1 person
Thanks for your observations!
Actually, I’m not really interested in doing a graphical guide to linear algebra, I want to *redo* linear algebra using a graphical language.
I hope that this will become apparent, I agree that perhaps as of now, all of this is a bit mysterious!
Sounds pretty cool. I’m impatient to see more!
“For example, wires are carrying bits of information to and from your wireless router” – say what?!
But seriously, thank you for this. Please keep it going. 🙂
Well the router does have *some* wires coming out of it, right? 🙂
Nice one!. Could you please correct the term “Arabic numeral system” to ‘Hindu decimal system”?.
Thanks for the suggestion! I changed it to Hindu-Arabic, which seems to be the most common description.
You were right the first time it is the Arabic numeral system that Europeans are using today. Arabs use the Hindu format for their arithmetic’s
My reply is to Strings, but the blog settings wont let me create another sub-sub level, so kindly excuse the illogical order here! So Strings, your argument is circular. How do you expect anyone to ever learn of the Hindu origins of the so-called “Arabic” numerals if they’ve only ever heard them referred to as Arabic? Calling it Hindu-Arabic might still be within the bounds of the acceptable, but deleting the Hindu part of its nomenclature, (ironically citing universal familiarity) is to deliberately perpetuate ignorance. It ain’t a mathematical equation honey, where you trim those dangling bits of wire. It’s politics.
Oh wow. So the blog settings are way off! It actually got my reply to sit nicely below String’s! Got it. Great.
Fun discussion, not sure where it’s going yet. You forgot to carry a one (the second time) to get the 1 in the hundreds column! 🙂
LikeLiked by 1 person
“Please stay with us, because in graphical linear algebra the relationship between ① and ② is extremely important”
Would this not be due to the unspoken convention of reading from left to right,
such that (1) reads as: “Two inputs create one output”
but (2) reads as “One input creates two outputs”?
Right! And, taking this line of thought to it’s conclusion, thinking of the left hand side as input and the right as output is not especially useful. See Episode 20 and further on.
Great series!! Binge reading it atm!!!
I just read your “rant” about causality; as a physicist, I encourage you to rant on, brother, rant on!
Causality and Continuum, the Kind and Queen of maths, are undergoing a revolution and neither may come out with their heads intact!
Also, do you think of graphs and co-graph as representing an external vs. internal symmetry?
I think you made some passing reference to it when you spoke of duality and I was curious on your take.
Thanks!! I’m not sure what you mean by co-graphs; do you mean the ones that intuitively go from right to left?
I will have much more to say about duality in the future, but for now there is some stuff in Episode 24.
On page 294 of Lawvere and Schanuel’s Conceptual Mathematics it states:
“The internal diagrams of particular maps, f, which we frequently use in this book are pictures of the “co-graph” of f, rather than of the graph of f”
“So why is (Comm) correct?”
This section doesn’t really justify (Comm). It winds up saying that it’s true because addition is commutative (which I thought was what we were trying to justify). I was hoping for some kind of proof, though given that addition is treated as a black box in this chapter, I guess that was unlikely. Still, I object to asking “why is X correct” and answering “because X is correct”.
(Comm) is one of the basic equations of the theory, an axiom if you like. Perhaps “correct” was not the right word in this context, by “is it correct?” I meant “does it do what I’ve advertised it does, i.e. talk about the commutativity of addition?”
This perspective of math is great. You should write a book.
Your hosenty is like a beacon
The roman numeral addition example of V + IV = ? isn’t the best option. It’s pretty easy to solve, actually, when presented in that manner!
V+V is X, and (nothing) + I is I, so the result is IX… which is correct!