This is the second day of my Timeboxed Challenge. On the first day, I summarized the first three episodes in the GraphicalLinearAlgebra blog. I doubt I will cover as many episodes in today’s post. In episode four on Magic Lego, Pawel spent the first 500 words addressing complaints about his writing style. In essence, people want him to be more concise. Shorter. Personally, I enjoyed his digression from time to time. It helps break up the monotony of dense material. Pawel also mentioned about the London Review of Books which he subscribed to. His admiration is clear in his own words here.
The authors, who are usually domain experts, make their subjects extremely clear to a lay audience, but without dumbing them down. They take all the space they need and they respect their readers.
That’s also a sentiment I admire greatly. If I get anywhere near that level of writing, I’ll be hugely pleased. Hence, my publish weekly challenge 2019 as part of the Year of Consistency theme to get better at writing.
They take all the space they need and they respect their readers.That’s also a sentiment I admire greatly. If I get anywhere near that level of writing, I’ll be hugely pleased. Hence, my publish weekly challenge 2019 as part of the Year of Consistency theme to get better at writing.
Episode 4 – Dumbing Down and Magic Lego
This episode is centered around Magic Lego bricks. I assume these Magic Lego bricks are a bridging tool into the Graphical Linear Algebra (GLA) concepts. When I completed this episode, Pawel did not reveal how these Magic Lego bricks are analogous to GLA concepts. I expect Pawel to continue using Magic Lego bricks for some time.
Because this is a summary, I will be more concise than Pawel. Read his post if you prefer the whole treatment. In essence, via Magic Lego bricks, he wants to teach you six concepts.
Concept 1: An Operator Called Direct Sum
Pawel explains direct sum (represented by this symbol ‘⊕’) using this example.
The way I understand this is simply that direct sum ⊕ is about joining bricks in the vertical dimension. And that the order of the arguments matters. In fact, Pawel emphasized the importance of the arguments order as well. He pointed out that direct sum ⊕ is NOT commutative. Unlike the + operation we learn in previous episodes.
In case you are unsure, arguments refer to the values for any operation. Recall 3 + 4 = 7 example in my last post? So arguments for + operation are 3 and 4. Back to our article.
Concept 2: A Second Operator Called Composition
Direct sum is an operator. Pawel then covers a second operator called composition (represented by ‘;’).
In Fig 3 and 4, I see that composition is an operator that acts on the bricks in horizontal dimension. Bear in mind, the use of the phrase “vertical and horizontal” are entirely my own paraphrasing.
Once again, this operator composition is also NOT commutative.
Concept 3: A Magic Lego Brick can be Represented as Holes and Studs
You can represent a Magic Lego brick as a set of two numbers (holes, studs). To remember which number comes first, I recommend remembering it as alphabetical order. Since holes is alphabetically before studs, you get (holes, studs). Fig 5 below shows us how different bricks are represented in this format.
Concept 4: When Compose is Allowed and Forbidden
After explaining the 3 concepts, Pawel introduced the notation for direct sum and composition. I’m not going to follow that order. I prefer the visual examples of the Lego bricks, so I’m going to continue that for a while longer. The next thing to understand is that certain situations, we cannot perform compositions.
In Fig 6, we have a Lego brick that has two studs on the left. On the right, we have four holes. This is not allowed in composition. In deliberately broken english, I will summarize this way. Composition is allowed when left studs equals right holes.
This point is so important. I want to repeat it.
Composition is allowed when left studs equals right holes.
This means we have some weird situations when composition is allowed.
Fig 7 is allowed. We have two studs on the left and two holes on the right. So this composition is allowed. What the outcome looks like has two possibilities.
Both outcomes are the same. This is where the Magic in Magic Lego is referring to.
The Magic-ness is not limited to composition. Which brings us to the next concept.
Concept 5: Direct Sum also has Magic Outcomes
This is also allowed in direct sum. The Magic works in the sense that we can’t tell the difference between plates and bricks.
Concept 6: Representing Direct Sum in Notation
Now, we’re ready to talk notation! Direct Sum is represented in this notation.
Let’s go through this part by part. Notice how this has a top part (above the line) and bottom part (below the line). The top part represents assumptions. The bottom part represents conclusions.
Let’s go through the assumptions first. Reading from left to right, we understand that we have two bricks, X and Y. X has k holes and l studs. Similarly, Y has m holes and n studs. That’s basically it.
So when you read the whole formula, it becomes assumptions such that conclusions. We have :
- X with k holes and l studs and Y with m holes and n studs
- such that
- when X direct sum Y, we get a new brick with (k+m) holes and (l+n) studs
Concept 7: Representing Composition in Notation
If you skip the previous concept, please go back. Else, this is pretty much the same idea. Start with the assumptions and then work your way through the conclusions.
One thing I like to bring your attention to is the fact that the stud in X is the same as the holes in Y. Both are represented by the letter l. This is exactly the concept I covered in Concept 4 earlier. For completeness sake, I will explain the notation from top to bottom again. We have:
- X with k holes and l studs and Y with l holes and m studs
- such that
- when X composition Y, we get a new brick with k holes and m studs
Rounding this off, we learn that:
- There’s an operator called Direct Sum and it’s not commutative.
- A second operator called Composition and it’s also not commutative.
- A Lego Brick is represented by (Holes, Studs).
- Composition is allowed only between X and Y when the studs in X is the same number as the holes in Y.
- There’s no difference between plates and bricks in Magic Lego Bricks combining through Direct Sum or Composition.
- The notation that explains Direct Sum between X and Y bricks producing a new brick whose holes and studs are the sum of the holes and studs of X and Y.
- The notation that explains Composition between X and Y bricks that need X studs to be the same number as Y holes. This will produce a new brick that has the holes of X and the studs of Y.
See you tomorrow!
This is post #8 in my quest for publishing weekly.
As usual, all diagrams that are shown here were taken directly from Pawel’s blog at graphicallinearalgebra.net. All credit goes to him regarding the explanation of the idea. I merely gave my take on his explanation.