You can use two dimensions array to act as a matrix, square matrix,
diagonal matrix, lower triangular, symmetric.
Some special square matrix
Diagonal i≠j,M(i,j) = 0 Can use one dimension array to describe
it.
Low triangular i < j,M(i,j) = 0 We can use one dimension array
to implement lower triangular because it will save many spaces.
Index can be calculated by i* (i- 1)∕2 + j - 1. and save it into a
one dimension array.
Symmetric. Just like Low triangular, can be descriped by one
dimenstion array.