Finding the cos angle between two matrices using the euclidean inner product

$\begingroup$

I wanted to know if I did this problem right or not.

$A$ and $B$ are the following matrices:

$A=\begin{bmatrix}2&6\\1&-3\end{bmatrix},$

$B=\begin{bmatrix}3&2\\1&0\end{bmatrix}.$

Then

$$\frac{\langle A,B\rangle}{\|A\|\|B\|} =\frac{\left\langle\begin{bmatrix}2&6\\1&-3\end{bmatrix}, \begin{bmatrix}3&2\\1&0\end{bmatrix}\right\rangle}{\sqrt{\left\langle\begin{bmatrix}2&6\\1&-3\end{bmatrix},\begin{bmatrix}2&6\\1&-3\end{bmatrix}\right\rangle}\sqrt{\left\langle\begin{bmatrix}3&2\\1&0\end{bmatrix},\begin{bmatrix}3&2\\1&0\end{bmatrix}\right\rangle}}.$$

I ended up getting:

$\arccos(19/184) = 84.07^\circ$

$\endgroup$ 1

2 Answers

$\begingroup$

$a\cdot b=|a||b|\cos\theta$ so $$\theta=\arccos\Big(\frac{a\cdot b}{|a||b|}\Big).$$ we have $a\cdot b=6+12+1=19, |a||b|=\sqrt{4+36+1+9}\sqrt{9+4+1}=10\sqrt{7}$.
so the angle is $\arccos(19/(10\sqrt{7}))$

$\endgroup$ 0 $\begingroup$

I realize this is old, but there's a mistake in the answer. The process is generally correct, except that the angle calculated depends on the rank of the tensors. For a 1st rank tensor, like a vector, the above product is equal to the first Legendre polynomial, cos(theta). For a second rank, it is equal to the second Legendre polynomial, 0.5(3*cos(theta)^2 -1), and so on.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like