What am I doing wrong? inner product The general form of an inner product in $\mathbb{C}^n$ is $\langle x,y\rangle=y^{*}Bx$ where B is a Hermitian positive definite matrix.
Then for any square matrix $A$ we have $\langle Av,w\rangle=w^{*}BAv$ and $\langle v,A^{*}w\rangle=(A^{*}w)^{*}Bv=w^{*}ABv$.
Since for any matrix $A$, it is a fact that $\langle Av,w\rangle=\langle v,A^{*}w\rangle$ then we have 
$w^{*}BAv=\langle Av,w\rangle=\langle v,A^{*}w\rangle=w^{*}ABv$.
But that implies $BA=AB$, which is wrong.
What am I doing wrong?
 A: That is because $A^*$ is defined with respect to the standard inner product (that is, when $B=I$). So in your case you do not have $(Ax, y) = (x, A^*y)$.
A: It's an error in your source.
With an inner product $\langle\cdot,\cdot\rangle_B$ given by a (hermitian positive definite) matrix $B$, i.e.
$$\langle v, w\rangle_B = w^\ast\cdot B \cdot v,$$
for any matrix $A$, there is an adjoint matrix $\tilde{A}^B$ such that for all $v, w$ we have
$$\langle Av, w\rangle_B = \langle v, \tilde{A}^B w\rangle_B.$$
Written out,
$$w^\ast B A v = (\tilde{A}^Bw)^\ast B v = w^\ast \left(\tilde{A}^B\right)^\ast B v.$$
For that to hold for all $v,w$, the matrices in the middle must be the same,
$$BA = \left(\tilde{A}^B\right)^\ast B \iff BAB^{-1} = \left(\tilde{A}^B\right)^\ast \iff \tilde{A}^B = (BAB^{-1})^\ast = B^{-1} A^\ast B.$$
The $B$-adjoint matrix is in general not the conjugate transpose.
A: This isn't true; other people have explained the reasoning, you have to take the adjoint relative to $B$. Here's an example:
$$
B = \left(\begin{array}{cc} 2 & 1 \\ 1 & 2 \end{array}\right), A = \left(\begin{array}{cc} 0 & 1 \\ 0 & 0 \end{array}\right)
$$
$B$ is Hermitian positive definite, but
$$
\left<Ax,y\right> = y^*BAx = y^*\left(\begin{array}{cc} 0 & 2 \\ 0 & 1 \end{array}\right)x\\
\left<x,A^*y\right> = y^*ABx = y^*\left(\begin{array}{cc} 1 & 2 \\ 0 & 0 \end{array}\right)x\\
$$
and it's not hard to find $x,y$ so that these aren't equal ($x = y = (1,0)^T$ e.g.). 
