# Getting a missing $inserted error at d' = a * d * \alpha . Any idea where it is? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} \begin{enumerate} \item Applying 2 fold symmetry // X$_1$: \\ \\ $a= \begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$ \\ $\alpha = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 \\ \end{bmatrix}$ \\ Applying 3 fold symmetry // X$_3$: \\ \\ $a= \begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$ \\ $\alpha_1 = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 \\ \end{bmatrix}$ \\ For d$_{im}$, \\ d' = a * d * \alpha $\begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$ \end{enumerate} \end{document}  • The d' = a * d * \alpha is outside math mode, but it needs math mode: $d' = a * d * \alpha$. But the whole code is ugly. You should avoid \\  before and after $…$. You should not use X$_3$ but $X_3$ etc. Sep 5, 2017 at 9:30 • Or perhaps something like $\text{x}_3, if the intent is a non-italic variable. (My memory is fuzzy on the correct command to use, though. \mathrm instead?) Sep 5, 2017 at 11:34

• math mode for d' = a * d * \alpha
• no linebreak inside $...$
• use align* instead of $...$
• use \cdot instead of *
• use linebreaks instead of \\
• use $X_1$ instead of X$_1$
• you can use \renewcommand{\arraystretch}{1.5} to increase the spacing of the matrices with the fractions (see How can I increase the line spacing in a matrix?) or write the fractions with $a/b$ as JPi suggested.

Code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\begin{enumerate}
\item
Applying 2 fold symmetry // $X_1$:
\begin{align*}
a &=
\begin{bmatrix}
1 & 0 & 0 \\
0 & -1 & 0 \\
0 & 0 & -1
\end{bmatrix}
\\
\alpha &=
\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & -1 & 0 \\
0 & 0 & 0 & 0 & 0 & -1 \\
\end{bmatrix}
\end{align*}

Applying 3 fold symmetry // $X_3$:
\begin{align*}
a &=
{
\renewcommand{\arraystretch}{1.5}
\begin{bmatrix}
\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\
\frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\
0 & 0 & 1
\end{bmatrix}
}
\\
\alpha_1 &=
\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & -1 & 0 \\
0 & 0 & 0 & 0 & 0 & -1 \\
\end{bmatrix}
\end{align*}

For $d_{im}$,
$d' = a \cdot d \cdot \alpha$
{
\renewcommand{\arraystretch}{1.5}
\begin{align*}
\begin{bmatrix}
\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\
\frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\
0 & 0 & 1
\end{bmatrix}
\\
\begin{bmatrix}
\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\
\frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\
0 & 0 & 1
\end{bmatrix}
\end{align*}
}
\end{enumerate}
\end{document}


Result:

• You've forgotten to list the adaption $X_1$ instead of X$_1$. Nevertheless +1 for listing all adaptions! Sep 5, 2017 at 9:39
• You may want to increase the spacing in the matrices or better yet: write $\sqrt{3}/2$ instead of $\frac{\sqrt{3}}{2}$.
– JPi
Sep 5, 2017 at 10:03
• Thank you Schweinebacke and JPi. I added your suggestions to the answer. Sep 5, 2017 at 10:51
• the width of the matrices in the first two blocks makes it easy to identify them as separate. but it wouldn't hurt to have a little vertical space between the two in the last block. add with an option after the double backslash separating them, say \$3pt] and be sure not to leave a (typed) space between the second backslash and the [. Sep 5, 2017 at 15:43 I did not do much, just corrected some shells - for \alpha, it can only be used in a mathematical environment, either \alpha or \[\alpha$ it is possible to print the \alpha character in a text, but then it is \textalpha. so I will avoid writing X$_1$ but rather $X_1$ to leave its coherence to the mathematical text. I also corrected some spaces generating in the mathematical formulas

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item
Applying 2 fold symmetry // X$_1$ :
\\
\\
$a= \begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$
\\
$\alpha = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 \\ \end{bmatrix}$
\\
Applying 3 fold symmetry // X$_3$:
\\
\\
$a= \begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$
\\
$\alpha_1 = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 \\ \end{bmatrix}$
\\
For d$_{im}$,
\\
$d' = a * d * \alpha$
$\begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}\\ \begin{bmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$
\end{enumerate}
\end{document}