Added dot product to matrix