Multiplication Tables Modulo m

You can make tables that display the products modulo m of pairs of integers from the set $\left\{\vphantom{ 0,1,2,\ldots ,m-1}\right.$0, 1, 2,…, m - 1$\left.\vphantom{ 0,1,2,\ldots ,m-1}\right\}$.


$\blacktriangleright$ To get a multiplication table modulo m with m = 6

1.
Define the function g(i, j) = (i - 1)(j - 1).

2.
From the Matrices submenu, choose Fill Matrix.

3.
Select Defined by Function.

4.
Enter g in the Enter Function Name box.

5.
Select 6 rows and 6 columns.

6.
Choose OK.

7.
Type $\limfunc$mod6 at the right of the matrix. (Type in mathematics mode; mod will automatically turn gray.)

8.
Choose Evaluate.


$\blacktriangleright$ Evaluate

$\left[\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 4 & 5 \\
...
... 15 \\
0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right]$$\limfunc$mod6 = $\left[\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
... \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 4 & 5 \\
...
... 3 & 0 & 3 \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
... \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}
}\right]$


You can also find this matrix as the product of a column matrix with a row matrix.


$\blacktriangleright$ Evaluate

$\left[\vphantom{
\begin{array}{c}
0 \\
1 \\
2 \\
3 \\
4 \\
5
\end{array}
}\right.$$\begin{array}{c}
0 \\
1 \\
2 \\
3 \\
4 \\
5
\end{array}$$\left.\vphantom{
\begin{array}{c}
0 \\
1 \\
2 \\
3 \\
4 \\
5
\end{array}
}\right]$$\left[\vphantom{
\begin{array}{cccccc}
0 & 1 & 2 & 3 & 4 & 5
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 1 & 2 & 3 & 4 & 5
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 1 & 2 & 3 & 4 & 5
\end{array}
}\right]$ = $\left[\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 4 & 5 \\
...
... 15 \\
0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right]$


$\left[\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 4 & 5 \\
...
... 15 \\
0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
...0 & 4 & 8 & 12 & 16 & 20 \\
0 & 5 & 10 & 15 & 20 & 25
\end{array}
}\right]$$\func$mod6 = $\left[\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
... \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}
}\right.$$\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2 & 3 & 4 & 5 \\
...
... 3 & 0 & 3 \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}$$\left.\vphantom{
\begin{array}{cccccc}
0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 2...
... \\
0 & 4 & 2 & 0 & 4 & 2 \\
0 & 5 & 4 & 3 & 2 & 1
\end{array}
}\right]$


Make a copy of this last matrix. From the Edit menu choose Add Row(s)..., add a new row at the top, choose Add Column(s)..., add a new column at the left, and fill in the blanks to get the following multiplication table modulo 6:

× 0 1 2 3 4 5 0 0 0 0 0 0 0 1 0 1 2 3 4 5 2 0 2 4 0 2 4 3 0 3 0 3 0 3 4 0 4 2 0 4 2 5 0 5 4 3 2 1            

From the table, we see that 2⋅4$\limfunc$mod6 = 2 and 3⋅3$\limfunc$mod6 = 3. (The extra horizontal and vertical lines were added for clarity, but are not essential. To use these typesetting features, you must first copy the matrix entries into a table, then revise the table.)

A more efficient way to generate the same multiplication table is to define g(i, j) = (i - 1)(j - 1)$\limfunc$mod6, then to add a row and a column to the original matrix. A clever way to make this table is to define g(i, j) = $\left\vert\vphantom{
i-2}\right.$i - 2$\left.\vphantom{
i-2}\right\vert$$\left\vert\vphantom{ j-2}\right.$j - 2$\left.\vphantom{ j-2}\right\vert$, choose Fill Matrix from the Matrices submenu, choose Defined by Function from the dialog box, specify g for the function, and set the matrix size to 7 rows and 7 columns. You can generate an addition table by defining g(i, j) = i + j - 2$\limfunc$mod6.



\begin{example}
If $p$\ is a prime, then the integers modulo $p$\ form a
\inde...
...
6 & 6 & 0 & 1 & 2 & 3 & 4 & 5
\end{tabular}
\end{displaymath}
\end{example}