Skip to content

Show HN: Recursive Matrix Inversion Algorithm

gist.github.com
1 pointgrondilu1 comment
On HN

Comments

The inverse of a 2x2 matrix (a b;c d) has a fairly simple explicit solution (d -b;-c a)/(ab-bc).

I was wondering if it's possible to have a similar formula for a matrix of dimension 2^n decomposed into a 2x2 block-wise matrix of four 2^(n-1) matrices.

I thought recursion could be desirable if one wants to make matrix inversion parallelizable.

I wrote a short javascript gist and apparently it works (a matrix A.mul(A.inverse) is very close to identity, up to numerical approximation).

Not sure what this is worth, but I thought it was interesting so I wanted to share.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.