title: How to invert a 3x3 matrix with each element being a 3x3 matrix?
body: <p>I am trying to implement a Kalman filter for data fusion in C++. As part of the project, I need to implement a function to calculate the inverse of a 3x3 matrix that has each element being a 3x3 matrix itself. Could you help me solve this problem? I would prefer a solution that requires the least amount of calculations (most CPU efficient).</p>
  
  <p>Also another question, since the Kalman filter depends on the inverse matrix, how should I handle the case when the matrix is not invertible?</p>
  
  <p>Thanks for your helps.</p>