I'm not getting the expected output when I use Collect with indexed variables.
mA = Array[a[##] &, {2, 2}]
Collect[CharacteristicPolynomial[mA, t], t]
produces
{{a[1, 1], a[1, 2]}, {a[2, 1], a[2, 2]}}
t^2 - a[1, 2] a[2, 1] + t (-a[1, 1] - a[2, 2]) + a[1, 1] a[2, 2]
Note that although I've tried to collect terms in t, constant terms have not been collected.
Explanation?
Mma has a standard order when it collects powers. This order is not being honored. It is also standard for Mma to collect terms in t^0 (since I am collecting in t in this example). This also is not being honored. I realize the coefficients in this example are not symbols. My question is simple: why should this matter when I am collecting in t?
Contrast with this second example, which does give the expected output:
mA = {{a11, a12}, {a21, a22}}
Collect[CharacteristicPolynomial[mA, t], t]
produces
{{a11, a12}, {a21, a22}}
-a12 a21 + a11 a22 + (-a11 - a22) t + t^2
Note the standard ordering in the variable t in the second example.

Collect[CharacteristicPolynomial[mA, t], t, h]– Dr. belisarius Oct 23 '15 at 16:48a[i_, j_]as variables because they are not atoms. So standard ordering of variables does not apply. – m_goldberg Oct 23 '15 at 22:53t. So why does that matter? (Clearly it does, but I'm missing something.) – Alan Oct 23 '15 at 22:55t. What you are complaining about is how t-free terms are ordered. All I can say is thata[1, 2]looks very different thana12to Mathematica. UseFullFormto examine the results of your to examples of collecting terms to see how different the internal forms are. – m_goldberg Oct 23 '15 at 23:21t? – Alan Oct 24 '15 at 17:36-a[1, 2] a[2, 1] + a[1, 1] a[2, 2] + t (-a[1, 1] - a[2, 2]) + t^2will give you the scrambled-looking output you have. Consider this:SetAttributes[f, Orderless]; f @@ {-a[1, 2] a[2, 1], a[1, 1] a[2, 2], t (-a[1, 1] - a[2, 2]), t^2}. – J. M.'s missing motivation Oct 24 '15 at 17:55cp = CharacteristicPolynomial[mA, t] Collect[cp - (cp /. t -> 0), {t, t^2}] + (Evaluate[(cp /. t -> 0)] // HoldForm). Have fun! – Alexei Boulbitch Oct 24 '15 at 18:04