Mathematical matrices and GIS