I believe Adrien is right with the reason for BLAS not having an inverse function for square matrices. It depends on the matrix you are using to optimize the calculus of its inverse.
In general you can use the LU decomposition, which is valid for any square matrix. I. e., something like:
gsl_linalg_LU_decomp(A, p, signum);
gsl_linalg_LU_invert(A, p, invA);
where A is the square matrix you want its inverse, p is a gsl_permutation
object (the permutation object where the permutation matrix is encoded), signum is the sign of the permutation and invA is the inverse of A.
Since you state that A = P' G P
being P
normal and G
diagonal, probably A
is a normal matrix. I haven't used them in a while, but there must be a factorization theorem for them, which you can find in the Chapter 14 of the GSL reference manual or even better, in a linear algebra book.
Just an example, if you had symmetric positive definite matrices and wanted to find its inverse, you could use the Cholesky factorization, which is optimized for that kind of matrices. Then you could use gsl_linalg_cholesky_decomp()
and gsl_linalg_cholesky_invert()
functions in the GSL to make it efficient.
I hope it helps!