Live data from Hacker News

Graphical Linear Algebra

graphicallinearalgebra.net

21–30 of 85 posts

Re: Graphical Linear Algebra

#21

The short version appears to be that the author has managed to replace standard linear algebra notation with an alternative (but mathematically equivalent) graphical notation, which is harder to do computations and write programs in. This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, which purport to explain something int…

[deleted]

Re: Graphical Linear Algebra

#22
post #11

Earlier quoted context omitted.

This graphical notation for linear algebra isn't like the usual diagram notation category theory at all. > Is category theory a useful organizational tool in certain abstract branches of mathematics? Yes. Abstracting math in a very general way lets you explore patterns and a result in category theory (e.g. Yoneda lemma) generalizes immediately to other instances of categories. > I also find any claims that category t…

I realize that, obviously, that the diagrams presented in this article are different from the ones found in category theory textbooks. Moreover, my later comments were not really aimed at this article so much as others that are posted here. The criticisms just happen to fit this article, too. Also, I don't really see how learning the abstract definition of a functor is going to help someone write better OCaml program…

> But it is possible I am just not imaginative enough. Do you have a concrete example of this?

Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing

  map f (map g l)
you could write

  map (f . g) l
instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list twice, now it traverses the list once.

I could list other things like how monoids, monads, etc. can help make programs more efficient (monoids allow exponentiation with squaring) or structure programs better (monads allow composition of partial/stateful/exceptional functions).

Re: Graphical Linear Algebra

#23

Earlier quoted context omitted.

> "math-lite" The series is intended for a general audience and starts by laying the groundwork necessary for exposition of this paper: [1]. Article 4 [2] explains why it is introduced this way. > end up just rehashing standard mathematics in opaque ways It's just an explanation of string diagrams [3][4], pretty transparent and standard. I find it funny that your response to this is so similar to that of the abacists…

I don't believe the exposition is written well (judged as either an exposition of linear algebra or just the graphical calculus the article develops). But this is perhaps a subjective point, and others here have already commented on this in detail. More importantly, I would like to remark that string diagrams are not standard. The vast majority of mathematicians have never read the definition of a string diagram (or…

It's interesting to suddenly get all these hits.. I haven't touched the blog in a long time.

I'm sorry that you didn't find it well-written -- it wasn't written with you in mind. Originally I wanted to write about my research in a way that was understandable to a lay person, but I quickly abandoned that and went for the mythical "second year undergrad" level.

You have pretty strong thoughts about what is "useful mathematical work". Are you the high priest and decider of the usefulness of mathematics? To be honest, it almost sounds like some category theorist was super mean to you...

One more thing. Arguments like "niche of a niche" are sociological - just because something is niche doesn't mean it's not important (or, god forbid, fun!). Maths is one of the most conservative fields in this sense; what is and is not considered "standard" is extremely political.

Re: Graphical Linear Algebra

#24

Reminds me of petri nets.

Not entirely a coincidence - see this paper (coauthored by the guy behind the blog in the OP): https://dl.acm.org/doi/10.1145/3290338

And coauthored by you obviously :)

Thanks a bunch, very interesting. I've stumbled upon petri nets as a state machine alternative when looking for graphical modeling tools for functional programming (I'm a designer learning Elixir). Here's a talk: https://www.youtube.com/watch?v=aWnGPaputGE

Re: Graphical Linear Algebra

#25

Earlier quoted context omitted.

> "math-lite" The series is intended for a general audience and starts by laying the groundwork necessary for exposition of this paper: [1]. Article 4 [2] explains why it is introduced this way. > end up just rehashing standard mathematics in opaque ways It's just an explanation of string diagrams [3][4], pretty transparent and standard. I find it funny that your response to this is so similar to that of the abacists…

I don't believe the exposition is written well (judged as either an exposition of linear algebra or just the graphical calculus the article develops). But this is perhaps a subjective point, and others here have already commented on this in detail. More importantly, I would like to remark that string diagrams are not standard. The vast majority of mathematicians have never read the definition of a string diagram (or…

> 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 symptom of this disease is the ever expanding use of increasingly ridiculous buzzwords. Easy and useless never leads to hard and useful. I’d much rather the government invest my tax money in the hard and useless.

[1]. https://graphicallinearalgebra.net/2015/04/30/spoilers-addin...

Re: Graphical Linear Algebra

#26
post #22

Earlier quoted context omitted.

I realize that, obviously, that the diagrams presented in this article are different from the ones found in category theory textbooks. Moreover, my later comments were not really aimed at this article so much as others that are posted here. The criticisms just happen to fit this article, too. Also, I don't really see how learning the abstract definition of a functor is going to help someone write better OCaml program…

> But it is possible I am just not imaginative enough. Do you have a concrete example of this? Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing map f (map g l) you could write map (f . g) l instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list t…

Your example for the application of the "functor" concept is trivial enough that it doesn't need category theory.

Monoids are very simple objects, and you don't need to use category theory to define them.

Monads might be a more meaty example. But I'm not sure if knowing CT makes it easier to use monads in a programming context.

Re: Graphical Linear Algebra

#27

Earlier quoted context omitted.

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. T…

What "success" has this research program had with signal flow graphs? What problems has it helped solved? My impression is that it ends up being largely some kind of linguistic translation project, or abstraction for the sake of abstraction, but I'm happy to be corrected on this point.

We have a way to write traditional SFGs as string diagrams and an isomorphism to behaviours which respects the kind of graphical reasoning used in the blog. So you can show that two SFGs are behaviourally equivalent, or, using some more recent work, that all the behaviours of one are also behaviours of another, i.e. inclusion of sets of behaviours. String diagrams are also more general than SFGs, but can still be mapped to behaviours, so you could have an "unimplementable" string diagram to serve as a specification, and use the axiomatisation of inclusion to show that a particular SFG is a valid implementation of that spec.

As for whether anyone outside the research programme is actually doing that, I don't know. But in principle it's a useful formal methods type theory.

Re: Graphical Linear Algebra

#29
post #26
post #22

Earlier quoted context omitted.

> But it is possible I am just not imaginative enough. Do you have a concrete example of this? Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing map f (map g l) you could write map (f . g) l instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list t…

Your example for the application of the "functor" concept is trivial enough that it doesn't need category theory. Monoids are very simple objects, and you don't need to use category theory to define them. Monads might be a more meaty example. But I'm not sure if knowing CT makes it easier to use monads in a programming context.

They're trivial constructions yes. But the difference is the shift in vocabulary, instead of understanding functor fusion in an ad-hoc way, the concept can be made more precise, also it can lead you to find other "non-trivial" functors for instance the Hom(a,-) covariant functor or the Hom(-,a), but equipped with the right vocabulary these things are easy to express.

Sure, monoids are trivial, because they are, but once you're in the categorical setting you can begin to talk about the category of monoids, monoid homomorphisms and so on.

This isn't to say that CT is the answer, but I'm pointing out that it provides a way to understand more complicated concepts.

Functors are trivial, but if you take their fixpoint you get ADTs. Monoids are trivial, but if you apply them to the category of endofunctor you derive monads, and so on.

Re: Graphical Linear Algebra

#30
Regardless of the usefulness of category theory or not, the author seems to imply that "traditional linear algebra" is about matrices.

This is not true. This may be true from an engineering perspective, or maybe if you've studied in the US, but over here, linear algebra starts with fields, vector spaces, homomorphisms. We establish pretty early on that matrices and linear transformations are in essence the same thing (up to choice of basis), and then we go on to prefer coordinate-free proofs. But, of course, we do discuss the computational aspect (i.e. the Gauss algorithm) because this is exactly what makes linear algebra so useful: many questions can be answered extremely efficiently.

Whether you want to frame things in the language of category theory or not, is up to anyone, but the "standard mathematical treatment" is quite beautiful and intriguing already (if I want to feel inspired, I open up my copy of Halmos's "Finite Dimensional Vector Spaces", not necessarily the best introduction for someone who is new, but very beautifully written for someone who has already seen linear algebra).

Post reply on HN