I have a trouble writing a mathematical mapping inside a box written with the \begin{tabular} environment. The map is denoted by · (a dot) and goes from GxG to G (is closed). I'm trying to write the following text inside a table, like this:

\begin{tabular}{| c |}
    \cdot \ : \  G \times G & \longmapsto G
    (g,h) & \longmapsto g \cdot h = gh

This gives some kind of error when I write the & separator and I don't know why. How can I write this mapping inside my table?

  • 1
    Can you please add an MWE so we know which document class and packages you are using? Commented Jul 27, 2023 at 19:53

1 Answer 1


You cannot use align* in a table cell.

You can instead use aligned, but tabular is not needed.



    {\cdot} : G \times G & \longrightarrow G \\
    (g,h) & \longmapsto g \cdot h = gh


enter image description here

  • Should \colon be used in this case?
    – Sigur
    Commented Jul 27, 2023 at 20:46
  • @Sigur I changed it to : after seeing the result, because of \cdot. To be honest, I'd not name the map with \cdot (which is not the name of the map, but notation for it).
    – egreg
    Commented Jul 27, 2023 at 21:08
  • I agree. But it is common to find text using such diagram to denote the binary operation. \cdot\colon looks ugly... lol
    – Sigur
    Commented Jul 27, 2023 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .