# Sum of transpose matrices

I know this may sound like a stupid question but I have some problems proving the following equation:

$$w^Tx^Ty+y^Txw=2y^Txw$$

and the matrices have the following dimensions:

$w \in \mathbb{R}^n,\ x\in\mathbb{R}^{m\times n}$ and $y\in\mathbb{R}^m$.

Any idea how this can be done? Any tip/help would be greatly appreciated!

This is the paragraph I am trying to follow: (can't get the 3rd step)

Paragrap from this source

• this is in general not true. Take $x=w=E\in\mathbb{R}^{2\times 2}$(identity matrix ) and $y=\begin{pmatrix}0&1\\0&0\end{pmatrix}$ – Peter Melech Mar 29 '18 at 8:57
• Then $(w^Tx^Ty)^T=y^Txw=w^Tx^Ty$ since $w^Tx^Ty\in\mathbb{R}$ – Peter Melech Mar 29 '18 at 9:00
• Note that the three terms in your equation are $1\times 1$ matrices and so equal to their transposes. – ancientmathematician Mar 29 '18 at 9:19

Note that $xw\in\mathbb{R}^m$ so $w^Tx^Ty=\langle y,xw\rangle$ is just the usual inner product of the vectors $xw, y\in\mathbb{R}^m$. Analogue we have $y^Txw=\langle xw,y\rangle=\langle y,xw\rangle$ (since we are in $\mathbb{R}^m$ inner product is symmetric) thus $$w^Tx^Ty+y^Txw=\langle y,xw\rangle+\langle y,xw\rangle=2\langle y,xw\rangle=2\langle xw, y\rangle=2y^Txw$$