title: Computing the inverse of a matrix using lapack in C
body: <p>I would like to be able to compute the inverse of a general <code>NxN</code> matrix in C/C++ using lapack.</p>
  
  <p>My understanding is that the way to do an inversion  in lapack is by using the <code>dgetri</code> function, however, I can't figure out what all of its arguments are supposed to be. </p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>void dgetri_(int* N, double* A, int* lda, int* IPIV, double* WORK, int* lwork, int* INFO);
  
  int main(){
  
      double M [9] = {
          1,2,3,
          4,5,6,
          7,8,9
      };
  
      return 0;
  }
  </code></pre>
  
  <p>How would you complete it to obtain the inverse of the <code>3x3</code> matrix M using dgetri_?</p>