mersenneforum.org > Math Basic Number Theory 10: complex numbers and Gaussian integers
 Register FAQ Search Today's Posts Mark Forums Read

 2016-11-26, 12:00 #1 Nick     Dec 2012 The Netherlands 6DE16 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 & = & (xu-yv,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=(xu-yv,xv+yu)=(ux-vy,uy+vx)=wz$$ (ii) $\begin{eqnarray*} (zw)t & = & (xu-yv,xv+yu)(r,s)=((xu-yv)r-(xv+yu)s,(xu-yv)s+(xv+yu)r) \\ & = & (xur-yvr-xvs-yus,xus-yvs+xvr+yur) \\ & = & (x(ur-vs)-y(us+vr),x(us+vr)+y(ur-vs)) = (x,y)(ur-vs,us+vr) \\ & = & z(wt) \end{eqnarray*}$ (iii) if $$w=(1,0)$$ then $$zw=(x,y)(1,0)=(x\cdot 1-y\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+xr-yv-ys,xv+xs+yu+yr) \\ & = & (xu-yv,xv+yu)+(xr-ys,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 $$x-yi$$. 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=x-yi+u-vi=\bar{z}+\bar{w}$$; (ii) $$\overline{zw}=\overline{(xu-yv)+(xv+yu)i}=(xu-yv)-(xv+yu)i=(x-yi)(u-vi)=\bar{z}\bar{w}$$; (iii) $$\overline{-z}=\overline{-x-yi}=-x+yi=-(x-yi)=-\bar{z}$$; (iv) $$\bar{\bar{z}}=\overline{x-yi}=x+yi=z$$; (v) If $$z\in\mathbb{R}$$ then $$y=0$$ so $$\bar{z}=x-yi=x=x+yi=z$$. Conversely, if $$\bar{z}=z$$ then $$x+yi=x-yi$$ 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: for all $$x,y\in\mathbb{R}$$, precisely one of the following holds: $$x>y$$, $$x=y$$, $$y>x$$. for all $$x,y,z\in\mathbb{R}$$, if $$x>y$$ and $$y>z$$ then $$x>z$$. for all $$x,y,z\in\mathbb{R}$$, if $$x>y$$ then $$x+z>y+z$$. for all $$x,y\in\mathbb{R}$$, if $$x>0$$ and $$y>0$$ then $$xy>0$$. The first two express the fact that ">" is an order relation, while the other two properties show how it interacts with addition and multiplication. 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 non-negative 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 non-negative 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 non-negative so $$x^2+y^2>0$$ hence $$|z|=\sqrt{x^2+y^2}>0$$. (ii) $\begin{eqnarray*} |zw|^2 & = & (xu-yv)^2+(xv+yu)^2 \\ & = & x^2u^2-2xuyv+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 non-negative hence $$|zw|=|z|\cdot |w|$$. (iii) $$u^2y^2-2uxvy+v^2x^2=(uy-vx)^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 $$|z-w|=\sqrt{(x-u)^2+(y-v)^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=a-b$$ and $$w=b-c$$, then $$z+w=a-c$$ so part (iii) of the proposition 45 above gives us $$|a-c|\leq |a-b|+|b-c|$$. 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)(x-yi)=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 non-zero 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 non-zero 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 $$z|w$$ 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 $$z|w$$ 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|^2|w|^2$$ by proposition (45ii) so $$N(zw)=N(z)N(w)$$. (iii) If $$z|w$$ 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) 2016-12-06, 08:57 #2 only_human "Gang aft agley" Sep 2002 2·1,877 Posts Quote:  Originally Posted by Nick 47. Calculate \((\frac{1}{\sqrt{2}}(1+i))^{300}$$ without using a computer.
Let me take a stab at this one.

At the end of Proposition 44 is
Quote:
 $$|1+i|=\sqrt{2}$$
So I can replace the radical in the denominator but I'd rather have the norm instead of the absolute value so I distribute a square from the outside exponent:
$$(\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:
 Some modern scholars prefer to credit Hippasus with the discovery of the irrationality of √2. Plato in his Theaetetus,[24] describes how Theodorus of Cyrene (c. 400 BC) proved the irrationality of √3, √5, etc. up to √17, which implies that an earlier mathematician had already proved the irrationality of √2.[25] A simple proof of the irrationality of √2 is indicated by Aristotle, and it is set out in the proposition interpolated at the end of Euclid's Book X,[26] which suggests that the proof was certainly ancient.[27] The proof is one of reductio ad absurdum, and the method is to show that, if the diagonal of a square is commensurable with the side, then the same number must be both odd and even.[27] In the hands of modern writers this combination of vague ancient reports and modern guesswork has sometimes evolved into a much more emphatic and colourful tale. Some writers have Hippasus making his discovery while on board a ship, as a result of which his Pythagorean shipmates toss him overboard;[28] while one writer even has Pythagoras himself "to his eternal shame" sentencing Hippasus to death by drowning, for showing "that √2 is an irrational number."[29]

Last fiddled with by only_human on 2016-12-06 at 09:05 Reason: s/151/150/ exponent 150 not 151

 2016-12-06, 10:21 #3 Nick     Dec 2012 The Netherlands 110110111102 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)(1-i) so you can cancel 1+i, getting $$\left(\frac{1+i}{1-i}\right)^{150}$$. And we know that 1-i=-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 x-axis instead of t. Similarly, $$z^3$$ lies on the circle with angle 3t to the x-axis, and so on. In particular, $$z^8=1$$.
2016-12-06, 10:26   #4
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts

Quote:
 Originally Posted by only_human Let me take a stab at this one. At the end of Proposition 44 is So I can replace the radical in the denominator but I'd rather have the norm instead of the absolute value so I distribute a square from the outside exponent: $$(\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
You are over thinking it. Re-examine proposition 47.

Because 300 % 8 == 4, the answer pretty simply follows as [spoiler]1/sqrt(2) * (-1-i)[/spoiler].

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 2016-12-06 at 11:06

2016-12-06, 10:45   #5
Chris Card

Aug 2004

2×5×13 Posts

Quote:
 Originally Posted by Dubslow You are over thinking it. Re-examine proposition 47. Because 300 % 8 == 4, the answer pretty simply follows as 1/sqrt(2) * (-1-i). 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
Really? (i+1)^2 = 2i and go from there ...

Chris

Last fiddled with by Chris Card on 2016-12-06 at 10:49

2016-12-06, 10:52   #6
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

160658 Posts

Quote:
 Originally Posted by Chris Card Really? (i+1)^2 = 2i and go from there ... Chris
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 == 5pi/4 pi (like I just failed to do above).

Last fiddled with by Dubslow on 2016-12-06 at 11:02

2016-12-06, 10:55   #7
Chris Card

Aug 2004

8216 Posts

Quote:
 Originally Posted by Dubslow 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 == 5pi/4 (like I just did above).
I don't get 1/sqrt(2) * (-1-i), I get -1

Chris

2016-12-06, 11:00   #8
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts

Quote:
 Originally Posted by Chris Card I don't get 1/sqrt(2) * (-1-i), I get -1 Chris
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 2016-12-06 at 11:04

 2016-12-07, 01:16 #9 only_human     "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.

 Similar Threads Thread Thread Starter Forum Replies Last Post Nick Number Theory Discussion Group 17 2017-12-23 20:10 Nick Number Theory Discussion Group 5 2017-04-25 14:32 Nick Number Theory Discussion Group 0 2016-12-29 13:47 Nick Number Theory Discussion Group 0 2016-12-03 11:42 Nick Number Theory Discussion Group 6 2016-10-14 19:38

All times are UTC. The time now is 06:32.

Mon Dec 6 06:32:45 UTC 2021 up 136 days, 1:01, 0 users, load averages: 1.44, 1.48, 1.49