Why does this graph give me a real part and an imaginary part? I don't understand why I get 2 curves when plotting $e^{ix}$. This is probably very simple for most mathematicians, but I never really learned why. Sometimes when I plot other things I also get a real and imaginary part from Wolfram Alpha, but I never understood why. 

 A: The euler-formula states $$e^{ix}=\cos(x)+i\sin(x)$$ for all $x\in\mathbb R$
$i$ denotes the imaginary unit and $e^{ix}$ is a complex number with real part $\cos(x)$ and imaginary part $\sin(x)$. The graph shows both parts depending on $x$.
A: In this case, it's because the function $e^{ix}$ has both real and imaginary part. It can't be plotted by just one curve, since it takes a one-dimensional input and gives a two-dimensional output. 
A: Since $e^{ix}$ is complex, we can write $e^{ix} = a + bi$ for some choices of $a$ and $b$.  Wolfram Alpha will plot the curve for the real part $a$ and imaginary part $b$ on the same coordinate system.
A: $f(x) = e^{ix} = \cos x + i \sin x$ which is a complex number, $z$.  $z$ can be written as the ordered pair $z =(\cos x, \sin x)$ where the first term is the Re(z) real part of the imaginary number and the second term is Im(z) the imaginary part of the complex number.
$f: \mathbb R \rightarrow \mathbb C$
$f$ takes a single real value $x$ as input and outputs a complex value.  Complex numbers are 2-dimensional and have a purely real component and a purely imaginary component.
A "regular" real valued function $f:\mathbb R \rightarrow \mathbb R$ can be graphed in two dimensions, as a set of $x,y$ coordinates where $x$ is the input mapped to a single $y$ output.  To be whimsical, imagine $y$ is the altitude of a mountain climber and $x$ is the time.  $y = f(x)$: the graph would plot the height of the mountain climber at every point of time.
A complex function $f:\mathbb R \rightarrow \mathbb C$ also takes a single dimensional value $x$ as input and outputs a single $a + bi$ output but now the output is two dimensional.  If $y = f(x)$ was a graph of a mountain climber and her altitude.  Then $a + bi = (a,b) = f(x)$ is a graph of an ant running around on a table-- not only does the ant go up and down, it also goes left and right.  The graph would be a single curve following the time $x$ but sometimes the ant goes up the computer screen, sometimes down, sometimes it goes forward out of the screen toward the reader, and sometimes it recedes backwards behind the screen.  The path of a mountain climber is a string on a page but the path of the ant is a wire twisted up and down, in and out of the page.
So to plot it when Wolfram only have one dimension available to it, Wolfram plots simple the Re(z) component in one color, and Im(z) component in another.  If you wanted to see how this looks in actual 3-D space you can imagine super imposing them.  Imagine the red goes up and down.  But the blue goes forward (off the screen) and back (behind the screen).  The result will be simple a point circling (very literally and perfectly) around the x-axis.
Seriously. That is what the graph of $e^{ix}$ would be.  It's a circle starts and (0,1) and then circles in a regular period around the x-axis as the center of the circle moves along the $x$ axis.
So that's that.....
But, since you didn't ask.... 
Consider a function $f: \mathbb C \rightarrow \mathbb R$ or worse yet $f: \mathbb C \rightarrow C$.  That is $z = f(x,y)$.  Here the input is 2-dimensions that the output is a single dimension.  This is a different story altogether.  In this case the input isn't single variable such as time but a two-component piece of data, such as ... a position on a map with a longitude and latitude.  The output can be single dimension output such as altitude.  This graph will not be a single 1-dimensional wire path but a .... 2-dimensional surface.  Imagine a graph of the mountain altitude of the United States based on longitude and latitude.  The graph would, quiet simply, be a topo representation of the surface of the United States.  Wolram would not be able to represent this in two colors.  Instead Wolfram would (and probably does) represent this as a three-dimensional perspective drawing.
$f: \mathbb C \rightarrow \mathbb C$ for (example $f(x,y)= e^x*e^{iy}$ is ... a real problem.  It simply requires 4-dimensions.  The graph is still a two-dimensional surface but bent in 4 dimensions. 
So what happens in Wolfram if you graph:
$f(x,y) = ||e^{x + iy}||$ 
$f(x,y) = e^{x + iy}$?
