Let $\left<\;,\;\right>$ be an inner product defined by $\left<A,B\right>=$ tr$\left(A\overline{B}^{T}\right)$ over $M_n\left(\mathbb{C}\right).$
I am looking for the angle between: $$A=\begin{pmatrix}2+i & 1\\-1&0\end{pmatrix}\quad B=\begin{pmatrix}3-2i & 1+i\\0 & -i\end{pmatrix}$$
First we can see that:$$\overline{A}=\begin{pmatrix}2-i & 1\\-1&0\end{pmatrix}\quad \overline{B}=\begin{pmatrix}3+2i & 1-i\\0 & i\end{pmatrix}$$
$$\Downarrow$$
$$\overline{A}^T=\begin{pmatrix}2-i & -1\\1&0\end{pmatrix}\quad \overline{B}^T=\begin{pmatrix}3+2i & 0\\1-i & i\end{pmatrix}$$
And therefore:
- $\left<A,B\right>=$ tr$\left(A\overline{B}^{T}\right)=\left(2+i\right)\left(3+2i\right)+1-i=5+6i$
- $\left<A,A\right>=\left(2+i\right)\left(2-i\right)+1+1=7$
- $\left<B,B\right>=\left(3-2i\right)\left(3+2i\right)+\left(1+i\right)\left(1-i\right)+1=16$
Now as the angle between any two vectors is defined we get that: $$\cos{\alpha}=\frac{\left<A,B\right>}{\Vert{A}\Vert\Vert{B}\Vert}=\frac{5+6i}{\sqrt{112}}$$
$$\Downarrow$$
$$\alpha = \;?$$
I didn't even know a complex number could be an image for the cosine function.
Thanks for any help.
This answer only talks about cosine as a complex function.
Two equivalent ways to define the cosine function are
$$ \cos(z) = \frac{\exp(iz) + \exp(-iz)}{2} $$ $$ \cos(z) = \sum_{n=0}^{\infty} (-1)^n \frac{z^{2n}}{(2n)!} $$
and both make sense for complex numbers. (and even more general algebras) As a complex function it still satisfies the usual trigonometric identities. Together with the identities
$$ \cos(iz) = \cosh(z) \qquad \qquad \sin(iz) = i \sinh(z) $$
you can use the angle addition formulas to express the values in terms of real functions:
$$ \cos(x+iy) = \cos(x) \cosh(y) - i \sin(x) \sinh(y) $$
The arccosine can be determined by solving the first equation above
$$ \arccos(z) = -i \ln(z \pm \sqrt{z^2 - 1}) $$
Don't forget that it's still a multi-valued function. (also, a useful algebraic fact is $\ln(z + \sqrt{z^2-1}) = - \ln(z - \sqrt{z^2 - 1})$)