inverting matrices is not fun. I finally wrote the code for inverting a 4x4 matrix and wrote even more comments to explain what the heck is going on https://git.dthompson.us/chickadee.git/tree/chickadee/math/matrix.scm?id=f75b06869606036099a531bb0f54a0e3826b6272#n583
Paolo Redaelli
in reply to dave • • •Most people write Gauss elimination or Cholesky decomposition
https://en.m.wikipedia.org/wiki/Invertible_matrix
@redstarfish
square matrix with non-zero determinant
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)Gilbert Busana
in reply to Paolo Redaelli • • •This may be the first time I see an implementation in 'real' code. Your comments are impressive! Is performance very important here? I'm by no means an expert, but it seems like there are faster algorithms such as those Paolo mentioned. That may cost you more algebra-understanding sweat though. 😅 What kind of matrices do you intend to invert here?
Paolo Redaelli
in reply to Gilbert Busana • • •I plan to reimplement it in #kotlin soon, really soon
@dthompson @redstarfish
Paolo Redaelli
in reply to Paolo Redaelli • • •@dthompson @redstarfish