Off[General::spell];
Off[General::spell1];
Off[Plot::plnr];
Off[ParametricPlot::ppcom];
Needs["Graphics`Colors`"]
Needs["Miscellaneous`Units`"]
Needs["Algebra`Trigonometry`"]
Clear[Derivative]
ThreeAxes[u,v]


ThreeAxes[u_,v_] := 
      Graphics3D[{
            {Blue,Line[{{-u,0,0},{u,0,0}}]},
                    Text["x",{u + v,0,0}],
            {Blue,Line[{{0,-u,0},{0,u,0}}]},
                    Text["y",{0, u + v,0}],
            {Blue,Line[{{0,0,0},{0,0,u}}]},
                    Text["z",{0,0,u + v}]}]; 
ThreeAxes[u_] := ThreeAxes[u,u/8];
ThreeAxes::usage = "ThreeAxes[a,b] makes a standard cartesian axis graphics object
	with x, y, and z running from -a to a, and with axis
	labels b units beyond the tips of the axes.  ThreeAxes[a]
	is ThreeAxes[a,a/8].";

CMView = {2.7, 1.6, 1.2};

Miniproject
For The
Mathematica  Workshop

Gene Bild

The Geometry of Adding Complex Numbers

Brief Description: Two non-zero complex numbers z1 and z2 are input.  Providing that zero, z1, z2, and z1 + z2 are all distinct, the graphs of these four numbers are the vertices of a parallelogram.

Enter two complex numbers in the indicated areas.  Subroutine "leftplot" graphs z1 in red, z2 in blue, and their sum z3 = (z1 + z2) in yellow.  Subroutine "rightplot" graphs line segments from z1, z2, and z3 to the origin, and draws line segments between z1 and z3 and  z2 and z3 to illustrate the parallelogram law.

By changing the AxesLabel option so that the axes are labeled "x" and "y", and removing the indicated opening  and closing comment symbols (* and *) , this notebook can also illustrate the parallelogram law for two input vectors.

Try inputting z1 and the complex conjugate of z1.  What kind of parallelogram did you get?  Why?  What kind of number is z3?

Try inputting z1 and the negative of the complex conjugate of z1.  What kind of parallelogram did you get?  Why?  What kind of number is z3?

Needs["Graphics`Colors`"];
Clear[x1,y1,z1,z2,z3,x2,y2,x3,y3,v1,v2,v3]


z1 = 
(*CHANGE THE RED NUMBER BELOW THIS COMMENT*)
2-2I;


x1 = Re[z1];
y1 = Im[z1];       

z2 = 
(*CHANGE THE BLUE NUMBER BELOW THIS COMMENT*)
2+I;
x2 = Re[z2];
y2 = Im[z2];       

z3 = z1 + z2;
x3 = Re[z3];
y3 = Im[z3];  

(* A COMMENT SYMBOL IS A
   PARENTHESIS AND AN ASTERISK TOGETHER *)   

(* (*REMOVE COMMENT SYMBOL  AT FAR LEFT TO DO VECTORS*)

			  (* ENTER YOUR VECTORS AS ORDERED PAIRS V1 
				 AND V2  BY ENTERING VALUES IN THE
				 CURLY BRACES DEFINITIONS BELOW  *) 
v1 = {2,-1};
v2 = {1,1} ;

v3 = {v1[[1]] + v2[[1]], v1[[2]] + v2[[2]]};

x1 = v1[[1]];
x2 = v2[[1]];

y1 = v1[[2]];
y2 = v2[[2]];

x3 = v3[[1]];
y3 = v3[[2]];
*) (*REMOVE COMMENT SYMBOL  AT FAR LEFT TO DO VECTORS*)
    
leftplot=Show[Graphics[{Red,PointSize[.05],Point[{x1,y1}],
                        Blue,Point[{x2,y2}],
                        Yellow,Point[{x3,y3}]}],
              AxesLabel->{"x","yi"},    
			  Axes->True,
			  AxesOrigin->{0,0},
			  Ticks->None,
			  PlotRange->{{-Abs[z3],Abs[z3]},
				{-Abs[z3],Abs[z3]}},
			  AspectRatio->Automatic,
		      DisplayFunction->Identity];
		      
rightplot=Show[Graphics[{Red,PointSize[.05],Point[{x1,y1}],
                         Blue,Point[{x2,y2}],
                         Yellow,Point[{x3,y3}],
                         IndianRed,Line[{{x1,y1},{0,0}}],
                         NavyBlue, Line[{{x2,y2},{0,0}}],
                         Yellow,Line[{{x3,y3},{0,0}}],
                         IndianRed,Line[{{x2,y2},{x3,y3}}],
                         NavyBlue, Line[{{x1,y1},{x3,y3}}]}],
                AxesLabel->{"x","yi"},    
				Axes->True,
				AxesOrigin->{0,0},
				Ticks->None,
				PlotRange->{{-Abs[z3],Abs[z3]},
				{-Abs[z3],Abs[z3]}},
				AspectRatio->Automatic,
		        DisplayFunction->Identity];
		        
Show[GraphicsArray[{{leftplot,rightplot}}]];