# Mathematica doesn't evaluate/simplify arithmetic expression in its output [closed]

I have two matrices, A := {{1, 2, -4}, {2, -2, -2}, {-4, -2, 1}} and V := {{-2/3, 1/Sqrt[2], -1/(3 Sqrt[2])}, {-1/3, 0, (2 Sqrt[2])/3}, {2/3, 1/Sqrt[2], 1/(3 Sqrt[2])}}. I was interested in whether Transpose[V].A.V was a diagonal matrix with 6, -3, -3.

However the output I got is the following:

When I saw that, I immediately thought I calculated something wrong on paper, but on closer inspection, most of those numbers are a complicated way of writing 0 or -3! In fact, Simplify[%] gives the expected format, and Transpose[V].A.V == DiagonalMatrix[{6, -3, -3}] is True.

Usually such mere numerical expressions are evaluated/simplified, why weren't they now?

## closed as off-topic by Daniel Lichtblau, LCarvalho, m_goldberg, Alex Trounev, MikeLimaOscarJun 17 at 12:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, LCarvalho, m_goldberg, Alex Trounev, MikeLimaOscar
If this question can be reworded to fit the rules in the help center, please edit the question.

• See a simpler example in the help to Dot. I think that behavior is intended. It does not make great inconvenience for users. – user64494 Jun 11 at 18:52
• A simpler example: Sqrt[2] - 1/Sqrt[2] is returned unmodified, and a simplification gives 1/Sqrt[2]. Only a restricted set of ultrafast simplifications is done automatically: for example, 2+3 is auto-simplified to 5. The system designer (WR) has to draw the line somewhere and leave more complex simplifications to the explicit invocation of Simplify or even FullSimplify. Apparently the line is drawn in a way that does not simplify/merge square roots by default. Maybe as computers get more powerful, the line will shift. – Roman Jun 11 at 20:15
• @Roman post as answer please. I was looking for an explanation/confirmation, I know how to call simplify myself – jcora Jun 12 at 17:39

A simpler example:

Sqrt[2] - 1/Sqrt[2]
(*    -(1/Sqrt[2]) + Sqrt[2]    *)


is returned unmodified, and a simplification gives

Simplify[%]
(*    1/Sqrt[2]    *)


Only a restricted set of ultrafast simplifications is done automatically: for example, 2 + 3 is auto-simplified to 5. The system designer (WR) has to draw the line somewhere and leave more complex simplifications to the explicit invocation of Simplify or even FullSimplify. Apparently the line is drawn in a way that does not simplify/merge square roots by default. Maybe as computers get more powerful, the line will shift.

Transpose[V].A.V // FullSimplify
(*{{6, 0, 0}, {0, -3, 0}, {0, 0, -3}}*)