Add simple matrix functions.