rediagonalizing