Adjoint in weighted coordinates (source code)

= Adjoint in weighted coordinates
{title2=$[T^*]=G_H^{-1}A^*G_K$}

Suppose a <linear map> between finite-dimensional <Hilbert spaces> has <matrix> $A$, and their <inner products> in the chosen <bases> are $\langle x,z\rangle_H=z^*G_Hx$ and $\langle u,v\rangle_K=v^*G_Ku$. The <Gram matrices> $G_H,G_K$ are <positive-definite matrices>. Writing $A^*=\overline A^{\mathrm T}$ for the ordinary <conjugate transpose>, the coordinate <matrix> of the <adjoint operator> is
$$
[T^*]=G_H^{-1}A^*G_K.
$$
Indeed, the defining <inner product> identity says $y^*G_KAx=y^*[T^*]^*G_Hx$ for all $x,y$. Thus simply transposing and conjugating is valid in <orthonormal bases>, where both <Gram matrices> are the <identity matrix>.

For the <weighted inner product> $\langle x,y\rangle_G=\overline{y_1}x_1+4\overline{y_2}x_2$ and the coordinate swap $A=\begin{pmatrix}0&1\\1&0\end{pmatrix}$, the <adjoint operator> has <matrix> $\begin{pmatrix}0&4\\1/4&0\end{pmatrix}$. With $x=(1,0)^{\mathrm T}$ and $y=(0,1)^{\mathrm T}$, both <inner products> equal $4$. The coordinate swap is its own ordinary <transpose>, but is not <self-adjoint> in this <weighted inner product>.