TITLE: Entropy of matrix
QUESTION [13 upvotes]: I am trying to understand entropy. From what I know we can get the entropy of a variable lets say X.
What i dont understand is how to calculate the entropy of a matrix say m*n. I thought if columns are the attributes and rows are object we can sum the entropy of individual columns to get the final entropy(provided attributes are independent). I have couple of question

IS my understanding right in case of independent attributes?
What if the attributes are dependent? what happens to entropy? Is there where conditional entropy comes in?

Thanks

REPLY [7 votes]: You may be interested in the Von Neumann entropy of a matrix, which is defined as the sum of the entropies of the eigenvalues. Ie, for
$$A = P \begin{bmatrix}\lambda_1 \\ & \lambda_2 \\ && \ldots \\ &&& \lambda_n \end{bmatrix} P^{-1}$$
with positive $\lambda_i$, the entropy is,
$$H(A):=-\sum_i \lambda_i \log \lambda_i.$$
For more on the definition of the von Neumann entropy you might look here on wikipedia, and for how to maximize it numerically you could look at my answer on this Computer Science stack exchange thread.
For rectangular matrices, you could extend the definition by replacing the eigenvalues with singular values in the SVD, though it's not clear what this would mean.