This is an example of saving a matrix in .txt file.

The two integers in the first row denote the size of the matrix, respectively for amount of rows and columns.