Skip to main content
Mathematics LibreTexts

1.3: Integers Modulo n

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Recall the 'bumpy' hexagon, which had rotational symmetry but no reflection symmetry. The group of symmetries of the bumpy hexagon is called \(\mathbb{Z}_6\). In this section, we'll consider the general case, \(\mathbb{Z}_n\), which we can initially think of as the group of symmetries of a 'bumpy' \(n\)-sided polygon.

    There are many different ways in which \(\mathbb{Z}_n\) appears in mathematics; it's a very important group! We now describe a number of different ways in which it arises.

    1. Well, first we have the group of symmetries of the 'bumpy' \(n\)-sided polygon. By the exercise at the end of the last section, we know this is a group.
    2. For our second definition, we'll define the 'remainder by \(n\)' operation: for any integer \(a\), define \(a\%n\) to be the remainder of \(a\) when divided by \(n\). For example, \(5\%3=2\), because the remainder of \(5\) when divided by \(3\) is \(2\). (You should check that for any integer \(k\), \((kn)\%n=0\).) This operation is usually called 'modulus' or 'mod.' So \(12\%5\) is read 'twelve modulo 5' or 'twelve mod 5.' (And is equal, of course, to two!)

      Usually, we don't write \(+_n\) for the addition. From now on, whenever you see an expression like \(4+3\), you will have to be mindful of the context! If we consider \(4\) and \(3\) as plain old integers, the answer is \(7\). If they are integers mod \(5\), then the answer is \(2\)!

    3. The next definition is really just an easy way to think of the second definition. Imagine a distant planet where the clock has \(n\) hours on it instead of \(12\) (or \(24\)). Then, just as our hours 'wrap around' the circle beyond \(12\) o'clock, the hours wrap around at \(n\). Now if we imagine the clock is numbered \(0\) through \(n-1\) instead of \(1\) to \(n\), we have exactly the situation of \(\mathbb{Z}_n\).
    4. Our last definition will identify \(\mathbb{Z}_n\) with the \(n\)-th roots of unity, which are complex numbers. Recall that any complex number may be written as \(re^{i\theta}\), where \(r\) is a positive real number and \(\theta\) is any angle. Now let \(n\) and \(k\) be some positive integers, and consider the complex number \(x_k=e^{\frac{k}{n}2i\pi}\). Then we can see that \(x_k^n = (e^{\frac{k}{n}2i\pi})^n = e^{k2i\pi} = 1\). Then we call \(x_k\) an \(n\)th root of unity, because raising it to the \(n\)th power gives us \(1\) (aka, unity).

    All of these are somehow the same; but there's a question of how to formally show that two groups are the same. What do we mean by the same? This is an important question to consider, which we will come back to later. For now, an exercise.

    Write out tables for \(n=5\) and \(n=6\) for:
    1. composition of the rotations of the 'bumpy' \(n\)-gon,
    2. addition in \(\mathbb{Z}_n\),
    3. addition of hours on an extraterrestrial clock with \(n\) hours,
    4. and for multiplication of the \(n\)-th roots of unity.

    In what ways are all of these groups the same? In what ways are they different?

    Contributors and Attributions

    • Tom Denton (Fields Institute/York University in Toronto)

    1.3: Integers Modulo n is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?