# Thread: 4 Element by 4 Element Multiplication Table ...

1. 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.

2.

Originally Posted by MarkFL
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.

Thanks Mark ...

It is a real puzzle ... I did put [MATH] delimiters around the whole of the Latex Text in my most recent post entitled in the Linear and Abstract Algebra forum ...

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

4. Originally Posted by Peter
OK

I tried this in my post but the multiplication table failed to display ... can anyone see my error

$\displaystyle$
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. 5. Originally Posted by Peter Thanks Mark ... It is a real puzzle ... I did put [MATH] delimiters around the whole of the Latex Text in my most recent post entitled in the Linear and Abstract Algebra forum ... 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 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. 6. Thread Author Originally Posted by I like Serena 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 7. 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
matrix of math nodes
matrix of nodes
.
Then all nodes are already in math mode.
Other than that the solution is the same.

Latex Code:
\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}