\documentclass[12pt]{article}
\usepackage[Mickael]{ammaths}

\begin{document}

\module{Gaussian integers}{3}{03}{1 period}
\en\nocouleur

\prereq{Basic algebra skills.}

\object{\begin{itemize}
        \item Discover complex numbers and some of their properties through Gaussian integers.
	\item Link geometry and algebra.
	\end{itemize}}

\mater{\begin{itemize}
	\item Matching cards with a pair of Gaussian integers or a pair of points on a lattice.
	\item Lattice with axes and the units $1$ and $i$ (one for each student).
	\item Beamer and lesson about Gaussian integers.
	\end{itemize}}

\modpart{Matching game with Gaussian integers and points.}{15 mins}

Students are handed out cards with either a pair of Gaussian integers of a pair of points on a lattice. Thay mingle to
match the cards by pairs.


\modpart{Experimental study of the operations in $\Z[i]$}{25 mins}

The teacher introduces the notations of the set of Gaussian integers $\Z[i]$ and the two operations, $+$ and $\times$. 

Working in teams of two, three of four, students have to experiment on operations in the set of Gaussian integers. The
aim is to find the graphical analogous to \begin{itemize}
	\item addition ;
	\item multiplication by a real number ;
	\item multiplication by $i$ ;
	\item multiplication by a number $ib$.
	\end{itemize}

Answers are then given with a beamer.?
 

\pagebreak

\moddocdis{Gaussian integers}{3}{03}{Lesson}

\defi{}{A \emph{Gaussian integer} is a number of the form $a+bi$ where $a$ and $b$ are two integers and $i$ is an
imaginary number such that $i^2=-1$. The set of all Gaussian integers is usually noted $\Z[i]$.}

Every Gaussian integer is uniquely associated to a point in a square lattice. This process defines a kind of coordinate system on the lattice, with unit $1$ on the horizontal axis and $i$ on the vertical one.

\begin{center}
\psset{unit=0.6cm}
\begin{pspicture}(-6,-6)(6,6)
\multido{\n=-5+1}{11}{
\multido{\d=-5+1}{11}{
\psdot[dotstyle=o,dotsize=2pt](\n,\d)
}}
\psline(-5,0)(5,0)
\psline(0,-5)(0,5)
\psdots(0,0)(0,1)(1,0)(2,-3)(-4,4)(3,2)
\uput[dl](0,0){$0$}
\uput[ul](0,1){$i$}
\uput[dr](1,0){$1$}
\uput[d](2,-3){$2-3i$}
\uput[u](-4,4){$-4+4i$}
\uput[u](3,2){$3+2i$}
\end{pspicture}
\end{center}

The set of Gaussian integers is an extension of the set of standard integers. Addition and multiplication in the set $\Z[i]$ follow the same rules as addition and multiplication of integers, with the added properties that $i^2=-1$ and that the ``real parts'' and ``imaginary parts'' cannot be mixed up in addition. We deduce easily the following properties.

\bigskip

\prop{}{Let $a+bi$ and $c+di$ be two Gaussian integers. Their \emph{sum} is equal to the Gaussian integer
$$(a+c)+(b+d)i$$ while their \emph{product} is equal to
$$(ac-bd)+(ad+bc)i.$$}

\pagebreak

Operations on Gaussian integers have simple geometrical counterparts. Addition by a Gaussian integer $a+bi$ is a translation by the vector defined by the lattice points $0$ and $a+bi$. The example below shows addition by $2+i$.

\begin{center}
\psset{unit=0.6cm}
\begin{pspicture}(-6,-6)(6,6)
\multido{\n=-5+1}{11}{
\multido{\d=-5+1}{11}{
\psdot[dotstyle=o,dotsize=2pt](\n,\d)
}}
\psline(-5,0)(5,0)
\psline(0,-5)(0,5)
\psdots(0,0)(0,1)(1,0)(-4,-3)(-2,-2)(2,1)(1,-4)(3,-3)(-5,2)(-3,3)
\uput[dl](0,0){$0$}
\uput[ul](0,1){$i$}
\uput[dr](1,0){$1$}
\uput[u](2,1){$2+i$}
\uput[d](-4,-3){$-4-3i$}
\uput[u](-2,-2){$-2-2i$}
\uput[d](1,-4){$1-4i$}
\uput[u](3,-3){$3-3i$}
\uput[d](-5,2){$-5+2i$}
\uput[u](-3,3){$-3+3i$}
\psline[arrowscale=2]{->}(-4,-3)(-2,-2)
\psline[arrowscale=2]{->}(0,0)(2,1)
\psline[arrowscale=2]{->}(1,-4)(3,-3)
\psline[arrowscale=2]{->}(-5,2)(-3,3)
\end{pspicture}
\end{center}

Multiplication by a Gaussian integer $a+bi$ is the composition of a rotation and an homothety around the lattice point $0$ (the origin), whose angle and ratio are defined by the lattice points $0$ and $a+bi$. Here are a few examples.
\begin{itemize}
\itemb Multiplication by $i$ is a rotation of angle $\frac{\pi}{2}$ around the origin, as the distance between $0$ and $i$ is equal to $1$.
\itemb Multiplication by $2$ is an homothety of ratio $2$ around the origin, as the angle defined by the point $2$ is equal to $0$.
\itemb Multiplication by $2i$ is the composition of an homothety of ratio $2$ and a rotation of angle $\frac{\pi}{2}$, both around the origin.
\end{itemize}
 
\begin{center}
\psset{unit=0.6cm}
\begin{pspicture}(-6,-6)(6,6)
\multido{\n=-5+1}{11}{
\multido{\d=-5+1}{11}{
\psdot[dotstyle=o,dotsize=2pt](\n,\d)
}}
\psline(-5,0)(5,0)
\psline(0,-5)(0,5)
\psdots(0,0)(0,1)(1,0)(3,1)(-1,3)(-2,1)(-4,2)(-2,-2)(4,-4)
\uput[dl](0,0){$0$}
%\uput[ul](0,1){$i$}
%\uput[dr](1,0){$1$}
\uput[d](3,1){$3+i$}
\uput[u](-1,3){$-1+3i$}
\psline[linestyle=dashed,linecolor=gray](3,1)(0,0)(-1,3)
\psarc[linestyle=dashed,linecolor=gray,arrowscale=2]{->}{1}{18.435}{108.435}
\uput[u](0.5,0.866){\gray $\times i$}
\uput[dl](-2,1){$-2+i$}
\uput[u](-4,2){$-4+2i$}
\psline[linestyle=dashed,linecolor=darkgray](0,0)(-2,1)
\psline[linestyle=dotted,linecolor=darkgray](0,0)(-4,2)
\uput[u](-2.5,1.25){\darkgray $\times 2$}
\uput[d](-2,-2){$-2-2i$}
\uput[d](4,-4){$4-4i$}
\psline(0,0)(-2,-2)
\psline(0,0)(4,-4)
\psarc[linestyle=dashed,linecolor=gray,arrowscale=2]{->}{1}{225}{315}
\uput[d](0.5,-0.9){$\times 2i$}
\end{pspicture}
\end{center}

\pagebreak

\moddoc{Lattice for experiments}

\begin{center}
\psset{unit=1cm}
\pspicture(-8,-11)(8,11)
\multido{\n=-8+1}{17}{
\multido{\d=-11+1}{23}{
\psdot[dotstyle=o](\n,\d)}}
\psline(-8,0)(8,0)
\psline(0,-11)(0,11)
\psdots(0,0)(0,1)(1,0)
\uput[dl](0,0){$0$}
\uput[ul](0,1){$i$}
\uput[dr](1,0){$1$}
\endpspicture
\end{center}

\pagebreak

\moddoc{Matching cards with Gaussian integers and points}

\begin{center}
\Huge
\begin{tabular}{|c|c|c|c|}
\hline
$2-3i$  & $-1-2i$  & $4+3i$ & $1-5i$ \rule{0pt}{40pt}\\
$-1-2i$ & $4+3i$ & $1-5i$   & $4i$ \\[15pt]
\hline
$4i$ 		    & $1-3i$ & $-1-i$     & $-4+3i$ \rule{0pt}{40pt}\\
$1-3i$ & $-1-i$ 	   & $-4+3i$ & $5-i$ \\[15pt]
\hline
$5-i$    & $-2-3i$ & $-3$      & $5+3i$ \rule{0pt}{40pt}\\
$-2-3i$ & $-3$     & $5+3i$ & $3-22i$ \\[15pt]
\hline
$3-2i$ & $-3-2i$   & $-2+2i$ & $-3-4i$\rule{0pt}{40pt}\\
$-3-2i$         & $-2+2i$ & $-3-4i$   & $2+3i$ \\[15pt]
\hline
$2+3i$ & $1+3i$ &  &  \rule{0pt}{40pt}\\
$1+3i$ & $2-3i$ &  &  \\[15pt]
\hline
\end{tabular}
\end{center}


\newcommand{\lattice}[4]{
\psset{unit=0.4cm}
\begin{pspicture}(-6,-6)(6,6)
\multido{\n=-5+1}{11}{
\multido{\d=-5+1}{11}{
\psdot[dotstyle=o,dotsize=2pt](\n,\d)
}}
\psline(-5,0)(5,0)
\psline(0,-5)(0,5)
\psdots(0,0)(0,1)(1,0)(#1,#2)(#3,#4)
\uput[dl](0,0){\small $0$}
\uput[ul](0,1){\small $i$}
\uput[dr](1,0){\small $1$}
\end{pspicture}}

\begin{center}
\begin{tabular}{|c|c|c|}
\hline
\lattice{2}{-3}{-1}{-2} & \lattice{-1}{-2}{4}{3} & \lattice{4}{3}{1}{-5}\\ \hline
\end{tabular}
\end{center}


\pagebreak


\begin{center}
\begin{tabular}{|c|c|c|}
\hline
\lattice{1}{-5}{0}{4} & \lattice{0}{4}{1}{-3} & \lattice{1}{-3}{-1}{-1}\\ \hline
\lattice{-1}{-1}{-4}{3} & \lattice{-4}{3}{5}{-1} & \lattice{5}{-1}{-2}{-3} \\ \hline
\lattice{-2}{-3}{-3}{0} & \lattice{-3}{0}{5}{3} & \lattice{5}{3}{3}{-2} \\ \hline
\lattice{3}{-2}{-3}{-2} & \lattice{-3}{-2}{-2}{2} & \lattice{-2}{2}{-3}{-4} \\ \hline
\lattice{-3}{-4}{2}{3} & \lattice{2}{3}{1}{3} & \lattice{1}{3}{2}{-3} \\ \hline
\end{tabular}
\end{center}


\end{document}
