Renamed parameter to matrix to match the abstraction.