The Matrix Cookbook (2012) [pdf]
math.uwaterloo.ca
math.uwaterloo.ca
To clarify - using an actual programming language (any language, I'm not picky) would still be better than inventing an ad-hoc, unverifiable font-based type system every time you publish a new paper. But having a "Notation" section is still vastly better than the usual approach of "guess what I mean".
The notation section is type definitions.
It actually isn't - the notation has lots of ambiguities that don't confuse mathematicians because they are aware of the context.
On Proof and Progress in Mathematics[1][2] is a great essay by a Field's medalist. Part of the essay discusses this very topic, and why mathematicians choose not to use a formal notation for every day work. Some quotes from it:
> The standard of correctness and completeness necessary to get a computer program to work at all is a couple of orders of magnitude higher than the mathematical community’s standard of valid proofs. Nonetheless, large computer programs, even when they have been very carefully written and very carefully tested, always seem to have bugs.
> When one considers how hard it is to write a computer program even approaching the intellectual scope of a good mathematical paper, and how much greater time and effort have to be put into it to make it “almost” formally correct, it is preposterous to claim that mathematics as we practice it is anywhere near formally correct.
[1] https://arxiv.org/abs/math/9404236
[2] I discovered it via HN comments a while ago.
I used to be an advocate for some kind of universal notation, but honestly it is not practical. A useful notation for one paper can be incredibly cumbersome in another paper in the same field. This gets worse if you’re paper is at the border of two fields and their notational conventions are mutually inconsistent. It’s best to just have a notation section that sets forth your convention in the document and stick to it. Ultimately, if you’re reading a paper in an area in which you are knowledgeable and can’t parse the notation quickly, the author failed to write the paper well.
As Whitehead said, “By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race.”
Contrast this with 2 papers I've read recently which independently defined a "function" that returns 1 when its argument is true, and 0 when its argument is false. In both cases, the purpose of this function was to either keep or cancel part of an arithmetic expression by multiplying by either 1 or 0. Each paper defined this function with different notation (one used prefix notation: "Fn(condition)", the other used brackets: "[[condition]]"). Each paper spent several sentences defining the meaning of this notation and the associated function.
Meanwhile in APL, true and false are 1 and 0. If these authors had used APL, they could both have used the same notation, and neither would need to explain beyond saying something like "we use APL notation here". This behavior is not unique to APL - JavaScript, C, Python, and many others have "truthy" values which can be treated as 1 or 0 for the purpose of multiplication.
I don't care if authors use APL (or Python, or Idris, or whatever). I just would prefer that (when possible) they use an existing language which is actually learnable. If it's acceptable to not define your notation (relying instead on tacit conventions and context) why not use an existing language?
wait seriously??
The Matrix Cookbook (2012) [pdf] - https://news.ycombinator.com/item?id=18566449 - Nov 2018 (39 comments)
The Matrix Cookbook (2012) [pdf] - https://news.ycombinator.com/item?id=14726223 - July 2017 (9 comments)
I actually used this Cookbook to look up a matrix derivative that I used in my PhD thesis!
I wish CAS systems were better at linear algebra!
From that you get that the set of Orthogonal matrices(Matrices with determinant 1) end up forming a manifold
I used to always stare at these two PDFs while deriving machine learning algorithms back in the day. (At least my hand rolled code C++ still beats PyTorch's reverse autodiff performance.)
Since this work is about identities, aka representations that can be swapped in for one another, IMO they should have called it the “matrix ingredient substitution guide.”
Presumably this book doesn't carry that risk.
The linked PDF here is a big collection of mathematical identities. I’m sure their specific representation in the PDF is copyrighted somehow, but there’s no real temptation to use the representation here, just the mathematical idea.
bee_rider already referred to https://en.wikipedia.org/wiki/Numerical_Recipes#License so I leave it at that.
> The real problem is the Numerical Recipes license, which is extremely restrictive - probably more so than most users realize. I won't dignify it with a link, but you can find licensing terms on their website. NR routines are copyrighted (fine) and cannot be redistributed as source (annoying but not uncommon for COMMERCIAL software, somewhat unusual for scientific software). There is no exception for noncommercial or scientific use, which is Grinchy and irritating, especially given that two of the authors acknowledge funding from the NSF for work on numerical methods. Beyond that, the single-CPU/single-screen terms of their license are almost impossible for a working scientist to comply with, especially in a networked environment.
Oh yes, this brings back memories. The first edition, I believe, had a fairly permissive license. The second edition had a more restrictive license (it probably wasn't that bad - the authors wanted a payment for use, and I don't think it was a lot).
I was an undergrad doing a summer internship with a professor, and he wanted me to implement the method of steepest descent (or something similar) in Fortran for his computation. He told me to just copy it from the NR book. I dutifully looked at the license and told him we needed to pay to use it. He looked at it and said "Wow, they've gone hard core." Then he handed the book back to me and said "Well, we need an implementation in Fortran. Find a way, and don't come back to me until it's done."
I'm pretty sure that was code for "Do it and don't tell anyone." I instead spent days finding code online that was not restricted. Finally got one that worked.
Later on I spoke to numerical computation researchers and they had a universal disdain for that book. Apparently a lot of the algorithms were outdated - even when the book was published. Better algorithms existed, and they were numerically stable.
Oatmeal: tastes like chicken.
done.
Surely you mean tuna.
a post-apocalyptic recipe book would be really interesting (canned cultivated meat, mycotissues, texturised hydroponic soya and boiled grains, yummm)
That would be "To Serve Man":
https://en.wikipedia.org/wiki/To_Serve_Man
You can view that "Twilight Zone" episode at:
Morpheus : No, Neo. I'm trying to tell you that when you're ready, YOU’LL HAVE AN SPD MATRIX.