Added comments to clarify use and make sure function rejects non-square matrixes