being $\mathbf{a}$ and $\mathbf{b}$ two vectors with same length, how do I expand $(\mathbf{a}^T\mathbf{b})^2$?

49 Views Asked by At

Let's say that I have two vectors $\mathbf{a}$ and $\mathbf{b}$. Assuming that they have same length, their product $\mathbf{a}^T\mathbf{b}$ and its square $(\mathbf{a}^T\mathbf{b})^2$ are scalars.

But what if I want to expand it? For example, before taking the derivative with regards to $\mathbf{a}$. What useful expression can $(\mathbf{a}^T\mathbf{b})^2$ be transformed into?

My attempt was writing $\mathbf{a}^T\mathbf{b}\mathbf{a}^T\mathbf{b}$ but then I am stuck.