Live data from Hacker News

Graphical Linear Algebra

graphicallinearalgebra.net

61–70 of 85 posts

Re: Graphical Linear Algebra

#61
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.

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

That's kind of the point.

> "Perhaps the purpose of categorical algebra is to show that which is trivial is trivially trivial." That is, category theory aids in making the softer bits of mathematics look utterly natural and obvious, so that one can more easily isolate the harder nuggets and attack them with abandon ... This is a tremendous service that category theory provides"

https://mathoverflow.net/questions/28788/nontrivial-theorems...

In isolation applications of category theory to programming are going to be trivial, typically. Category theory gives a language and framework for extracting trivialities so one can "attack the harder nuggets" without distraction.

Re: Graphical Linear Algebra

#62

Earlier quoted context omitted.

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 math…

I'm enjoying it so far. Thanks for taking the time to do this!

Re: Graphical Linear Algebra

#63

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…

> I can easily see a bright, curious person wasting a lot of time before realizing that the content is merely linguistic, not mathematical.

While I rarely find graphical methods useful for performing calculations, I do appreciate visual interpretations of how mathematical concepts work. I personally find that whenever I have to learn a new topic in math, good visualizations help me form an intuition regarding how things fit together, and can often be useful when reasoning about how to attack a problem (back-of-the-envelope sketch before a more rigorous calculation). For actually solving the problem, on paper or in code, I agree that a symbolic approach is superior.

I also think that purely linguistic improvements in math can have a positive effect: a mathematical notation that is easy to learn, understand, and use, will clearly make the math it represents more impactful. I can't find the exact quote at the moment, but I think it was Dirac who said something along the lines that "a good mathematical notation should make correct statements obvious and wrong statements impossible".

Re: Graphical Linear Algebra

#64
post #44
post #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…

Just curious, what country would this be? I know many European countries favor a more theoretical approach. I definitely learned linear algebra from the numerical and matrix perspective (though yes, we did cover the idea of vector spaces and linear transformations too). In engineering school, the focus tended to be on the craft rather than the theory, and in retrospect I think it was the right approach for engineerin…

Germany, but I think it's similar across much of Europe.

The US has a different university structure: the way I understand it, many people don't necessarily choose a major early on or can easily switch it which is why engineers, mathematicians, biologists, etc. often take the same course. Please correct me if I'm wrong.

Over here, this is much rarer. Sometimes computer scientists or physicists take some of the same courses as mathematicians, but hardly engineers. Therefore, we can probably afford to be more theoretical right away (although the computer scientists sometimes complain xD).

I can totally understand that for someone with a focus on application theory is less important, and that some people can get more excited about what you can do with matrices e.g. in computer graphics or machine learning than about abstract morphisms and rigorous proofs.

Incidentally, over here I sometimes feel we learn stuff the other way around: first we hear all the theory, but it's only in the later ODE and numerical methods courses that we actually get substantial practice in calculating more complicated integrals or learn about e.g. QR factorisation or Simpson's rule (although we do prove error bounds by then).

Re: Graphical Linear Algebra

#65

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…

As someone who knows some Category Theory, Algebraic Topology, and a smidgen of Algebraic Geometry, I totally agree. Category Theory is a very useful and essential tool in those subjects. However, to me it reminds me of String Theory, in that it has been sold as Theory of Everything for Mathematics and adjacent fields. Category Theory might even be somewhat useful for language designers, but, I agree that it offers l…

> Even Bartosz said that Adjoints aren't that interesting in Haskell because every functor is an endofunctor.

Every functor (in the standard library) is an endofunctor, but is also a functor to a specific flavor of full subcategory in Hask. It might be useful to support other flavors of subcategory, and I think there's some ongoing work on this in the SubHask module.

Re: Graphical Linear Algebra

#66

As a software developer, I remember basically nothing about Linear Algebra from my time at University :( Besides graphics, what are some applications for linear algebra in software?

I believe you'll find some applications here: https://codingthematrix.com/

Wow, that's exactly what I was asking for :) Thanks!

Re: Graphical Linear Algebra

#67

Earlier quoted context omitted.

As someone who knows some Category Theory, Algebraic Topology, and a smidgen of Algebraic Geometry, I totally agree. Category Theory is a very useful and essential tool in those subjects. However, to me it reminds me of String Theory, in that it has been sold as Theory of Everything for Mathematics and adjacent fields. Category Theory might even be somewhat useful for language designers, but, I agree that it offers l…

> Even Bartosz said that Adjoints aren't that interesting in Haskell because every functor is an endofunctor. Every functor (in the standard library) is an endofunctor, but is also a functor to a specific flavor of full subcategory in Hask. It might be useful to support other flavors of subcategory, and I think there's some ongoing work on this in the SubHask module.

Very cool! I get excited about Category Theory just like the rest.

Re: Graphical Linear Algebra

#68

Earlier quoted context omitted.

You’re not wrong. OTOH the other day I heard someone in the Netflix doc about Alberto Nisman’s murder that described a terrorist network as a “matrix”. I grumped as card-carrying pedants are duty-bound to, but then realized that if there’s a 1:1 correspondence between graphs and (adjacency, incidence) matrices, then there’s very little loss of meaning in referring to graphs as “matrices”. Maybe in some communication…

That's funny, I would have just chalked it up to "they are using a different sense of the word matrix", knowing that most dictionaries contain multiple definitions of the same word. But nice work making this mental leap, I have never thought about it! But it's true, you can envision it as a NxN matrix of N terrorists, where the number in cell i,j represent's the strength of the relationship (it's a weighted graph!),…

Maybe the term Disposition Matrix was more precise and less euphemistic than we were concerned it was. I guess you could compute a kill list from a genuine matrix of dispositions.

https://en.wikipedia.org/wiki/Disposition_Matrix

Re: Graphical Linear Algebra

#69

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…

> 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 interesting but end up just rehashing standard mathematics in opaque ways.

This is, coincidentally, the ambition of APL.

Re: Graphical Linear Algebra

#70

The usual notation for a linear transformation X' = aX + bY Y' = cX + dY minimizes irrelevant information. But the diagram for one seems to bring it to the fore: a diagram is basically a system of fully parenthesized, unsimplified expressions eg X' = (3X + (2(X+4Y) - 6X)) + Y ... In fact, it contains even more information than that, since it also tells you if, in (X+Y)+(X+Y), you are supposed to compute (X+Y) once an…

Depends on what you mean by relevant information. GLA exposes the many compositional natures of linear transformations. The fact that there is a compact matrix representation is a wonderful treat.
Post reply on HN