add square matrix