In general :To determine invertible elements in $\mathbb Z[\sqrt n]$ where $n$ free of square::
Let be $u=a+b\sqrt n $ an invertible element in $\mathbb Z[\sqrt n]$, then exists $v=c+d\sqrt n \in \mathbb Z[\sqrt n] $ where $uv=1$ , then $N(uv)=N(u)N(v)=1\Rightarrow N(u)=1$. we have three cases:
$1)$ $n=-1 \Rightarrow N(u)=a^2+b^2=1\Rightarrow a=\pm 1, b=0$ or $a=0, b=\pm 1$, then $u=\pm 1$ or $u=\pm i$
$2)$ $n<-1 \Rightarrow N(u)=a^2-nb^2=1 \Rightarrow a=\pm 1, b=0$ ,then $u=\pm 1$
$3)$ $n>0 \Rightarrow N(u)=a^2-nb^2=1$ has infinitely many of solutions , then invertible element is $\{-1,+1 \}$ and infinite many of elements.
for example for case $(3)$ in $\mathbb Z[\sqrt3]$ we have $u=2-\sqrt3$ is invertible element because $(2-\sqrt3)(2+\sqrt3)=1$
Hint: if $n<0$ ,then $\mathbb Z[\sqrt n]$ is PID if and only if $n=-1$ or $n=-2$