Solve $x$ in $y$ with the following equation $$-y+x^Tyx=0$$ where $x,y \in \mathbb{R}^n$. It could be verfied that the solution is $x=\frac{y}{||y||}$, could someone help explain how to achieve such a solution.
How to solve x in y for both are vectors?
309 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
We have $$ -y + x^\top y x = 0 \iff \\ y = (x \cdot y) \, x \quad (*) $$ If $y = 0$ then all $x \in \mathbb{R}^n$ are solutions. If $y \ne 0$ then $x \ne 0$ and we can scalar product multiply both sides of equation $(*)$ by $y$ and get $$ y \cdot y = \lVert y \rVert_2^2 = (x \cdot y)^2 \Rightarrow \lVert y \rVert_2 = \lvert x \cdot y \rvert $$ where $\lVert . \rVert_2$ is the Euclidean norm and thus $$ \DeclareMathOperator{sgn}{sgn} \frac{1}{\lVert y \rVert_2} y = \frac{x\cdot y}{\lvert x \cdot y \rvert} x = \sgn(x\cdot y) \, x \Rightarrow \\ x = \pm \frac{1}{\lVert y \rVert_2} y = \pm e_y $$ where $e_y$ is the unit vector in $y$-direction. So depending on $y$ we have either two or infinite many solutions $x$.
If $y$ is the zero vector then this equation holds for all $x$ and we're done, so now let's only consider the case where $y$ is nonzero. We have $$(x^\top y) x = y$$ Notice that $x^\top y$ is a scalar. So $x$ must be a scalar multiple of $y$ for this equation to have any chance of holding. Which? Set $x = \lambda y$; then the equation says $$(\lambda y^\top y) \lambda y = y$$ Which means that $$\lambda^2 (y^\top y) = 1$$ so $$\lambda = \frac{1}{\sqrt{\big(y^\top y\big)}} = \frac{1}{||y||}$$