Apply properties of matrix multiplication (#675)