# Having trouble finding angles for Bloch vector

I am doing the 5th exercise on https://qiskit.org/textbook/ch-states/representing-qubit-states.html#Quick-Exercise (all the way at the bottom).

Which states find the angle for the vector $$\frac{1}{\sqrt2}\begin{pmatrix}i\\ 1\end{pmatrix}$$. I find that $$\cos\left(\frac{\theta}{2}\right) = \frac{i}{\sqrt{2}} \qquad\text{and}\qquad e^{i\phi} \sin\left(\frac{\theta}{2}\right) = \frac{1}{\sqrt{2}}.$$

I don't know how to find the angles. Or do I just leave it in the form of cosine and sine inverse?

What you're trying to do is find a parametrisation of the state in the form $$\left(\begin{array}{c} \cos\frac{\theta}{2} \\ \sin\frac{\theta}{2}e^{i\phi} \end{array}\right)$$ However, you'll notice that the first element is real, while it isn't in your state, so they cannot be matched. Instead, what is actually going on where is that you require equivalence up to a global phase. Hence, you should write your state as $$i\left(\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{-i}{\sqrt{2}} \end{array}\right).$$ So, now you can try to match up $$\left(\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{-i}{\sqrt{2}} \end{array}\right)=\left(\begin{array}{c} \cos\frac{\theta}{2} \\ \sin\frac{\theta}{2}e^{i\phi} \end{array}\right).$$ From this, you'll see that $$\cos\frac{\theta}{2}=\frac{1}{\sqrt{2}}$$ and hence $$\theta=\pi/2$$. It then follows that $$e^{i\phi}=-i$$ and hence $$\phi=3\pi/2$$.
The complex number $$\frac{1}{\sqrt{2}}+i\frac{1}{\sqrt{2}}$$ shows up in a lot situations. It's a primitive eighth root of unity so it equals $$e^{i \frac{\pi}{4}}$$. Also note that $$i$$ is a primitive fourth root of unity, so it equals $$e^{i \frac{\pi}{2}}$$. So in this case $$\theta = \frac{\pi}{2}$$ and $$\phi = \frac{3 \pi}{2}$$, which gives this state after pulling out a global phase of $$i$$. Global phases do not impact outcome probabilities, so states are considered equivalent if they are equal up to a global phase.
More generally if you suspect an angle is a rational multiple of $$\pi$$, but you aren't sure of the value, you can just enter, for example, acos(1/2^.5)/pi, or equivalently log(1/2^.5+i/2^.5)/pi, into your favorite math software, which in this case will spit out $$0.25$$ for the first and $$0.25i$$ for the second.