Converted matrix.c to a library.
Converted matrix.c to a library.