requesting a vector formula proof

113 Views Asked by At

enter image description here

How can i prove that : $\displaystyle \hat {\mathbf u}=\frac{\mathbf u\cdot \mathbf v}{\mathbf v \cdot \mathbf v}\mathbf v$

u-hat NOT v-hat. v vector is the entire horizontal line. u-hat is a fraction of v vector, u-hat is also a horizontal line.u hat is the projection of u vector on v vector. (Thanks for downvoting and wrongly editing!)

2

There are 2 best solutions below

2
On BEST ANSWER

Let $\theta$ denote the (counterclockwise) angle from $\vec{v}$ to $\vec{u}$. From your diagram, you can see that $\hat{u}$ is a multiple of $\vec{v}$. Note that $\frac{1}{||\vec{v}||}\vec{v}$ is a unit vector with the same direction hence $\vec{v}$ is a scalar multiple of $\frac{1}{||\vec{v}||}\vec{v}$ also. In fact, this scalar multiple is $||\vec{u}||\cos(\theta)$. This follows from basic trigonometry. Therefore, we have: $$\hat{u}=\frac{||\vec{u}||\cos(\theta)}{||\vec{v}||}\vec{v}=\frac{||\vec{v}||}{||\vec{v}||}\frac{||\vec{u}||\cos(\theta)}{||\vec{v}||}\vec{v}=\frac{\vec{u}\cdot\vec{v}}{\vec{v}\cdot\vec{v}}\vec{v}$$

0
On

We begin by treating the vectors as matrices with a single column and use familiar properties of matrix arithmetic to prove this is the case.

First note that $y^Tx$ can be interpreted as a dot product of $x$ and $y$ with $T$ denoting the transpose (assuming the base field is a subfield of $\mathbb{R}$). In particular we know that $x^Tx$ is the dot product of $x$ with itself which is also the length squared. A vector $x$ is a unit vector if and only if $x^Tx=1$.

Now we consider an outer product of the form $xx^T$. I claim this matrix is symmetric and will be a projection matrix onto the subspace generated by $x$. This projection will be orthogonal if and only if $x$ is a unit vector.

To see it's symmetric we calculate $(xx^T)^T=(x^T)^Tx^T=xx^T$ so it is equal to it's own transpose and therefore symmetric. Now given some vector $y$ we note that $(xx^T)y=x(x^Ty)$ and since $x^Ty$ is a dot product, it is a scalar and therefore some scalar multiple of $x$ which is of course in the subspace generated by $x$.

Finally to show that the orthogonal projection only works if $x$ is a unit vector. For clarity we will introduce the matrix $P=xx^T$ and note that $Py$ is the projection of $y$ onto $x$. For this projection to be orthogonal then the vectors $Py$ and $Py-y$ are orthogonal. Taking their dot product and using that $P$ is symmetric we get $$(Py)^T(Py-y)=y^TP^T(Py-y)=y^T=y^T(P^2y-Py)=y^T(P^2-P)y$$ and since $y$ is arbitrary it will be zero if and only if $P^2=P$.

Expanding out $P$ this happens when $(xx^T)(xx^T)=xx^T$ and by moving brackets and using the fact that $x^Tx$ is a scalar we have $x(x^Tx)x^T=xx^T$ and this will be true if and only if $x^Tx=1$ which implies $x$ is a unit vector.

Putting everything together to get the orthogonal projection of some vector $y$ onto the subspace generated by $x$ we normalize by considering $\frac{x}{\sqrt{x^Tx}}$ then create the matrix $P$ by taking $$P =\frac{x}{\sqrt{x^Tx}}(\frac{x}{\sqrt{x^Tx}})^T=\frac{xx^T}{x^Tx}$$ we finally see that $$Py=\frac{x(x^Ty)}{x^Tx}$$ and therefore the desired formula.