# Find distance and angle between 2 matrices

$Let \ A, B ∈ M_2(Q) \ and\ let ⟨A, B⟩ = tr(A^T B) \ be\ an\ inner\ product \ on M_2 (Q).$
i.Find the distance between $A=\begin{bmatrix}1 & 2\\1 & 0\end{bmatrix}$ and B= $\begin{bmatrix}3 & 3\\1 & 2\end{bmatrix}$ in this inner product space.

ii. Find the angle between them.

From the definition, i found the inner product, 10, but i don't know how to find the angle and distance for matrices. I know how to compute for vector spaces but i have no idea how to apply it for matrices.

1. $$\|A-B\|^2=\langle A-B, A-B\rangle$$
2. $$\langle A, B \rangle=\|A\|\|B\| \cos \theta$$
• $\|A\|^2 = \langle A, A \rangle$ Aug 10 '17 at 17:33
Hint: $||A||^2 = tr (A^T A)=\langle A, A\rangle$, and $\langle A,B \rangle=||A|| ||B|| \cos(\theta)$, where $\theta$ is the angle between $A$ and $B$.