add matrix.c file and add some basic funxtions