Complex Math

Depends on where you put your brackets.

2i^2 will normally be handled as 2*(i^2), which means 2i^2 = -2.
If you meant to write (2i)^2 then yes, that'd be -4.

Graph the real part of [math]i^x[/math]. What does it look like?

It's not so much useful as a necessity, as practically all wave functions are complex. When doing classical physics, you can mostly ignore the complex part of a wave (although you should be aware of its existence) but that's not possible anymore when you go smaller.

like a wave?

It's
[math] \cos( \frac{ x \pi }[2} )[/math]

Exactly.

Wavefunctions have phase to them which is very nicely modeled by complex numbers

> Essentially it's just a 2D vector of 2 real numbers,
Another way to view a complex number is as a compressed representation of a linear transformation consisting of rotation and scale:

Given complex numbers z=a+b*i, z1=a1+b1*i and z2=a2+b2*i:
z = z1*z2
=> a+b*i = (a1+b1*i)*(a2+b2*i)
= a1*a2+a1*b2*i+a2*b1*i+b1*b2*i*i
= (a1*a2-b1*b2)+(a1*b2+a2*b1)*i
=> a = a1*a2-b1*b2, b = a1*b2+a2*b1

This can be expressed in matrix form as:
[ a b] = [ a1 b1][ a2 b2]
[-b a] [-b1 a1][-b2 a2]

Similarly, each matrix can be factored as
[ a b] = [r 0][ cos(t) sin(t)]
[-b a] [0 r][-sin(t) cos(t)]
where r=sqrt(a^2+b^2) and t=atan2(b,a)

I.e. a=r*cos(t), b=r*sin(t).

Essentially, given a 2D vector, you can construct a rotation-and-scale transformation; one of the axes is the original vector, the other is a 90-degree rotation of it.

And if m(t) is a matrix corresponding to a rotation by angle t and unit scale, then m(t1)*m(t2)=m(t1+t2) and m(t)^n = m(n*t), i.e. multiplying unit-magnitude complex numbers adds their angle, while raising a unit-magnitude complex number to a power multiplies its angle by that power.

youtube.com/watch?v=F_0yfvm0UoU

Complex numbers are very natural for the following reason.

Polynomials are very important and the most important thing about them is their roots or solutions. It is very natural to want to work in a system of numbers such that you can always find the roots to these polynomials, but in the real numbers we have things like x^2+1=0 that have no solutions.

The fix is to add in all of these roots for all of these non-solvable polynomials, such as x^2+1 or x^3+x+1 ect. This construction is called the algebraic closure of your system of numbers (for us the real numbers).

Now the big result is the fundemental theorem of algebra, which states that this new system of numbers we have created is actually the same as the complex numbers. That is the numbers we get by only extending the real numbers by only the root of x^2+1 (or the imaginary number i). This is a very big deal. Any root to any crazy polynomial you can write down can be written as a+bi for a,b real. HUGE.