I am learning 1-D projection, project a 2-D vector $x ∈ R^2$ onto a 1-D subspace U with basis $b, \quad where \quad b \in R$.
this lecture gives this formula
$\displaystyle \frac{\mathbf{b}\mathbf{b}^T}{\|\mathbf{b}\|^2} x \tag 1$
while this lecture gives this formula
$\displaystyle \frac{x^T \mathbf{b}}{\|\mathbf{b}\|^2} \mathbf{b} \tag 2$
are the 2 formulas same? how to prove that?
They are the same since ${\bf b}^Tx=x^T{\bf b}$ (dot product is commutative). Note that ${\bf b}$ is also in $\mathbb R^2$