Matrix Library

Started work on the matrix library.