adds some important matrix operations