change matrix form