I want to solve the following equation for the $m\times m$ matrix $X$: $$2X^T(A^TA)=-2\mathrm{trace}(X)I+V,$$ where $I$ is the identity matrix, $A$ is a $t\times m$ known matrix, and $V$ is an $m\times m$ known matrix. Assume that $t$ is less than $m$ so, in this case, $A^TA$ is a singular matrix.
I looked at the question in Solving matrix equation involving trace but it did not help me because of the singularity of $A^TA$.
Also, in the same link, they that said this kind of equations can be solve with vectorization. I searched the internet but could not find anything about this topic: could someone help me with that please?
Thank you.
Define the variables $$\eqalign{ B &= A^TA \cr W &= \tfrac{1}{2}V^T \cr \tau &= {\rm tr}(X) \cr }$$ Divide your equation by $2$ and transpose it $$\eqalign{ BX &= W - \tau I \cr }$$ The general solution of this linear equation can be written in terms of the Moore-Penrose inverse $B^+$ and the nullspace projector applied to an arbitrary matrix $Y$. $$\eqalign{ X_s &= B^+(W-\tau I) + (I-B^+B)Y \cr }$$ Be aware that your equation might not have any solutions.
To see this, multiply each side by the transposed projector. $$\eqalign{ (I-BB^+)(BX) &= (I-BB^+)(W - \tau I) \cr 0 &= (I-BB^+)W - \tau (I-BB^+) \cr (I-BB^+)W &= \tau (I-BB^+) \\ V(I-B^+B) &= (2\tau) (I-B^+B) \cr }$$ A solution only exists when $W$ or $V$, satisfies the projected equation for some $\tau.\,$ So in some sense, the choice of $A$ restricts your choice of $V$; they are not independent of each other.
Another way of looking at it: every column of $(I-B^+B)$ must be a linear combination of the eigenvectors of $V$ associated with a single eigenvalue, $\lambda=2\tau$.
$\tau$ can be calculated by equating the traces. $$\eqalign{ {\rm tr}(X) &= {\rm tr}(X_s) \\ \tau &= B^+:W^T - \tau B^+:I + (I- B^+B)^T:Y \\ \tau\,(1+I:B^+) &= W^T:B^+ + (I-B^+B):Y \\ \tau &= \frac{W^T:B^+ + (I-B^+B):Y}{1+I:B^+} \\ }$$ Substitute this value into the expression for $X_s\\$
NB: In the above, a colon is used as a convenient product notation for the trace, i.e. $$A:B = {\rm tr}(A^TB)$$ Properties of the trace allow terms in a colon product to be rearranged in lots of ways. $$\eqalign{ A:B &= B:A \\ A:B &= A^T:B^T \\ A:BC &= B^TA:C = AC^T:B \\ }$$