Q:

What is the use of FullForm in Mathematica?

I would like to know where this "FullForm" in Mathematica will be useful. Kindly provide some examples. I just started learning Mathematica. If my question is wrong or not correct. I'm sorry about that.

A:

Perhaps there are other uses, but I've primarily used FullForm to "see" what Mathematica "sees". This can be useful when you are trying to do replacements on something like $\frac{x}{\sqrt{5}}+y^2+1/z$. What Mathematica actually sees is
Plus[Times[Power[5, Rational[-1, 2]], x], Power[y, 2], Power[z, -1]]

You might want to do a replacement such as:
Plus[Times[Power[5, Rational[-1, 2]], x], Power[y, 2], Power[z, -1]]/.Rational[-1, 2] -> 6
(* 15625x + y^2 + 1/z *)

Replacements generally match to the FullForm and in some cases replacements will fail because Mathematica interprets it differently than you do. For example:
x/Sqrt[5] + y^2 + 1/z /. Sqrt[5] -> 6

This fails to give the expected result, because there is no Sqrt in the function by the time you go to run it.
Another place I've used FullForm is for inspecting the code for graphics and plots when they are misbehaving. There's a lot of stuff that happens behind the scenes when generating a plot, and so sometimes it's beneficial to see what the actual result of all that code is. For example, I can see what tick marks were chosen, and I can even replace them with my own tick marks after the fact if I desire. However, I would usually use InputForm for this as I find it slightly more readable.

