Dror Bar-Natan: Classes: 2012-13: Math 240 Algebra I: Tuesday September 18:

The Complex Numbers by Computer

Theorem. There is a field Comp that contains R and also contains an element i so that (i^2)=-1.

Definitions

Comp /: Comp[a_,b_] + Comp[c_,d_] := Comp[a+c, b+d];
Comp /: Comp[a_,b_] * Comp[c_,d_] := Comp[a*c-b*d, a*d+b*c];
Comp[0] = Comp[0,0];
Comp[1] = Comp[1,0];
Comp /: Simplify[Comp[a_, b_]] := Comp[Simplify[a], Simplify[b]];
z1 = Comp[a1, b1];
z2 = Comp[a2, b2];
z3 = Comp[a3,b3];

"Comp" is a field.

The "F1" Properties

{z1+z2, z2+z1}

{z1*z2, z2*z1}

The "F2" Properties

{(z1+z2)+z3, z1+(z2+z3)}

f2={(z1*z2)*z3, z1*(z2*z3)}

Simplify[f2]

The "F3" Properties

{z1, z1+Comp[0]}

{z1,z1*Comp[1]}

The "F4" Properties

{z1+Comp[-a1,-b1], Comp[0]}

f4={z1*Comp[(a1/((a1^2)+(b1^2))), ((-b1)/((a1^2)+(b1^2)))], Comp[1]}

Simplify[f4]

The "F5" Property

f5={z1*(z2+z3), z1*z2+z1*z3}

Simplify[f5]

"Comp" contains the real numbers.

Comp[a1,0]+Comp[a2,0]

Comp[a1,0]*Comp[a2,0]

"Comp" contains a square root of -1.

i=Comp[0,1];

i*i

i*i+Comp[1]

The Polar Presentation of Comp

Pol[r_, θ_] := Comp[r *Cos[θ], r*Sin[θ]]

res1=Pol[r1,θ1]*Pol[r2, θ2]

Simplify[res1]