I am currently reading Leonard Susskind's - "Quantum Mechanics - The Theoretical Minimum". On Page 38 of the book, the writer described representing spin vectors along the $x$- and $y$-axes using the spin up and down state vectors as basis vectors. I followed up to the part when he described the spin state along $x$-axis as:
$$|r\rangle = \frac{1}{\sqrt2}|u\rangle +\frac{1}{\sqrt2}|d\rangle$$ (where the letters $r$, $u$ and $d$ represented spin along right, up and down directions respectively)
A similar representation of the spin vector along negative direction of x-axis was described with opposite signs. But then later the writer described spin vector along y-axis as :
$$|o\rangle = \frac{1}{\sqrt2}|u\rangle +\frac{i}{\sqrt2}|d\rangle$$ (where the letters $o$, $u$ and $d$ represented spin along out, up and down directions respectively).
I failed to understand the reason for using $i$ in the numerator of second component of the spin vector, even though the conditions used to derive it were similar to the one used for deriving spin vector along x-axis. It would be great if someone could explain it.