20161126, 12:00  #1 
Dec 2012
The Netherlands
5·353 Posts 
Basic Number Theory 10: complex numbers and Gaussian integers
We are going to look at the Gaussian integers. Not only do they form a fascinating number system in their own right, but they can also tell us more about the ordinary integers.
To start with, we must look at the more general mathematical concept of complex numbers. A complex number is an ordered pair of real numbers. Thus if \(z\) is a complex number then \(z=(x,y)\) for some real numbers \(x\) and \(y\). We call \(x\) the real part of \(z\) and \(y\) the imaginary part of \(z\). We write \(\mathbb{C}\) for the set of all complex numbers. Take any complex numbers \(z=(x,y)\) and \(w=(u,v)\). (Recall that ordered pairs are defined in such a way that \(z=w\) if and only if both \(x=u\) and \(y=v\).) The sum of \(z\) with \(w\) and the product of \(z\) with \(w\) are the complex numbers defined as follows: \[\begin{eqnarray*} z+w & = & (x+u,y+v) \\ zw & = & (xuyv,xv+yu) \end{eqnarray*}\] Thus, to add two complex numbers together, we simply add their real parts and, separately, add their imaginary parts. It follows that complex addition obeys all the usual laws of arithmetic (for example, \(z+w=w+z\) in the complex numbers since \(x+u=u+x\) and \(y+v=v+y\) in the real numbers). We also define \(z\) to mean the complex number \((x,y)\). The definition of multiplication may appear strange if you have never seen it before. The underlying motivation is geometric, and the advantages of the definition will become clear shortly. The fact that this multiplication also obeys all the usual laws is not immediately obvious, so we must check it. Proposition 42 For all complex numbers \(z,w\) and \(t\), (i) \(zw=wz\); (ii) \((zw)t=z(wt)\); (iii) if \(w=(1,0)\) then \(zw=z\); (iv) \(z(w+t)=zw+zt\). proof Take any \(z=(x,y),w=(u,v),t=(r,s)\in\mathbb{C}\). (i) \(zw=(xuyv,xv+yu)=(uxvy,uy+vx)=wz\) (ii) \[ \begin{eqnarray*} (zw)t & = & (xuyv,xv+yu)(r,s)=((xuyv)r(xv+yu)s,(xuyv)s+(xv+yu)r) \\ & = & (xuryvrxvsyus,xusyvs+xvr+yur) \\ & = & (x(urvs)y(us+vr),x(us+vr)+y(urvs)) = (x,y)(urvs,us+vr) \\ & = & z(wt) \end{eqnarray*} \] (iii) if \(w=(1,0)\) then \(zw=(x,y)(1,0)=(x\cdot 1y\cdot 0,x\cdot 0+y\cdot 1)=(x,y)=z\) (iv)\[ \begin{eqnarray*} z(w+t) & = & (x,y)(u+r,v+s) = (x(u+r)y(v+s),x(v+s)+y(u+r)) \\ & = & (xu+xryvys,xv+xs+yu+yr) \\ & = & (xuyv,xv+yu)+(xrys,xs+yr) = (x,y)(u,v)+(x,y)(r,s) \\ & = & zw+zt \end{eqnarray*} \] ∎ For all real numbers \(x,y\), it follows from the definitions that \((x,0)+(y,0)=(x+y,0)\) and \((x,0)(y,0)=(xy,0)\), so complex numbers with imaginary part 0 behave exactly like the corresponding real numbers. In this way, the complex numbers include a copy of the real numbers and extend them. Notation For any real number \(x\), we write the complex number \((x,0)\) simply as \(x\). (As they behave the same way, this does not cause any problems.) We write \(i\) for the complex number \((0,1)\). For any real numbers \(x,y\), it follows from the definitions that \(x+yi=(x,0)+(y,0)(0,1)=(x,0)+(0,y)=(x,y)\) so every complex number can be written in the form \(x+yi\) where \(x,y\in\mathbb{R}\). This is the standard notation for them. It also follows that \(i^2=(0,1)(0,1)=(1,0)=1\). Let \(z=x+yi\) be a complex number (where \(x,y\) are real numbers). The complex conjugate of \(z\), denoted \(\bar{z}\), is defined to be the complex number \(xyi\). Proposition 43 For all \(z,w\in\mathbb{C}\), (i) \(\overline{z+w}=\bar{z}+\bar{w}\); (ii) \(\overline{z\cdot w}=\bar{z}\cdot\bar{w}\); (iii) \(\overline{z}=\bar{z}\); (iv) \(\bar{\bar{z}}=z\). (v) \(z\in\mathbb{R}\Leftrightarrow \bar{z}=z\). proof Take any \(z=x+yi,w=u+vi\in\mathbb{C}\) (where \(u,v,x,y\in\mathbb{R}\)). (i) \(\overline{z+w}=\overline{(x+u)+(y+v)i}=(x+u)(y+v)i=xyi+uvi=\bar{z}+\bar{w}\); (ii) \(\overline{zw}=\overline{(xuyv)+(xv+yu)i}=(xuyv)(xv+yu)i=(xyi)(uvi)=\bar{z}\bar{w}\); (iii) \(\overline{z}=\overline{xyi}=x+yi=(xyi)=\bar{z}\); (iv) \(\bar{\bar{z}}=\overline{xyi}=x+yi=z\); (v) If \(z\in\mathbb{R}\) then \(y=0\) so \(\bar{z}=xyi=x=x+yi=z\). Conversely, if \(\bar{z}=z\) then \(x+yi=xyi\) so \(y=y\) and therefore \(y=0\) hence \(z=x\in\mathbb{R}\). ∎ On the set of real numbers, we also have the relation ">". Its essential properties are:
Proposition 44 The relation ">" on \(\mathbb{R}\) cannot be extended to a relation on \(\mathbb{C}\) with the above properties. proof Suppose there exists an extension of ">" to the whole of \(\mathbb{C}\) satisfying (1) to (4) inclusive above. As \(i\neq 0\), we have \(i>0\) or \(0>i\) by property (1). If \(i>0\) then \(i^2>0\) too by property (4). But \(i^2=1<0\), a CONTRADICTION. If instead \(0>i\) then \(i>0\) by property (3) so \((i)^2>0\) by property (4). But \((i)^2=1<0\), again a CONTRADICTION. Hence no such extension exists. ∎ We saw earlier that the real numbers correspond with all points on a line. In a similar way, the complex numbers correspond with all the points in a plane, whereby we associate a complex number \(z=x+yi\) with the point whose coordinates are \((x,y)\). By the theorem of Pythagoras, the distance from the point \((x,y)\) to the point \((0,0)\) is given by the real number \(\sqrt{x^2+y^2}\). We call this the modulus or absolute value of the complex number \(z=x+yi\), and denote it by \(z\). For a real number \(x\) (putting \(y=0\)), it follows that \(x=\sqrt{x^2}\) which (by definition) is the nonnegative real number whose square equals \(x^2\), so \(x=x\) itself if \(x\geq 0\) or \(x=x\) if \(x<0\). Examples \(2=2\), \(2=2\), \(i=1\), \(1+i=\sqrt{2}\), \(0=0\). Proposition 45 For all complex numbers \(z,w\): (i) \(z\geq 0\) and \(z=0\Leftrightarrow z=0\); (ii) \(zw=z\cdot w\); (iii) \(z+w\leq z+w\). proof Take any complex numbers \(z=x+yi\) and \(w=u+vi\). (i) \(z=\sqrt{x^2+y^2}\), the nonnegative real number whose square is \(x^2+y^2\) so \(z\geq 0\). If \(z=0\) then \(x=0=y\) so \(z=\sqrt{0^2+0^2}=0\). If \(z\neq 0\) then \(x\neq 0\) or \(y\neq 0\) so \(x^2>0\) or \(y^2>0\). And both are nonnegative so \(x^2+y^2>0\) hence \(z=\sqrt{x^2+y^2}>0\). (ii) \[\begin{eqnarray*} zw^2 & = & (xuyv)^2+(xv+yu)^2 \\ & = & x^2u^22xuyv+y^2v^2+x^2v^2+2xvyu+y^2u^2 \\ & = & x^2u^2+y^2v^2+x^2v^2+y^2u^2 \\ & = & (x^2+y^2)(u^2+v^2) \\ & = & (z\cdot w)^2 \end{eqnarray*} \] and \(zw,z,w\) are all nonnegative hence \(zw=z\cdot w\). (iii) \(u^2y^22uxvy+v^2x^2=(uyvx)^2\geq 0\) so \(u^2y^2+v^2x^2\geq 2uxvy\) and therefore \(u^2y^2+v^2x^2+u^2x^2+v^2y^2\geq 2uxvy+u^2x^2+v^2y^2\) hence \((u^2+v^2)(x^2+y^2)\geq (ux+vy)^2\). It follows that \(2\sqrt{(u^2+v^2)(x^2+y^2)}\geq 2(ux+vy)\) so \(u^2+v^2+x^2+y^2+2\sqrt{(u^2+v^2)(x^2+y^2)}\geq u^2+v^2+x^2+y^2+2(ux+vy)\) and therefore \((\sqrt{u^2+v^2}+\sqrt{x^2+y^2})^2\geq (u+x)^2+(v+y)^2\) hence \(\sqrt{u^2+v^2}+\sqrt{x^2+y^2}\geq \sqrt{(u+x)^2+(v+y)^2}\) i.e. \(w+z\geq w+z\). ∎ For any complex numbers \(z=x+yi\) and \(w=u+vi\), we have \(zw=\sqrt{(xu)^2+(yv)^2}\) which (by the theorem of Pythagoras again) is the distance between the points corresponding with \(z\) and \(w\) in the plane. For any 3 complex numbers \(a,b,c\), if we put \(z=ab\) and \(w=bc\), then \(z+w=ac\) so part (iii) of the proposition 45 above gives us \(ac\leq ab+bc\). This expresses the geometric fact that the length of one side of a triangle is less than or equal to the sum of the lengths of the other two sides. For this reason, part (iii) is known as the triangle inequality. There is a simple but important connection between the modulus of a complex number and its complex conjugate. Proposition 46 For all \(z\in\mathbb{C}\), \(z\bar{z}=z^2\). proof For any complex number \(z=x+yi\) (where \(x,y\) are real numbers), \(z\bar{z}=(x+yi)(xyi)=x^2(yi)^2=x^2+y^2=z^2\). ∎ Take any complex number \(z\neq 0\). By proposition (45i), we have \(z>0\) so, putting \(w=\frac{\bar{z}}{z^2}\), we get \(zw=1\). Thus any complex number except 0 is a unit in \(\mathbb{C}\), and we write \(z^{1}=\frac{\bar{z}}{z^2}\). Example As \(i=1\), it follows that \(\frac{1}{i}=i\). Now take a complex number \(z=x+yi\) with \(z=1\). Then \(x^2+y^2=1\) so there exists a real number \(t\) such that \(\cos(t)=x\) and \(\sin(t)=y\). Associating \(z\) with the point \((x,y)\) in the plane, \(t\) is given by the angle between the positive \(x\)axis and the line segment from \((0,0)\) to \((x,y)\): Thus if \(z=1\) then we can express \(z\) in the form \(z=\cos(t)+i\sin(t)\). More generally, take any complex number \(z\neq 0\), and let \(w=\frac{z}{z}\). Then \(w=1\) so \(w=\cos(t)+i\sin(t)\) for some real number \(t\) and therefore \(z=z(\cos(t)+i\sin(t))\). So any nonzero complex number can be written in the form \(r(\cos(t)+i\sin(t))\) where \(r\) is a positive real number and \(t\) also a real number. Putting complex numbers into this form reveals the idea behind the definition of multiplication: Proposition 47 Let \(r,r'\) be positive real numbers and \(t,t'\) real numbers. Let \(z=r(\cos(t)+i\sin(t))\) and \(w=r'(\cos(t')+i\sin(t'))\). Then \(zw=rr'(\cos(t+t')+i\sin(t+t'))\). proof We use the fact that \(\cos(t+t')=\cos(t)\cos(t')\sin(t)\sin(t')\) and \(\sin(t+t')=\sin(t)\cos(t')+\cos(t)\sin(t')\). Thus \[\begin{eqnarray*} zw & = & rr'(\cos(t)+i\sin(t))(\cos(t')+i\sin(t')) \\ & = & rr'(\cos(t)\cos(t')\sin(t)\sin(t')+i(\sin(t)\cos(t')+\cos(t)\sin(t')))\\ & = & rr'(\cos(t+t')+i\sin(t+t')). \end{eqnarray*}\] ∎ So multiplying by a nonzero complex number has the effect of scaling and rotating the points in the plane. We now have enough basic knowledge of complex numbers to return to Number Theory. A Gaussian integer is a complex number \(a+bi\) where \(a\) and \(b\) are integers. We write \(\mathbb{Z}[i]\) for the set of all Gaussian integers. It is not hard to see that this is the smallest set of complex numbers which contains \(i\) and is closed under addition and multiplication. For a Gaussian integer \(z=a+bi\), we define the norm \(N(z)\) of \(z\) to be the integer given by \(N(z)=a^2+b^2\). For Gaussian integers \(z,w\), we say \(z\) divides \(w\) and write \(zw\) if there exists a Gaussian integer \(t\) such that \(zt=w\). Instead of saying \(z\) divides \(w\), we may call \(z\) a divisor or factor of \(w\). Proposition 48 For all Gaussian integers \(z,w\), (i) \(N(z)\geq 0\) and \(N(z)=0\Leftrightarrow z=0\); (ii) \(N(zw)=N(z)N(w)\); (iii) if \(zw\) in \(\mathbb{Z}[i]\) then \(N(z)N(w)\) in \(\mathbb{Z}\). proof Take any Gaussian integers \(z,w\). (i) \(N(z)=z^2\) so \(N(z)\geq 0\) and by proposition (45i) we have \(N(z)=0\Leftrightarrow z=0\). (ii) \(N(zw)=zw^2=z^2w^2\) by proposition (45ii) so \(N(zw)=N(z)N(w)\). (iii) If \(zw\) in \(\mathbb{Z}[i]\) then there exists a Gaussian integer \(t\) such that \(zt=w\). BY part (ii) above, \(N(w)=N(zt)=N(z)N(t)\) hence \(N(z)N(w)\) in \(\mathbb{Z}\). ∎ The Gaussian integers also have their own form of division with remainder: Proposition 49 Let \(z,w\) be Gaussian integers with \(w\neq 0\). Then there exist Gaussian integers \(q,r\) such that \(z=qw+r\) and \(N(r)<N(w)\). proof As \(w\neq 0\), we may form the complex number \(zw^{1}\)  write it as \(x+yi\), so that \(z=w(x+yi)\) in \(\mathbb{C}\). There exists \(m\in\mathbb{Z}\) such that \(m\leq x+\frac{1}{2}<m+1\) and thus \(m\frac{1}{2}\leq x<m+\frac{1}{2}\). Similarly, there exists \(n\in\mathbb{Z}\) such that \(n\frac{1}{2}\leq y<n+\frac{1}{2}\). Let \(q=m+ni\) and \(r=zqw\). Then \(q,r\) are Gaussian integers with \(z=qw+r\) and \[\begin{eqnarray*} r & = & zqw=w\cdot (x+yi)(m+ni)=w\cdot (xm)+(yn)i \\ & = & w\sqrt{(xm)^2+(yn)^2}\leq w\sqrt{\left(\frac{1}{2}\right)^2+\left(\frac{1}{2}\right)^2} =\frac{1}{\sqrt{2}}w \end{eqnarray*}\] so \(N(r)=r^2\leq\frac{1}{2}w^2<w^2=N(w)\). ∎ Exercises 44. Show that, for all complex numbers \(z,w\), \(zw\leq zw\). 45. Find real numbers \(x,y\) such that \(\frac{1}{2+3i}=x+yi\). 46. Prove for all real numbers \(t\) that \((\cos(t)+i\sin(t))^2=\cos(2t)+i\sin(2t)\). 47. Calculate \((\frac{1}{\sqrt{2}}(1+i))^{300}\) without using a computer. 48. Calculate the Gaussian integer \(i(1+i)^2\). 49. For any Gaussian integer \(z\), prove that \(z\) is a unit in \(\mathbb{Z}[i]\) if and only if \(N(z)=1\). Find all the units. 
20161206, 08:57  #2  
"Gang aft agley"
Sep 2002
2·1,877 Posts 
Quote:
At the end of Proposition 44 is Quote:
\((\frac{1}{1 + i}(1+i)^{2})^{150}\) Then since 1 + i is not equal to zero, the expression is meaningful and I can cancel. So I think that I get (1 + i)^{150} I'm not sure I am doing this right at all but I'd like to end with an apocryphal story that I like: https://en.wikipedia.org/wiki/Hippasus Quote:
Last fiddled with by only_human on 20161206 at 09:05 Reason: s/151/150/ exponent 150 not 151 

20161206, 10:21  #3 
Dec 2012
The Netherlands
5×353 Posts 
Yes, it's an alarming story!
Bringing a square inside the bracket is a good idea and then, as you say, you get the norm N(1+i) instead of the absolute value. And N(1+i)=(1+i)(1i) so you can cancel 1+i, getting \(\left(\frac{1+i}{1i}\right)^{150}\). And we know that 1i=i(1+i)... Another way of approaching this is geometrically. Let \(z=\frac{1}{\sqrt{2}}(1+i)\). Then (associating each complex number x+yi with the point (x,y) in the plane), z lies on the circle with centre (0,0) and radius 1: Using proposition 47, we see that \(z^2\) also lies on that circle but with angle 2t from the xaxis instead of t. Similarly, \(z^3\) lies on the circle with angle 3t to the xaxis, and so on. In particular, \(z^8=1\). 
20161206, 10:26  #4  
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
3×29×83 Posts 
Quote:
Because 300 % 8 == 4, Try again you doofus known as dubslow: Because 300 % 8 == 4, the answer pretty simply follows as 4 * pi/8 = pi > 1. Edit: crosspost. In the most fundamental view, exponentials are nothing more than geometry/trigonometry, and handling them as such is pretty typically the most convenient way to treat them (at least computationally in the complex plane). For more context about the fundamentality of the exponential function in the complex plane, see e.g. this wonderful little write up: https://np.reddit.com/r/math/comment...gjq/?context=3 Last fiddled with by Dubslow on 20161206 at 11:06 

20161206, 10:45  #5  
Aug 2004
204_{8} Posts 
Quote:
Chris Last fiddled with by Chris Card on 20161206 at 10:49 

20161206, 10:52  #6 
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
1110000110101_{2} Posts 
Fundamentally that's the same answer. In particular, you just noted that pi/4 * 2 == pi/2, which is approximately the same as saying pi/4 * 300 ==
Last fiddled with by Dubslow on 20161206 at 11:02 
20161206, 10:55  #7 
Aug 2004
2^{2}·3·11 Posts 

20161206, 11:00  #8 
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
3×29×83 Posts 
Wow I'm out of practice. 300pi/4 = pi, not 5pi/4...
Off by one error, I think (I did x^301 instead of x^300 without meaning to). Haven't thought about unit circles in a while. Last fiddled with by Dubslow on 20161206 at 11:04 
20161207, 01:16  #9 
"Gang aft agley"
Sep 2002
2·1,877 Posts 
Thank you for the help; I've noted the suggestions and corrections including the periodicity of the unit circle and the correct form of a norm.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Basic Number Theory 1 & 2  Nick  Number Theory Discussion Group  17  20171223 20:10 
Basic Number Theory 20: polynomials  Nick  Number Theory Discussion Group  5  20170425 14:32 
Basic Number Theory 14: a first look at groups  Nick  Number Theory Discussion Group  0  20161229 13:47 
Basic Number Theory 11: Gaussian primes  Nick  Number Theory Discussion Group  0  20161203 11:42 
Basic Number Theory 4: a first look at prime numbers  Nick  Number Theory Discussion Group  6  20161014 19:38 