Let $S$ be the set of all positive semidefinite Hermitian matrices of order $mn$ over $\mathbb{C}$. Any matrix $H$ can be partitioned into blocks $H\_{ij}$ of order $n$ that is $H\_{mn \times mn} = (H\_{ij})\_{m \times m}$.


Is there a function $f: S \rightarrow \mathbb{R}$ which may be defined as follws? 
$$f(H) = \begin{cases} & 0 ~\text{when}~ \{H\_{ij}\} ~\text{forms a family of commutating normal matrices,} \\ & \text{a positive number otherwise.} \end{cases}$$.


Can you give an example? Thank you.



Define a matrix function with a specific property
Why not just take the sum of the norms of the commutators $[H\_{ij}, H\_{kl}]$ and $[H\_{ij}, H^\*\_{ij}]$?


