Implement equal() and transpose().