added square coefficient of matrix method in linalg