Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6538 Discussions

## matrix inverse Novice
524 Views

I have used ?sytrf and ?sytri to do the inverse of a symmetric matrix (a covariance matrix). I realized that the algorithm only uses either the lower or the upper part of the matrix to do the inversion. So the result is only available in either the lower or upper part. To get the full inverse matrix, I need to do additional copy across. It is straightforward, but I wonder if there is a MKL or IPP routine to do that, as performance is really critical in my application.

As a background, I am trying to solve linear equations A*X=B by calculating the matrix inverse A^-1 beforehand. So the X=A^-1*B part only needs to worry about one matrix multiplication every time.

John

1 Solution Novice
440 Views

Thanks for the suggestion. I worked out a solution myself. I used the multiplication of symmetric matrix and vector to do the last step. This avoids the mirroring of the triangular part of the inverse matrix. Then I realized, all the naming convention of MKL routines are classified into , ge, sy, etc. So most of the functions have different versions that support either general matrix of symmetric matrix, etc.

6 Replies Moderator
494 Views

Hi John,

Thanks for reaching out to us,

As you wanted to solve a system of linear equations, you may use ?sytrs routine instead of ?sytri.

You can derive a factorized matrix using ?sytrf and use it in ?sytrs routine to obtain the unknown(X) matrix.

Thanks

Prasanth Moderator
444 Views

Hi John,

We haven't heard back from you.

Let us know if the given solution works for you.

Regards

Prasanth Novice
441 Views

Thanks for the suggestion. I worked out a solution myself. I used the multiplication of symmetric matrix and vector to do the last step. This avoids the mirroring of the triangular part of the inverse matrix. Then I realized, all the naming convention of MKL routines are classified into , ge, sy, etc. So most of the functions have different versions that support either general matrix of symmetric matrix, etc. Moderator
417 Views

Hi John,

Glad you have found the solution.

If you don't have any other queries, let us know if we can close this thread.

Regards

Prasanth Novice
396 Views Moderator
376 Views

Hi John,

Thanks for the confirmation. 