# Existence of a matrix satisfying a given constraint.

Can we say that for any ordered pair $$(A,Q)$$ of matrices chosen from the set of all invertible square matrices of the same size, there exists a matrix $$B$$ such that $$BAB=Q$$?

I understand that if only real matrices are allowed, then no such $$B$$ exists when $$\det A$$ and $$\det Q$$ have opposite signs.

I want to know what can be said about the existence of such a matrix $$B$$ when $$A$$ and $$Q$$ are matrices with complex entries.

• A remark about the real case: if $A=I$ and $Q$ is a diagonal matrix with distinct negative entries, then, despite the fact that $\det A,\det Q>0$, there is no such matrix $B$: the eigenvalues of $B$ would have to both be imaginary of different magnitudes, and so there's no way for the trace to be real. Jan 16 at 7:57
• By "not necessarily real matrices", could you clarify whether you mean that they have complex entries, or entries over any field, or ring? Presumably, the answer might differ in each case. Jan 16 at 8:45
• @YiFan, I meant the case when matrices have complex entries. Jan 17 at 0:44

A pair $$(A,Q)$$ has such $$B$$ if and only if $$AQ$$ has square root, since $$(AB)^2 = AQ$$.
Since $$AQ$$ is invertible, we can guarantee that such $$B$$ always exists, as $$B=A^{-1}(AQ)^{1/2}$$. e.g) $A = B^2$ for which matrix $A$?.
• You are correct, since $AQ$ is always invertible. I just updated the answer. Jan 16 at 15:25