4 ms·
Efficient simulation through linear algebra
- cyber_kinetist 4y agoAh, the good ol' Sherman–Morrison formula. (https://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_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 https://en.wikipedia.org/wiki/Woodbury_matrix_identity), which comes up quite a lot in numerical algorithms.
- onos 4y agoI’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.
- tehsauce 4y agoReally 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-Particles.html https://pwhiddy.github.io/more-writing/2022/07/20/Jax-Sprite...
- jethkl 4y ago+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 https://people.engr.tamu.edu/davis/suitesparse.html [2] https://cvxopt.org/userguide/spsolvers.html# https://cvxopt.org/userguide/spsolvers.html#
- pmarreck 4y agoThe fonts used here are nice. What are they?
- eru 4y agoPoking around with 'inspect element' suggests that it's Gentium for the main body of the text. See https://en.wikipedia.org/wiki/Gentium https://en.wikipedia.org/wiki/Gentium