2
$\begingroup$

Let $\left<\;,\;\right>$ be an inner product defined by $\left=$ 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=$ tr$\left(A\overline{B}^{T}\right)=\left(2+i\right)\left(3+2i\right)+1-i=5+6i$
  • $\left=\left(2+i\right)\left(2-i\right)+1+1=7$
  • $\left=\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}{\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.

2 Answers 2

3

This comes down to the matter of finding the angle between vectors $u,v$ in a complex vector space.

Following the law of cosines, we have $$ \|u^2\| + \|v^2\| - 2 \Re \langle u,v \rangle = \|u - v\|^2 \overset{!}{=} \|u\|^2 + \|v\|^2 - 2 \|u\| \|v\| \cos \theta $$ Thus, the correct equation to use here is $$ \|u\| \|v\|\cos \theta = \Re \langle u,v \rangle $$ Where $\Re$ denotes the real part.

0

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})$)