There are 2 equations of 1-D projection, are they the same?

48 Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

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$

0
On

As Andrei already said, the dot product is commutative (1): $$\mathbf{b}^T \mathbf{x} = \mathbf{x}^T \mathbf{b}$$ Furthermore the dot product yields a scalar, and we can write a scalar after a vector or in front of it (2): $$c \cdot\mathbf{x} = \mathbf{x}\cdot c$$

Putting these two identities together, we can write the two formulas as follows: $$\mathbf{bb}^T\mathbf{x} = \mathbf{b}\left( \mathbf{b}^T\mathbf{x} \right) = \mathbf{b}\left( \mathbf{x}^T\mathbf{b} \right) = \left( \mathbf{x}^T\mathbf{b}\right)\mathbf{b} = \mathbf{x}^T\mathbf{bb}$$ Thus, both formulas are equal.

Please note that one can not directly evaluate $\mathbf{bb}$ as this expression is not defined.