How to multiply out brackets when they contain vectors Little confused on the rules here, obviously if I treat it as a vector and its transpose I can compute this if I knew each vector entry but I am keen to know the general rule for any vector:
$(\mathbf x - \mathbf y)(\mathbf x - \mathbf y)^T$
How does it relate to $(x-y)(x-y) = x^2 - 2xy + y^2 $
Thanks for your help

To see why removing brackets is a bit different, you can remove them step by step:
$$(\mathbf x - \mathbf y)(\mathbf x - \mathbf y)^T = \mathbf x (\mathbf x - \mathbf y)^T - \mathbf y(\mathbf x - \mathbf y)^T = \mathbf x \mathbf x^T - \mathbf x\mathbf y^T - \mathbf y\mathbf x^T - \mathbf y \mathbf y^T$$
The result cannot be simplified any further, because unlike the scalar case, $\mathbf x\mathbf y^T \neq \mathbf y\mathbf x^T$
