Simple Functions and Matrices