Matrix math.