matrix.cpp