.. # split from OEMathFunctions.rst:377

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DMatrixInvert

.. oe:function:: OEGeom3DMatrixInvert

   .. oe:language:: c++ java csharp

      .. oe:api::

         template<class T, class U>
         bool OEGeom3DMatrixInvert(T* mi, const U* m)

   .. oe:language:: python

      .. oe:api:: python

         OEGeom3DMatrixInvert(mi: OEDoubleArray, m: OEDoubleArray) -> bool

   Calculates the inverse of the matrix ``m`` and stores the result in
   ``mi``. By definition, multiplying ``m`` times ``mi`` will return
   the identity matrix.

   .. note:: 

      Rotation matrices are `orthogonal
      matrices <http://en.wikipedia.org/wiki/Orthogonal_matrix>`_ that
      can be inverted much more cheaply by using
      :oe:func:`OEMath::OEGeom3DMatrixTranspose` instead.


