in mathematics, a function maps an input value to an output value. in the case of a matrix function, the input and the output values are matrices. one example of a matrix function occurs with the algebraic riccati equation, which is used to solve certain optimal control problems.