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.
eric_kernfeld
- 5.3k
- 1
- 22
- 46