title: Efficient 4x4 matrix inverse (affine transform)
body: <p>I was hoping someone can point out an efficient formula for 4x4 affine matrix transform.  Currently my code uses cofactor expansion and it allocates a temporary array for each cofactor.  It's easy to read, but it's slower than it should be.</p>
  
  <p>Note, this isn't homework and I know how to work it out manually using 4x4 co-factor expansion, it's just a pain and not really an interesting problem for me.  Also I've googled and came up with a few sites that give you the formula already (<a href="http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm" rel="noreferrer">http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm</a>).  However this one could probably be optimized further by pre-computing some of the products.  I'm sure someone came up with the "best" formula for this at one point or another?</p>