Function to perform the calcul from inverse's matrix
by cache's using