Graphical Linear Algebra

graphicallinearalgebra.net · Personal blog · on HN since 2015

A blog series that teaches linear algebra through string diagrams and category theory, building up from matrices to monoids.

What HN saysCommenters call it a fantastic introduction and recommend starting at the beginning, as a bridge between algebra-style and analysis-style math.
32HN people shared it
24linked it in comments
23stories submitted
1.4Kstory points
5 months agolast shared
2015people per year2026

Most-shared posts

  1. 1
    Graphical linear algebra: from matrices to monoids
    21 people · 1.0K points · first shared 2015 · 82 comments on HN
  2. 2
    String Diagrams for Linear Algebra
    3 people · 189 points · first shared 2015 · 25 comments on HN
  3. 3
    Introducing the Antipode
    2 people · 20 points · first shared 2015 · discussion on HN
  4. 4
    Keep Calm and Divide by Zero
    2 people · 3 points · first shared 2015 · discussion on HN
  5. 5
  6. 6
    About
    2 people · first shared 2020
  7. 7
  8. 8
  9. 9
    Integer matrices with string diagrams
    1 people · 16 points · first shared 2015 · 1 comments on HN
  10. 10
    Graphical Linear Algebra – Bringing it all together
    1 people · 12 points · first shared 2015 · 1 comments on HN
  11. 11
    Causality, Feedback and Relations
    1 people · 10 points · first shared 2015 · discussion on HN
  12. 12
    Functions and relations, diagrammatically
    1 people · 5 points · first shared 2015 · discussion on HN
  13. 13
    The Frobenius equation
    1 people · 3 points · first shared 2015 · discussion on HN
  14. 14
  15. 15
    Maths with Diagrams
    1 people · 2 points · first shared 2015 · discussion on HN

What HN people wrote when they linked it

lachenmayer · 2021-02-03
The Graphical Linear Algebra[0] series is a fantastic introduction to a really fascinating application of category theory, representing vectors & matrices as flow diagrams (ie. monoidal categories) and deriving useful properties from those. The style is super friendly and builds up intuition slowly, while being completely rigorous. For a great example, check out the "Crema di Mascarpone"[1] chapter which introduces all the tools for writing rigorous mathematical proofs using flow diagrams. [0]: https://graphicallinearalgebra.net/ [1]: https://graphicallinearalgebra.net/2015/05/06/crema-di-mascarpone-rule…
lisper · 2015-06-10
Best to start at the beginning and read through: http://graphicallinearalgebra.net
evincarofautumn · 2018-11-14
The language they introduce, Π, is essentially a simple concatenative programming language where all of the primitive combinators happen to be reversible; the graphical depiction is essentially the same as graphical linear algebra¹, which is no coincidence. Concatenative combinator calculus is related to combinatory logic—specifically, it’s a variation that replaces application of combinators with composition, leading to a bunch of nice mathematical properties. Both of these logics have the nice feature that you can syntactically restrict the substructural rules of contraction (dropping), exchange (swapping), and weakening (copying): for example, a well-formed program that doesn’t use the K combinator to drop a value is guaranteed to be linear, i.e., not destroy any information. This isn’t true in ordinary lambda calculus, where you can use a variable zero or many times, so you need additional checks on the uses of a variable to determine whether a function is linear, affine, &c. I like the theory of concatenative programming languages because they provide an elegant compositional/dataflow-oriented style of programming, have deep connections to linear logic, Hughes’ “arrows”, effects & coeffects, and quantum/reversible computation, while also admitting very efficient implementation on classical hardware. I’m (very slowly) working on a statically typed low-level concatenative language that’s meant to provide all the nice high-level typed functional language features like…
derdi · 2026-06-15
If you're interested in actual linear algebra with diagrams, I think https://graphicallinearalgebra.net/ is the thing to look at.
Twey · 2024-04-27
If you feel comfortable with Math A but not Math B you might enjoy _Graphical Linear Algebra_[1], which is specifically that bridge! As someone who is decent at Math B but mostly incompetent at Math A I suspect it comes down to the old analysis vs algebra opposition — being better at thinking about things visually/spatially vs linguistically. Both are trainable though. I think the approach outlined here works well enough. When teaching us about adjunctions, our category theory lecturer used to have us recite the definition of a left adjoint at the start of every lesson, and he'd draw the diagram as we spoke. I can't say I can still recite it by heart but I do feel like I have a decent intuition for adjoint functors. [1]: https://graphicallinearalgebra.net/
mathgenius · 2021-09-30
And here is linear algebra as path counting [1]. This is closely related to path integrals in quantum physics. The rules for combining quantum amplitudes are the rules for combining path counts [2]. This is also how graphical linear algebra works [3]. And since we are all hackers here, if you replace the underlying number system with the min-sum semiring you get things like Dijkstra's algorithm. I really like how all these ideas are related. [1] https://www.youtube.com/watch?v=ei6RfbplYZM [2] https://www.feynmanlectures.caltech.edu/III_03.html [3] https://graphicallinearalgebra.net/
CMCDragonkai · 2019-03-07
There's also graphical linear algebra which takes matrices into a more category theory interpetation that is also visual: https://graphicallinearalgebra.net
ironSkillet · 2019-03-07
If you like this idea, also check out https://graphicallinearalgebra.net. It also describes fundamental linear algebra operations in terms of graphs, but with a slightly different flavor, and much more detail.
myWindoonn · 2018-11-01
But https://graphicallinearalgebra.net/ is available for free and uses easier-to-read graphical syntax. Why prefer this book instead?
darkkindness · 2018-05-07
You might enjoy https://graphicallinearalgebra.net/. The author uses Legos to describe algebras and diagrams to describe symmetric monoidal categories.
grenoire · 2018-04-01
Reminds me of http://graphicallinearalgebra.net which is also super cool.
foota · 2017-09-16
There was a web book I found a while ago that built up some sort of motivation for linear algebra. Unfortunately I don't remember what it was or the title. Edit: found it, https://graphicallinearalgebra.net Ymmv. Matrix multiplication is defined the way it is imo because it has interesting properties that way. Not very satisfying though.
brudgers · 2015-11-25
The "boxed set" of episodes, http://graphicallinearalgebra.net/ will let you catch up if you are interested.
Zhyl · 2020-12-02
I think it's worth linking to the 'Notation as a tool of thought' thread from the other day, as it gave me quite a lot to read, watch and think about [0]. It also reminds me of Graphical Linear Algebra [1] which I occasionally see mentioned here. And, as included in my comment in that thread, the notion of using Tau as the circle constant in equations [2]. Notation is a weird topic to tackle. Like with new technologies or languages on HN, there seem to be those who get [a new notation when it is proposed] and evangelise it, and those who see it as pointless and vocally dismiss it. Posts like the article where you're weighing up and exploring benefits and limitations of notation seem rare - and even those that do exist seem to be pitching for their new notation to be a global replacement rather than as a pedagogical or epistemological tool. [0] https://news.ycombinator.com/item?id=25249563 [1] https://graphicallinearalgebra.net/about/ [2] https://tauday.com
marvinborner · 2025-07-10
It's interesting how some of these diagrams are almost equivalent in the context of encoding computation in interaction nets using symmetric interaction combinators [1]. From the perspective of the lambda calculus for example, the duplication of the addition node in "When Adding met Copying" [2] mirrors exactly the iterative duplication of lambda terms - ie. something like (λx.x x) M! [1]: https://ezb.io/thoughts/interaction_nets/lambda_calculus/2025-04-25_no… [2]: https://graphicallinearalgebra.net/2015/05/12/when-adding-met-copying/
mattkrause · 2025-07-10
Pawel Sobocinski, in collaboration with Filippo Bonchi and Fabio Zanasi https://graphicallinearalgebra.net/about/
galaxyLogic · 2020-08-28
What are LEGOs good for? They are good for explaining Graphical Linear Algebra: https://graphicallinearalgebra.net/2015/04/29/dumbing-down-magic-lego-…
jshholland · 2020-08-18
I kind of agree with you (especially on "math-lite category theory" being upvoted by people who read it and feel smart for understanding it), but I think the point has slightly been missed. The blog is a sort of side project, a popular treatment of the linear algebra stuff coming out of the "real research", which is applying the string diagrams to find graphical, compositional axiomatisations of concurrent systems. The programme has had some success with signal flow graphs (even making it onto the blog: https://graphicallinearalgebra.net/2016/09/07/31-fibonacci-and-sustain… ) and they were starting to look into Petri nets as my study was wrapping up. (source: I was a postgrad supervised by Pawel)
mikhailfranco · 2019-11-14
These methods were invented decades ago by Penrose (1971) [2], as a way of visualizing and improving on Einstein's summation convention [1]. Similar "string diagrams" were popularized for various categories by John Baez in "This Week's Finds" (TWF) [3], with extensive applications to QM by Coecke [4]. There are other modern examples all over the interweb [5] ... [1] https://en.wikipedia.org/wiki/Einstein_notation [2] https://en.wikipedia.org/wiki/Penrose_graphical_notation [3] http://math.ucr.edu/home/baez/week79.html ff [4] https://www.cs.ox.ac.uk/ss2014/programme/Bob.pdf [5] https://graphicallinearalgebra.net/
yenwel · 2018-10-23
Also nice: Erik Meijer Explains it well: https://www.youtube.com/watch?v=JMP6gI5mLHc (check out FP101 on edx) Statebox guys doing stuff with category theory, blockchain and petrinets: https://www.youtube.com/user/wires0 https://statebox.org/ Graphical linear algebra: https://graphicallinearalgebra.net/ Jules Hedges working on game theory : https://julesh.com/
BoiledCabbage · 2018-02-17
Really interesting. As well he seems to re-derive and implementation of Forth. In episode 6, Right under the diagran for Crema di Marscapone he has a formula. Does anyone that uses Forth know if it has that circle-plus operator? It seems to really lend to conciseness - and I hadn't remembered anything like it last time I looked at Forth. https://graphicallinearalgebra.net/2015/05/06/crema-di-mascarpone-rule…
wodenokoto · 2015-11-20
If you're the type of person who read comments first, you might want to access the site via this link: http://graphicallinearalgebra.net/2015/04/23/makelele-and-linear-algeb… It's a text book written as a blog and currently features 24 chapters / posts and for some reason the website really wants you to start at the end, instead of the beginning. The above link is to the introductory post, where they introduce the course as a new way of looking at an under appreciated discipline, that is usually taught in an uninspired and counterintuitive manner, linear algebra. More interesting is that the website is a call for phd students, and they have research position available, both paid and scholarships.
gus_massa · 2015-07-09
I really needed to read the previous article to understand what was going on. It's linked in the first paragraph, but in case you missed it: "Introducing the Antipode" http://graphicallinearalgebra.net/2015/06/30/introducing-the-antipode/
guerrilla · 2020-08-18
> More importantly, I would like to point out that string diagrams are not standard. They're standard in category theory, which is what the series is about. > precisely because it is not standard and not needed for most (any?) useful mathematical work. Uh oh, you better let everyone using it know, especially all those pesky type theorists. > When I read articles by category theory boosters, I get the sense (rightly or wrongly) that they think the world revolves around them and they have stumbled onto some deep and fundamental truths. This is not the case. It's a niche of a niche. I think this says more about you than the series. You seem upset that a category theorist is presenting their work in the language of category theory and that people are interested in it. Nobody mentioned anything about utility, depth, fundamentality or generality. In fact, he refers to some of his work as "hard and useless." [1] > There has been intense political pressure on the academy to stop working on hard and useless things over the last 30 years or so. The result is a new generation of academics who do easy and useful things, things that impact the economy in the 5-10 year scale, and which bring in research funding. This is by design, because research funding is closely tied to academic career progression. Unfortunately, it’s not very hard to disguise easy and useless things as easy and useful. This has resulted in a totally out-of-control epidemic of easy and useless research. A…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close