I have the absolute value of complex number ,
$$ r = |z| = \sqrt{x^2 + y^2}$$
when $z = x + iy$ is a complex number.
How can I calculate the Argument of $z$?
Thanks.
|
I have the absolute value of complex number , $$ r = |z| = \sqrt{x^2 + y^2}$$ when $z = x + iy$ is a complex number. How can I calculate the Argument of $z$? Thanks. |
|||||
|
|
You should know that any complex number can be represented as a point in the Cartesian ($x$-$y$) plane. That is to say that a complex number $z=a+b\text i$ is associated with some point (say $A$) having co-ordinates $(a,b)$ in the Cartesian plane.
You might have heard this as the Argand Diagram.
However, we can't go about claiming $\theta$ to be $\operatorname {Arg}(z)$ just yet. There is a small detail that we need to keep in mind (Thank you to a user for pointing that out!). We need to watch out for the quadrant on which our complex number lies and work accordingly. Here is a list of conditions for computing the Argument (This has already been mentioned in one of the answers above and I am just re-posting it here). Once you get a intuitive feel for this, it should come to you naturally. Alternatively, you can use the fact that $|z| \sin \theta= b$ (or, $|z| \cos \theta= a$) and then solve for $\theta$. However, you might still have to make last minute amendments (like we did earlier) to come up with the correct answer. So this is not the shorter of the two methods. |
|||||||||
|
|
Note that the "answer" $arctan(y/x)$ is just wrong. To see it check out the example $-1-i$: $\arctan(-1/-1) = 45°$ but correct would be $225°$. And this is not just a problem with the definition of the range of the argument. The correct answer is given by Wikipedia: $\varphi = \arg(z) = \begin{cases} \arctan(\frac{y}{x}) & \mbox{if } x > 0 \\ \arctan(\frac{y}{x}) + \pi & \mbox{if } x < 0 \mbox{ and } y \ge 0\\ \arctan(\frac{y}{x}) - \pi & \mbox{if } x < 0 \mbox{ and } y < 0\\ \frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y > 0\\ -\frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y < 0\\ \mbox{indeterminate } & \mbox{if } x = 0 \mbox{ and } y = 0. \end{cases}$ Because of that many programming languages have the function $\operatorname{atan2}(y,x)$ which gives the above correct argument for $x+iy$. |
|||
|
|
|
First, remember that $\sin(\theta)$ is a quotient: Take any point $(x,y)$ such that the line through $(x,y)$ and the origin makes an angle of $\theta$ with the positive $x$ axis. Then $\sin(\theta) = \frac{y}{\sqrt{x^2 + y^2}}$. In our specific case, $z$ may be thought of as our point (in the complex plane) . Take the $\sin^{-1}$ of this value, and voila, you're almost there. Just make sure you're living in the right quadrant. Through a similar argument, if $z = x + iy$, then $Arg(z) = \tan^{-1}(\frac{b}{a})$, if you are more comfortable with tagent. |
|||
|