add some tools method for Matrix