Shannon entropy calculation: is $H(A|R·A) = H(A)$? Suppose I generate a random $m&#215;m$ matrix $R$, where each of its elements belongs to $\mathbb Z_n$. I ensure that $R$ is invertible in $\mathbb Z_n^{m&#215;m}$.

Now I take a non-random $m&#215;m$ matrix $A$, where each of its elements belongs to $\mathbb Z_n$ and is not zero. I now multiply them both together to obtain $R&#183;A$ and reduce $R&#183;A$ modulo $n$.

My question is about its Shannon entropy: Is $H(A|R&#183;A) = H(A)\ $?
Well, no, in general, it is not.  Here's a simple example that demonstrates it is not:

Suppose that $m=2$, $n \ge 3$ and the matrix $A$ can take one of the following two values:

$\pmatrix{1&amp;2\cr1&amp;1}$ with probability $1/2$, and $\pmatrix{1&amp;2\cr1&amp;2}$ with probability $1/2$

Note that the first matrix is nonsingular (invertible), while the second is singular.

In this case, $H(A) = 1$

On the other hand, if we are given the value $R \cdot A$, this matrix is nonsingular if $A$ is the first value, and singular if $A$ is the second value.  Hence, the value of $R \cdot A$ allows us to derive the value of $A$ with probability 1, and hence $H(A | R \cdot A) = 0$

If $A$ is constrained to be an invertible matrix, and $R$ can take on all invertible matrices with equal probability, then $H(A | R \cdot A) = H(A)$; this can be deduced from the fact that matrix multiplication is a group operation over invertible matrices.