Initially this was a library implementing an MxN sized Matrix object for the KL language, and all the basic Matrix operations (*,+, inverse, transpose).
Since the native implementation of the Mat class in KL this code extends that data structure with helper functions.