I have the following equation on entries of matrix $A$: $$ H \, A \, H^T - H^2 \, A \, H^T H^T = 0. $$ All matrices here are $n \times n$ matrices, so there are $n^2$ equations on $n^2$ variables. Is there any conditions (sufficient, necessary) on matrix $H$ for this system to have rank $n^2$? The same question about rank $n^2-1$.
UPD: Sorry, there was a typo in the original question: $n \to n^2$.
This is not an answer to the question, but it seems like a useful hint to me.
I find vectorization useful for this problem. For example, consider the case where the matrix $H$ is invertible. Vectorization leads to the equation $$ \operatorname{vec}(A)=(H\otimes H)\operatorname{vec}(A). $$ That is, $\operatorname{vec}(A)$ is the eigenvector for $H\otimes H$ corresponding to the eigenvalue $1$. By the way, the eigenvalues of $H\otimes H$ are numbers $\lambda_i\lambda_j$, where $\lambda_i$ are the eigenvalues of $H$.
In the general case, the problem is a bit more complicated.