Ecency
Matrices calculation