It's very strange to me! When we decompose a complex function to a real part and an immaginary part, we have
$f(z) = u(x,y) + j v(x,y)$
following the conditions of analyticity we can derive the Cauchy-Riemann conditions where
- $u_x$ = $v_y$
- $v_x$ = -$u_y$
I see that my text book says that these components are irrotational while I see that it depends. When I calculate the curl I see:
Curl = 0 + 0 + ($v_x$ - $u_y$) = 2 * $v_x$
I see that if we consider u the second and v the first component it will be irrotational but in the default order the thing that I'd expected to work the curl doesn't appear to be 0. What is my error?
The vector field $\vec f(x,y)$ that corresponds to the complex function $f(z)$ has a sign change on the $y$-component. That is,
$$\vec f(x,y) = u(x,y) \hat x - v(x,y) \hat y$$
The curl and divergence of this vector field are zero as a consequence of the Cauchy-Riemann conditions. In vector fields that are divergenceless and curlless* are fully determined by their values on some bounding surface (or a hypersurface beyond 3d), just as 2d holomorphic functions are fully determined by their values on some closed curve.
*Curl doesn't exist beyond 3d, but there are ways to generalize it, and it's not a crime to call these generalizations "curl" also.
Edit: now why should there be a sign change? Well, you could identify it by inspection, but that's a pretty unsatisfying answer. A better (though more complicated) one is to construct a correspondence between complex functions and vector fields. You can do that if they're both algebraic elements of the same algebra--a "clifford" algebra.
Clifford algebra works with a noncommutative product called the geometric product. A 2d clifford algebra can be built from four basis elements: call them $1, e_1, e_2, e_1 e_2$. Basically, the multiplication works like so: $e_1 e_1 = e_2 e_2 = 1$ (so it captures the dot product), and $e_1 e_2 = -e_2 e_1$ (so for orthogonal vectors, it anticommutes like the cross product), and $e_1 e_1 e_2 = (e_1 e_1) e_2 = e_2$, so it's associative.
Now, how does this all connect to complex numbers? As it turns out, the object $e_1 e_2$ has a special property:
$$(e_1 e_2)^2 = e_1 e_2 e_1 e_2 = -e_1 e_1 e_2 e_2 = -1$$
So algebraically, $e_1 e_2$ behaves exactly like the imaginary unit, $j$! The algebra of linear combinations $a + b e_1 e_2$ for real numbers $a, b$ is exactly the algebra of complex numbers.
But! We have the extra benefit of still having $e_1, e_2$ around as basis vectors. Vectors coexist alongside these complex numbers. Indeed, you can take a position vector $x e_1 + y e_2$ and convert it to a complex number by multiplying on the left by $e_1$:
$$e_1 (x e_1 + y e_2) = x + y e_1 e_2$$
So, this demands the question why we can't do this for vector fields. The answer comes from differentiation, from the use of $\nabla$. Consider a function $f(x,y) = u(x,y) + e_1 e_2 v(x,y)$, like your complex function, and let's take a derivative with $\nabla$:
$$\nabla f = e_1 (\partial_x u - \partial_y v) + e_2 (\partial_y u + \partial_x v)$$
The components are those expressions in the Cauchy-Riemann condition, so if $\nabla f = 0$, then the C-R condition holds.
How can we build up a vector field from $f$, though? We can't do it by multiplying by $e_1$ on the left: $\nabla$ is in the way, and inserting an $e_1$ between $\nabla$ and $f$ isn't something you can just do whenever you like.
But you can multiply by $1 = e_1 e_1$ on the right. This gives us the expression $[\nabla (f e_1)] e_1$. That $f e_1$ evaluates to
$$f e_1 = u e_1 + e_1 e_2 e_1 v = u e_1 - v e_2$$
I have, perhaps, gone a bit too far in trying to give evidence for this mathematical curiosity, but I hope it's piqued your interest.