4 Element by 4 Element Multiplication Table ....

In summary: Then it should work (I hope).When we put [MATH] tags or \$ symbols around $\LaTeX$, we put latex in so called math mode, so that it's easier to create mathematical formulas.With tags or \begin {tikzpicture} ... \end {tikzpicture} we put it in TikZ mode, so that it's easier to make pictures.Unfortunately, that means it's not in math mode.So it's complaining about the \times directive that it does not recognize, and more or less suggesting to use \$ symbols.We should put \$...$ signs around the entire content, except the begin and end lines.
  • #1
Math Amateur
Gold Member
MHB
3,998
48
What would be the easiest (but neat and readable) way of entering a 4 element by 4 element multiplication table ... ... for example the multiplication table for the field of 4 elements ... ...

Peter
 
Physics news on Phys.org
  • #2
Do you mean something like this?

\(\displaystyle \begin{array}{|c|c|c|c|c|} \hline & 1 & 2 & 3 & 4 \\ \hline 1 & 1 & 2 & 3 & 4 \\ \hline 2 & 2 & 4 & 6 & 8 \\ \hline 3 & 3 & 6 & 9 & 12 \\ \hline 4 & 4 & 8 & 12 & 16 \\ \hline \end{array}\)
 
  • #3
MarkFL said:
Do you mean something like this?

\(\displaystyle \begin{array}{|c|c|c|c|c|} \hline & 1 & 2 & 3 & 4 \\ \hline 1 & 1 & 2 & 3 & 4 \\ \hline 2 & 2 & 4 & 6 & 8 \\ \hline 3 & 3 & 6 & 9 & 12 \\ \hline 4 & 4 & 8 & 12 & 16 \\ \hline \end{array}\)
Yes ... thanks Mark ...

BUT ... would be so much better if there was a darker line (or some distinguishing line around first row and first colum to distinguish elements of the finite field from the results of multiplying them ...

Maybe I am being obsessively neat ... ...:)

Peter
 
  • #4
Peter said:
Yes ... thanks Mark ...

BUT ... would be so much better if there was a darker line (or some distinguishing line around first row and first colum to distinguish elements of the finite field from the results of multiplying them ...

Maybe I am being obsessively neat ... ...:)

Peter

I do agree that would be better, but I honestly don't know how to get MathJax to do that. :D
 
  • #5
Peter said:
BUT ... would be so much better if there was a darker line (or some distinguishing line around first row and first colum to distinguish elements of the finite field from the results of multiplying them ...
One way is to keep only those two lines and remove all the others: $$\begin{array}{c|cccc} + & a&b&c&d \\ \hline a&a&b&c&d\\ b&b&a&d&c \\ c&c&d&a&b \\ d&d&c&b&a \end{array}.$$
 
  • #6
MarkFL said:
I do agree that would be better, but I honestly don't know how to get MathJax to do that. :D
Thanks anyway Mark ...

Not many occasions when that happens ... ☺️

Peter

- - - Updated - - -

Opalg said:
One way is to keep only those two lines and remove all the others: $$\begin{array}{c|cccc} + & a&b&c&d \\ \hline a&a&b&c&d\\ b&b&a&d&c \\ c&c&d&a&b \\ d&d&c&b&a \end{array}.$$
Thanks Opalg ... yes, definitely one solution...

Peter
 
  • #7
How about:
\begin{tikzpicture}
\usetikzlibrary{matrix}
\matrix (m) [nodes={minimum width=2em,minimum height=2ex},matrix of nodes]
{
+&0&1&2&3\\
0&0&1&2&3\\
1&1&2&3&10\\
2&2&3&10&11\\
3&3&10&11&12\\
};
\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}
 
  • #8
I like Serena said:
How about:
\begin{tikzpicture}
\usetikzlibrary{matrix}
\matrix (m) [nodes={minimum width=2em,minimum height=2ex},matrix of nodes]
{
+&0&1&2&3\\
0&0&1&2&3\\
1&1&2&3&10\\
2&2&3&10&11\\
3&3&10&11&12\\
};
\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}
Thanks I like Serena ... excellent ...

... but ... takes a bit of effort ... :)

Peter
 
  • #9
Peter said:
Thanks I like Serena ... excellent ...

... but ... takes a bit of effort ... :)

Peter

The matrix itself is exactly the same as it is in regular $\LaTeX$.
And we can embellish it using TikZ, which is really a bit of copy-and-paste.
If you're going to create more than one or two tables, we can probably come up with an easy way to do it for all of them.
 
  • #10
I like Serena said:
The matrix itself is exactly the same as it is in regular $\LaTeX$.
And we can embellish it using TikZ, which is really a bit of copy-and-paste.
If you're going to create more than one or two tables, we can probably come up with an easy way to do it for all of them.
OK

I tried this in my post but the multiplication table failed to display ... can anyone see my error\(\displaystyle \begin{tikzpicture}
\usetikzlibrary{matrix}
\matrix (m) [nodes={minimum width=2em,minimum height=2ex},matrix of nodes]
{
\times & 0 & 1 & \theta & \theta + 1 \\
0&0&0&0&0\\
1&0&1& \theta & \theta + 1 \\
\theta & 0 & \theta & \theta + 1 & 1 \\
\theta +1 & 0 & \theta + 1 & 1 & \theta \\
};
\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}\)
 
  • #11
You need to wrap any $\LaTeX$ in dollar-sign delimiters, however then an error regarding the matrix m being unrecognized crops up, and I don't see why. :D
 
  • #12
MarkFL said:
You need to wrap any $\LaTeX$ in dollar-sign delimiters, however then an error regarding the matrix m being unrecognized crops up, and I don't see why. :D
Thanks Mark ...

It is a real puzzle ... I did put \(\displaystyle delimiters around the whole of the Latex Text in my most recent post entitled[h=1] http://mathhelpboards.com/linear-abstract-algebra-14/field-extensions-finite-fields-dummit-foote-section-13-2-exercise-2-a-21441.html in the Linear and Abstract Algebra forum ... [/h]
Hope someone can figure out what is wrong ...

All I did was replace I like Serena's numbers with the values of the finite field multiplication table ...

Remains a mystery what went wrong ...

... BUT ... thanks again for your help ...

Peter\)
 
  • #13
Peter said:
OK

I tried this in my post but the multiplication table failed to display ... can anyone see my error\(\displaystyle \begin{tikzpicture}
\usetikzlibrary{matrix}
\matrix (m) [nodes={minimum width=2em,minimum height=2ex},matrix of nodes]
{
\times & 0 & 1 & \theta & \theta + 1 \\
0&0&0&0&0\\
1&0&1& \theta & \theta + 1 \\
\theta & 0 & \theta & \theta + 1 & 1 \\
\theta +1 & 0 & \theta + 1 & 1 & \theta \\
};
\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}\)

When we put [MATH] tags or \$ symbols around $\LaTeX$, we put latex in so called math mode, so that it's easier to create mathematical formulas.

With [TIKZ] tags or \begin {tikzpicture} ... \end {tikzpicture} we put it in TikZ mode, so that it's easier to make pictures.
Unfortunately, that means it's not in math mode.
So it's complaining about the \times directive that it does not recognize, and more or less suggesting to use \$ symbols.
We should put \$ symbols around the symbols that should be rendered in math mode.

Code:
\begin{tikzpicture}
\usetikzlibrary{matrix}

\matrix (m) [nodes={minimum width=3em,minimum height=3ex},matrix of nodes]
{
$\times$ & 0 & 1 & $\theta$ & $\theta + 1$ \\
0&0&0&0&0\\
1&0&1& $\theta$ & $\theta + 1$ \\
$\theta$ & 0 & $\theta$ & $\theta + 1$ & 1 \\
$\theta + 1$  & 0 & $\theta + 1$ & 1 & $\theta$ \\
};

\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
  \draw (m-1-\x.north east) -- (m-5-\x.south east);
  \draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}

[TIKZ]
\usetikzlibrary{matrix}
\matrix (m) [nodes={minimum width=3em,minimum height=3ex},matrix of nodes]
{
$\times$ & 0 & 1 & $\theta$ & $\theta + 1$ \\
0&0&0&0&0\\
1&0&1& $\theta$ & $\theta + 1$ \\
$\theta$ & 0 & $\theta$ & $\theta + 1$ & 1 \\
$\theta + 1$ & 0 & $\theta + 1$ & 1 & $\theta$ \\
};
\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
[/TIKZ]
 
  • #14
Peter said:
Thanks Mark ...

It is a real puzzle ... I did put \(\displaystyle delimiters around the whole of the Latex Text in my most recent post entitled[h=1] http://mathhelpboards.com/linear-abstract-algebra-14/field-extensions-finite-fields-dummit-foote-section-13-2-exercise-2-a-21441.html in the Linear and Abstract Algebra forum ... [/h]
Hope someone can figure out what is wrong ...

All I did was replace I like Serena's numbers with the values of the finite field multiplication table ...

Remains a mystery what went wrong ...

... BUT ... thanks again for your help ...

Peter\)
\(\displaystyle

I've edited your post to fix the table.
That is, I've removed the superfluous \$ around it.
Instead I've put \$ symbols around \times and \theta where they occur.
And I've increased the minimum width in the matrix to 3em, so that the columns align properly.\)
 
  • #15
I like Serena said:
I've edited your post to fix the table.
That is, I've removed the superfluous \$ around it.
Instead I've put \$ symbols around \times and \theta where they occur.
And I've increased the minimum width in the matrix to 3em, so that the columns align properly.
Thank you for all your help ...

Your posts have been exceedingly helpful!

Peter
 
  • #16
My previous TikZ suggestion had the 'problem' that math symbols had to have \$ symbols around them.
Turns out there is a better way by using a [M]matrix of math nodes[/M] instead of a [M]matrix of nodes[/M].
Then all nodes are already in math mode.
Other than that the solution is the same.
\begin{tikzpicture}
\usetikzlibrary{matrix}

\matrix (m) [nodes={minimum width=3em,minimum height=3ex},matrix of math nodes]
{
\times & 0 & 1 & \theta & \theta + 1 \\
0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & \theta & \theta + 1\\
\theta & 0 & \theta & \theta + 1 & 1 \\
\theta + 1 & 0 & \theta + 1 & 1 & \theta \\
};

\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}
[latexs]\begin{tikzpicture}
\usetikzlibrary{matrix}

\matrix (m) [nodes={minimum width=3em,minimum height=3ex},matrix of math nodes]
{
\times & 0 & 1 & \theta & \theta + 1 \\
0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & \theta & \theta + 1\\
\theta & 0 & \theta & \theta + 1 & 1 \\
\theta + 1 & 0 & \theta + 1 & 1 & \theta \\
};

\draw[very thick] (m-1-1.north east) -- (m-5-1.south east);
\draw[very thick] (m-1-1.south west) -- (m-1-5.south east);
\foreach \x in {2,...,5}{
\draw (m-1-\x.north east) -- (m-5-\x.south east);
\draw (m-\x-1.south west) -- (m-\x-5.south east);
}
\end{tikzpicture}[/latexs]
 

FAQ: 4 Element by 4 Element Multiplication Table ....

What is a 4 Element by 4 Element Multiplication Table?

A 4 Element by 4 Element Multiplication Table is a mathematical representation of the multiplication operation between two sets of numbers, each containing four elements. It is a grid with four rows and four columns, where the number in each cell is the product of the corresponding numbers in the row and column headers.

How do you read a 4 Element by 4 Element Multiplication Table?

To read a 4 Element by 4 Element Multiplication Table, you start by identifying the two numbers you want to multiply in the row and column headers. Then, find the cell where the row and column intersect, and the number in that cell is the product of the two numbers.

What is the purpose of a 4 Element by 4 Element Multiplication Table?

The purpose of a 4 Element by 4 Element Multiplication Table is to make it easier to perform multiplication calculations. It allows for quick and easy lookup of products without having to use a calculator or do mental math.

How is a 4 Element by 4 Element Multiplication Table useful in real life?

A 4 Element by 4 Element Multiplication Table can be useful in many real-life situations, such as calculating prices when shopping, calculating tip amounts, or determining the total cost of multiple items. It can also be used in more advanced mathematics, such as algebra and geometry.

What are some other types of multiplication tables?

Aside from the 4 Element by 4 Element Multiplication Table, there are also 2 Element by 2 Element, 3 Element by 3 Element, and 5 Element by 5 Element Multiplication Tables. There are also multiplication tables for larger numbers, such as the 10 Element by 10 Element Multiplication Table. Additionally, there are multiplication tables for specific mathematical operations, such as square roots or powers.

Similar threads

Replies
32
Views
3K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
24
Views
3K
Replies
15
Views
2K
Replies
15
Views
2K
Replies
13
Views
3K
Back
Top