# HermitianMatrixQ Ignores Assuming, $Assumptions HermitianMatrixQ seems to ignore a variety of ways I tried to help it get the right answer. For example, mat = Sum[a[i] PauliMatrix[i], {i, 0, 3}]; Assuming[{a[_] \[Element] Reals}, HermitianMatrixQ[mat]] (* False*)$Assumptions = {a[_] \[Element] Reals};
HermitianMatrixQ[mat] (* False, even though *)
FullSimplify[mat - mat\[ConjugateTranspose]] (* {{0,0},{0,0}} *)


So, by the last line, we can see that mat really IS hermitian and FullSimplify is powerful enough to demonstrate it. But, HermitianMatrixQ is not, presumably because it's not checking for $Assumptions. The advice in this question is to specify a SameTest. However, as you might imagine, this may not be an easily sustainable choice when the matrix has more symbolic parameters. Questions: 1. Is there a way to get HermitianMatrixQ to pay attention to assumptions of any kind? 2. Is this the intended behavior? Is this a bug? • Since I'm asking if it's a bug, I observed this behavior in $Version=="12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)". – evanb Oct 17 '19 at 17:56
• As a workaround, changing a[_] to Re[a[_]] as Array[Re[a[#]] &, 4, 0].Array[PauliMatrix, 4, 0] // HermitianMatrixQ yields True. – NonDairyNeutrino Oct 17 '19 at 18:52
• A friend points out this related gem: Assuming[{a \[Element] Reals}, Conjugate[a]] yields Conjugate[a]. – evanb Oct 17 '19 at 22:29
• Yes it is intended. No it is not a bug. Documentation for Assuming states it only affects functions that take Assumptions as an option. Those are listed in the Properties & Relations section. – Daniel Lichtblau Oct 17 '19 at 22:41
• So why does HermitianMatrixQ not accept assumptions, rather than the relatively unusual SameTest? – evanb Oct 17 '19 at 22:59