Matrix Equation $QA+A^TQ=-I$ Here is question:
for $A=\begin{pmatrix}-3&-2\\1&0\end{pmatrix}$, find 2×2 symmetrical matrix $Q$ such that $QA+A^TQ=-I$, using diagonalization of $A$.
Simply thinking, If I set all entries of Q as variables, and solving linear equations, then I can find Q. But how can I utilize the diagonalization of A to solving this problem? Eigenvalues of A are -1,-2, and corresponding ordered basis that consists of eigenvectors of A is {(1,-1),(-2,1)}.

Let $v:=(1, -1) ^T$ and $w:=(-2, 1) ^T$. Then
$$QAv + A^TQv = -Qv+A^TQv = (-I+A^T)Qv= -v $$
and
$$QAw + A^TQw= -2Qw+A^TQw = (-2I+A^T)Qw= -w. $$ Since $A^T$ has the eigenvalues -1 and -2, the matrices $(-I+A^T) $ and $(-2I+A^T)$ are invertible. Hence,
$$Qv=(-I+A^T)^{-1}v$$ and $$Qw=(-2I+A^T)^{-1}w.$$
There is a formula, that you can invert $2\times 2$ matrices really fast. Further observe $Qe_1=-Q(v+w) $ and $Qe_2=-Q(2v+w) $.
