Use of matrixes to simplify the multiply lists problems