Consider the equation: $$ C \equiv HMH^{-1} \pmod{p}, $$ where $C,M, H$ are, say, $2\times 2$ matrices, and $p$ is an odd prime. The elements of the matrices $C, M$ are integers. The elements of the matrix $H$ are the unknowns (call them $h_{11}, h_{12}, h_{21}, h_{22}$). I am trying to solve this system for the unknowns $h_{11}, h_{12}, h_{21}, h_{22}$.
Here is my approach:
$$ C \equiv HMH^{-1} \pmod{p} $$ implies that $$CH = HM.$$ This will result in four linear equations in $h_{11}, h_{12}, h_{21}, h_{22}$. That is, we have
$$W \> h \equiv 0 \pmod{p},$$ where ${h} = transpose(h_{11}, h_{12}, h_{21}, h_{22}). $ Now for the system to have non-trvial solution the matrix $W$ must be singular in $Z_p$ (i.e. $\det(W) \equiv 0 \pmod{p}$). This also would imply that the system $$W \> { h} \equiv 0 \pmod{p},$$ has at least one free variable, and hence, this system has at least $p-1$ non-trivial solutions.
Is the argument above correct? Any help with this will be highly appreciated. Thanks in advance!