Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is 3x3 Matrix inverse possible using SIMD instructions?

I'm making use of an ARM Cortex-A8 based processor and I have several places where I calculate 3x3 Matrix inverse operations.

As the Cortex-a8 processor has a NEON SIMD processor I'm interested to use this co-processor for 3x3 matrix inverse, I saw several 4x4 implementations (Intel SSE and freevec) but no where did I see a 3x3 matrix inverse operation carried out using SIMD instructions. The method used by freevec is by splitting the 4x4 matrix into 4, 2x2 matrices, then carry out tiny operations on each and recombine the results in the end to get the inverse of 4x4 matrix. I don't see such an opportunity with 3x3 matrices.

Anyone out there has an idea how to carry out 3x3 matrix inversion using SIMD instructions, it will be very helpful to me?

Regards Vikram

like image 326
HaggarTheHorrible Avatar asked Jul 26 '10 10:07

HaggarTheHorrible


People also ask

Can you inverse a 3x3 matrix?

To find the inverse of a 3x3 matrix, first calculate the determinant of the matrix. If the determinant is 0, the matrix has no inverse. Next, transpose the matrix by rewriting the first row as the first column, the middle row as the middle column, and the third row as the third column.

What matrix Cannot be inverted?

If the determinant of the matrix is zero, then it will not have an inverse; the matrix is then said to be singular.

Does every 4x4 matrix have an inverse?

Does a 4x4 matrix have an inverse? Maybe. Just as the number 0 has no multiplicative inverse, some matrices may have also fail to be invertible.


1 Answers

You can expand the 3x3 matrix to 4x4 matrix by adding a 4th row and 4th column, both being (0 0 0 1). After inversion, the upper-left 3x3 submatrix will have the required inverse.

like image 131
zvrba Avatar answered Oct 05 '22 21:10

zvrba