Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Efficient simulation through linear algebra (mht.wtf)
138 points by martinhath on Aug 14, 2022 | hide | past | favorite | 6 comments


Ah, the good ol' Sherman–Morrison formula. (https://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formu...) Really useful to know sometimes.

A more general formula is known as the Woodbury matrix identity (https://en.wikipedia.org/wiki/Woodbury_matrix_identity), which comes up quite a lot in numerical algorithms.


I’ve never seen these applied to a problem other than when one wants to increase the dimension of the matrix by one or vice versa… very eye opening. Will look for applications in my own work now.

Also appreciated the derivation of sorts of the formula, starting with the case where the main matrix is the identity.


+1 to the article. Good job.

One suggestion: when experimenting, monitor numerical precision. This is important if matrices are poorly conditioned or if the inverse is updated over many iterations.

Also possibly of interest are Suitesparse and a Python-based guide that uses it [1,2].

[1] https://people.engr.tamu.edu/davis/suitesparse.html

[2] https://cvxopt.org/userguide/spsolvers.html#


Really nice article! I recently had a fun discovery that it’s possible to implement a reasonably efficient GPU sprite renderer using linear algebra with sparse arrays + jit in jax. The quick writeup - https://pwhiddy.github.io/more-writing/2022/07/20/Jax-Sprite...


The fonts used here are nice. What are they?


Poking around with 'inspect element' suggests that it's Gentium for the main body of the text. See https://en.wikipedia.org/wiki/Gentium




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: