Using your favorite algorithm for writing an invertible matrix as a product of elementary matrices, we have
\begin{equation*}
\begin{bmatrix}
1\amp i\\ 1\amp -i
\end{bmatrix}
=\begin{bmatrix}
1\amp 0\\ 1\amp 1
\end{bmatrix}
\begin{bmatrix}
1\amp 0\\ 0\amp -2i
\end{bmatrix}
\begin{bmatrix}
1\amp i \\
0\amp 1
\end{bmatrix}\text{.}
\end{equation*}
Writing this equality as \(A=BCD\text{,}\) we have
\begin{equation*}
g=f_A=f_B\circ f_C\circ f_D\text{,}
\end{equation*}
where
\begin{align*}
f_B(z) \amp =\frac{z}{z+1}=\frac{1}{1+1/z}\\
f_C(z) \amp = \frac{z}{-2i}=\frac{i}{2}z\\
f_D(z) \amp =z+i \text{.}
\end{align*}
We see that \(f_C\) is a dilation and \(f_D\) is a translation. Furthermore we can write \(f_B=p\circ q\circ p\text{,}\) where \(p(z)=1/z\) (inversion), and \(q(w)=w+1\) (translation). Thus
\begin{equation*}
g=p\circ q\circ p\circ f_C\circ f_D
\end{equation*}
is our desired breakdown of \(g\) into dilations, translations, and inversions.
It is possible to answer this question without ever making using of our explicit formula for \(g\text{,}\) using instead only the the fact that \(g\) is biholomorphic, conformal, maps generalized circles to generalized circles, and maps \(0,1,\infty\) to \(-1,0,1\text{,}\) respectively. For the sake of brevity, however, we will “cheat” here and there, and evaluate \(g\) at some other points. For example, it helps us to observe that \(g\) has a pole at \(z_0=-i\) (and thus \(g(-i)=\infty\)).
Let \(\ell\) be the imaginary axis. We know \(g(\ell\cup\{\infty\})\) is a generalized circle containing \(g(0)=-1\text{,}\) \(g(i)=0\) and \(g(\infty)=1\text{.}\) There is no circle containing these three points, so \(g(\ell\cup \{\infty\})\) must be the real axis. Since \(g(\infty)=1\text{,}\) we conclude that \(g(\ell)=\R-\{1\}\text{.}\)
Let’s nail down some names for various open half-planes:
\begin{align*}
N\amp = \{z\in \C\colon \Im z> 0\} \\
S \amp =\{z\in \C \colon \Im z< 0\}\\
E \amp =\{z\in \C\colon \Re z< 0\}\\
W\amp = \{z\in \C\colon \Re z> 0\} \text{.}
\end{align*}
As you can tell, I am thinking in terms of north, south, east, and west. Note that each of these regions is open and connected. Since \(g(\ell)=\R-\{0\}\) and \(g\) is bijective, we have \(g(E)\subseteq N\cup S\text{.}\) Since \(g(E)\) is connected and and since \(N\cap S=\emptyset\text{,}\) we must have \(g(E)\subseteq N\) or \(g(E)\subseteq S\text{.}\) Since \(g(1)=(1-i)/(1+i)=-i\in S\text{,}\) we see that \(g(E)\subseteq S\text{.}\) Applying the inverse \(g^{-1}\) to this inclusion, we see further that \(E\subseteq g^{-1}(S)\text{.}\) Since \(g^{-1}(S)\subseteq W\) or \(g^{-1}(S)\subseteq E\) (using similar reasoning as above), the inclusion \(E\subseteq g^{-1}(S)\) implies \(g^{-1}(S)\subseteq E\text{.}\) We conclude that \(S\subseteq g(E)\) and thus that \(g(E)=S\text{.}\)
Since \(g(0)=-1\text{,}\) \(g(1)=-i\text{,}\) and \(g(\infty)=1\text{,}\) we see that \(g(\R\cup \{\infty\})\) is a generalized circe containing \(-1,-i, 1\text{.}\) The unit circle, \(S^1=\{z\in \C\colon \abs{z}=1\}\) is the only such generalized circle. Thus \(g(\R\cup \{\infty\})=S^1\) and \(g(\R)=S^1-\{1\}\text{.}\)
Continue to denote the upper half-plane as \(N\text{.}\) Since \(g(\R)=S^1-\{1\}\) and \(g(N)\) is connected, we must have \(g(N)\) lying entirely within the unit circle or entirely without it. Since \(g(i)=0\text{,}\) we conclude that \(g(N)\subseteq B_1(0)\text{.}\) Now making use of \(g^{-1}\) we can argue further (similarly as above) that \(g^{-1}(B_1(0))\subseteq N \text{,}\) and hence \(B_1(0)\subseteq g(N)\text{.}\) We conclude that \(g(N)=B_1(0)\text{.}\)
Since the line \(\ell'\) defined as \(\Im z=1\) lies in the upper half-plane, we see that \(g(\ell' \cup \{\infty\})\) must be a generalized circle \(C\) lying within \(g(N)=B_1(0)\cup \{1\}\) and containing \(g(i)=0\) and \(g(\infty)=1\text{.}\) Since \(C\) is bounded, it must be an honest to goodness circle. We could get one more point on \(C\) by computing \(g(1+i)\text{,}\) but instead we argue using conformality. The paths \(\gamma(t)=(t+1)i\) and \(\psi(t)=t+i\) intersect at \(i\) where their tangents form an oriented angle of \(\pi/2\) (from \(\phi\) to \(\gamma\)). Since \(g\) is conformal, the paths \(g\circ \gamma\) and \(g\circ \psi\) intersect at \(g(i)=0\) at an oriented angle of \(\pi/2\text{.}\) Since \(g\circ \gamma\) points tangentially along the real line (from above), and \(g\circ\psi\) points tangentially along the circle \(C\) at the point \(0\text{,}\) we see that the tangent line to \(C\) at \(0\) is vertical! A geometric argument then shows we must have \(C=\{z\in \C\colon \abs{z-1/2}=1/2\}\text{.}\)