Function to multiply two 7 * 7 matrix
function matrix_product ( a , b ) { var c = Array . from ( Array ( 7 ) , ( ) => Array ( 7 ) . fill ( 0 ) ) ; for ( var i = 0 ; i < 7 ; i ++ ) for ( var j = 0 ; j < 7 ; j ++ ) for ( var k = 0 ; k < 7 ; k ++ ) c [ i ] [ j ] += a [ i ] [ k ] * b [ k ] [ j ] ; return c ; }