Solution (source code)

= Solution

The <adjoint operator> $A^\dagger$, when it exists, is defined by
$$
\boxed{\langle Ax,y\rangle=\langle x,A^\dagger y\rangle}
$$
for all vectors in the relevant domains. This convention takes the <inner product> to be conjugate-linear in its first argument. Nondegeneracy makes the adjoint unique.

For the standard complex <inner product> $\langle x,y\rangle=\overline{x}^{\,T}y$, the equality becomes $\overline{x}^{\,T}\overline{A}^{\,T}y=\overline{x}^{\,T}A^\dagger y$ for every $x,y$, so
$$
\boxed{A^\dagger=\overline A^{\,T}.}
$$
Thus the matrix adjoint is the <Hermitian conjugate>, not merely the <transpose> unless the entries are real. In a basis with positive Hermitian <Gram matrix> $G$, the same definition instead gives $A^\dagger_G=G^{-1}\overline A^{\,T}G$, making the dependence on the chosen <inner product> explicit.