0
$\begingroup$

i usually come across this equation and I am not able to understand it entirely, here X, W and Y are matrices of size N*D, D*1, and N*1 resp. $(Y-XW)^T(Y-XW)$.


As per me it should be equal to $Y^TY-Y^TXW-W^TX^TY+W^TX^TXW$ but actually it comes out to be $Y^TY-2W^TX^TY+W^TX^TXW$. I simply could not find any explanation for this.

$\endgroup$

1 Answer 1

5
$\begingroup$

The reason this works is because $W^TX^TY$ is a $1 \times 1$ matrix. It is symmetric, and it appears either (once transposed and once as-is) or (twice as-is).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.