Calculating $\arg(-1+\sqrt 3 \cdot i)$ $$\arg(-1+\sqrt 3 \cdot i)$$


My try:

$$\arg=\arctan\bigg(\frac{\sqrt 3}{-1} \bigg)=-\frac{\pi}{3}$$

But the answer should be $\Large \frac{2 \pi}{3}$
Notice that the point $(-1, \sqrt 3\  i)$ lies in the second quadrant of complex plane hence its argument is given as $$\arg=\pi-\tan^{-1}\left|\frac{\sqrt 3}{-1}\right|$$
$$=\pi-\tan^{-1}(\sqrt 3)$$$$=\pi-\frac{\pi}{3}=\color{red}{\frac{2\pi}{3}}$$


  Edited:
  $$\color{red}{\arg(x+iy)}=\begin{cases} \color{blue}{\tan^{-1}\left|\frac{y}{x}\right|}\ \ \forall\ \  x&gt;0, y&gt;0\ \text{(point (x, y) lies in first quadrant)}\\
 \color{blue}{\pi-\tan^{-1}\left|\frac{y}{x}\right|}\ \ \forall\ \  x&lt;0, y&gt;0\ \text{(point (x, y) lies in second quadrant)}\\
\color{blue}{-\pi+\tan^{-1}\left|\frac{y}{x}\right|}\ \ \forall\ \  x&lt;0, y&lt;0\ \text{(point (x, y) lies in third quadrant)}\\
\color{blue}{-\tan^{-1}\left|\frac{y}{x}\right|}\ \ \forall\ \  x&gt;0, y&lt;0\ \text{(point (x, y) lies in fourth quadrant)}
\end{cases}$$
Your attempt is right the change in answer is because the argument of a complex number is defined as the angle the complex number makes with positive x axis in anticlockwise direction so u should manipulate the answer and find the principle value of arctan of the $\mod(y/x)$  in the question . I hope my answer would be of some help