Product of inner products is trace of outer products

328 Views Asked by At

Let's fix vectors $x_1, x_2, y_1, y_2' \in \mathbb{R}^p$. One step in a computation in my lecture notes asserts that:

$$x_1^Tx_2\cdot y_1^Ty_2 = \operatorname{Tr}(x_2y_1^T\cdot y_1x_1^T).$$

It is not clear to me why this is the case. Could someone kindly provide clarification?