2
$\begingroup$

I have two variables $x$, $y$ and calculate the following:

$a = \frac{x}{\sqrt{x^2+y^2}}$, $b = \frac{y}{\sqrt{x^2+y^2}}$

Using $a$ and $b$ is there a way I can derive my original $x$ and $y$?

$\endgroup$
  • 2
    $\begingroup$ No, because they stay the same if you multiply $x$ and $y$ by a constant, ie. replace $x$ by $x*k$ and $y$ by $y*k$. You're missing the constant $k = \sqrt{x^2+y^2}$ , which needs to be known in addition to $a$ and $b$ to recover $x$ and $y$. $\endgroup$ – user3257842 Feb 23 at 18:01
  • $\begingroup$ note that $a = \cos\theta$ and $b=\sin\theta$, but we have no information on $r$, so the best that we can do to identify a point would be $(\tan^{-1}\frac{b}{a}, r)$. Alternatively, $(x,y) = (ar,br)$ $\endgroup$ – John Joy Feb 23 at 22:18
1
$\begingroup$

No. You can't

For $x=1,y=0$ you get $a=1,b=0$ also for $x=2,y=0$ you still get $a=1,b=0$. So given $a,b$ there is no way to determine $x,y$.

Note however that $a/b$ gives you $x/y$ (when defined, otherwise it tells you whether $y$ is zero or not). This is the best you can do as the pairs $(x,y)$ and $(cx,cy)$ will give you the same $a$ and $b$.

$\endgroup$
1
$\begingroup$

This the classical normalization operation :

$$\binom{a}{b} = \frac{1}{\sqrt{x^2+y^2}} \underbrace{\binom{x}{y}}_V=\frac{1}{\|V\|} V$$

transforming a vector into the proportional vector with unit norm ( = length) thus belonging to the unit circle.

It is like a projection onto a straight line (imagine the circle is unrolled). And, like a projection, there exists an infinity of vectors $(x,y)$ that have the same vector $(a,b)$ with unit length as their image. Thus this transformation has no inverse.

For example $\binom{0.6}{0.8}$ is the image of $\binom{3}{4}$, $\binom{6}{8}$, $\binom{9}{12}$,...

$\endgroup$
0
$\begingroup$

By squaring we get $$a^2=\frac{x^2}{x^2+y^2},b^2=\frac{y^2}{x^2+y^2}$$ and we get $$a^2+b^2=\frac{x^2+y^2}{x^2+y^2}=1$$ and you can not compute $x$ or $y$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.