added square coefficient of matrix method in linalg

@karlnapf Please have a look.