# Inverse of a 3D matrix

**URL:** <https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481>\
**Category:** Newbie\
**Created:** [September 6, 2022, 7:52pm UTC](https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481 "2022-09-06T19:52:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dil](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dil/32/26887_2.png) [@Dil](https://root-forum.cern.ch/u/Dil)\
**Post date:** [September 6, 2022, 7:52pm UTC](https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481/1 "2022-09-06T19:52:37Z")

</div>

Hello,

I need to take the inverse of a 3D matrix,  
Could someone help me with an example code for that?

Thanks  
Dil

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [September 7, 2022, 9:10am UTC](https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481/2 "2022-09-07T09:10:45Z")

</div>

Hi,  
What do you mean with a 3D matrix ? A tensor with 3 dimensions ?  
I am not sure about the algebra defining such operations, like multiplications and inversions on these tensors.  
In ROOT we support just simple tensor operations/manipulations, in the [RTensor](https://root.cern.ch/doc/master/classTMVA_1_1Experimental_1_1RTensor.html) class,  
but we don’t have support for more complex operation such as tensor-tensor products (as for matrix) and inversions.  
Maybe some dedicated software packages exist for this

Lorenzo
