where $S$ is the hemisphere. Remember that if we choose the orientation of the surface such that, if the normal, $\mb{n}$ is pointing upwards, then the curve $C$ must be oriented counter-clockwise. That is, if we choose \[ \mb{n} = \frac{[x,y,z]}{\sqrt{x^2 + y^2 + z^2}}, \]
for the normal (the denominator is unity on the surface of the sphere). Then the curve $C$ is defined with \[ \gamma(\theta) = [\cos\theta, \sin\theta, 0]. \]
We first compute the line integral. This gives \begin{align*} \oint_C \mb{A} \cdot \de{\mb{r}} &= \int_0^{2\pi} \mb{A}(\gamma(\theta)) \cdot \gamma'(\theta) \, \de{\theta} \\ &= \int_0^{2\pi} [\sin\theta, -\cos\theta, 0] \cdot [-\sin\theta, \cos\theta, 0] \, \de{\theta} \\ &= \int_0^{2\pi} (-1) \, \de{\theta} -2\pi. \end{align*}
Now we compute the right hand side of Stokes' Theorem. Remember that this integral is performed via \[ \int_S \nabla \times \mb{F} \cdot \de{\mb{S}} = \int_S \nabla \times \mb{F} \cdot \mb{n} \, \de{S}, \]
where $\mb{n}$ is the oriented unit normal of the surface. In this case, the curl is \[ \nabla \times \mb{F} = [0, 0, -2]. \]
We wish to perform the integration in spherical coordinates. We introduce \[ x = \cos\theta\sin\phi, \quad y = \sin\theta\sin\phi, \quad z = \cos\phi, \]
on the surface of the sphere, with $0 \leq \theta \leq 2\pi$ and $0 \leq \phi \leq \pi/2$. Then the integration element transforms using the Jacobian \[ J = r^2 \sin\phi = \sin\phi \]
so on the surface of the sphere, $r = 1$, we have \[ \de{S} = \sin\phi \, \de{\theta} \de{\phi}, \]
and the integral becomes \begin{align*} \int_S \nabla \times \mb{F} \cdot \de{\mb{S}} &= \int_0^{\pi/2} \int_0^{2\pi} [0, 0, -2] \cdot \frac{[x, y, z]}{r} \, \sin\phi \, \de{\theta} \de{\phi} \\ &= \int_0^{\pi/2} \int_0^{2\pi} (-2\cos\phi) \sin\phi \, \de{\theta} \de{\phi} \\ &= \int_0^{\pi/2} \int_0^{2\pi} -\sin(2\phi) \, \de{\theta} \de{\phi} \\ &= -2\pi \end{align*}
which verifies Stokes' Theorem.