# Equation numbering latex problem

I don't know where the error in my equation or numbering code is, but everything is red. I tried fixing it, but as I am a newby with latex I didnt find a solution.

Can someone help me with that?

I want to number those equations: For the first one, I can see the equation number, but for the others it doesn't work..

\vspace{22pt}
\begin{centering}
\begin{align} \begin{array}{rrrr} m\textsubscript{11} & m\textsubscript{12} & m\textsubscript{13} & m\textsubscript{14} \\ m\textsubscript{21} & m\textsubscript{22} & m\textsubscript{23} & m\textsubscript{24} \\ m\textsubscript{31} & m\textsubscript{32} & m\textsubscript{33} & m\textsubscript{34} \\ m\textsubscript{41} & m\textsubscript{42} & m\textsubscript{43} & m\textsubscript{44} \\ \end {array} \end{align}

$$$\left( \begin{array}{rrrr} 0 & 0 & 1 & t\textsubscript{x} \\ -1 & 0 & 0 & t\textsubscript{y} \\ 0 & -1 & 0 & t\textsubscript{z} \\ 0 & 0 & 0 & 1 \end{array} \right) % \left( \begin{array}{rrrr} x \\ y \\ z \\ 1 \\ \end{array} \right)$$$
\end{centering}

\vspace{22pt}

\subsubsection{Translation matrix}
\par

TEXT

\begin{align} $\left( \begin{array}{rrrr} 0 & 0 & 1 & 5.39 \\ -1 & 0 & 0 & 6.26\\ 0 & -1 & 0 & 4.275 \\ 0 & 0 & 0 & 1 \end{array} \right) % \left( \begin{array}{rrrr} x \\ y \\ z \\ 1 \\ \end{array} \right)$ \end{alignn}
\vspace{22pt}


It looks like that:

• Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. Jun 15, 2020 at 11:46
• you can not have blank lines in equation, but also you should not have align inside equation, and do not surround it with \begin{centering} so just have You do not want align here Jun 15, 2020 at 11:53
• (1) no blank lines in math mode, (2) align inside equation does not make sense, (3) references to equation numbers are made using \label and \ref none of which are in this example Jun 15, 2020 at 11:53
• for the later ones remove \[ do not ignore errors, if you get a tex error ask about the error message, not about the generated pdf (which is not intended to be usable after an error) Jun 15, 2020 at 11:57
• I tried to change my code with your suggestions, but I still can't see the numbers.. and still a lot of red lines..
– Anja
Jun 15, 2020 at 11:59

With use of the mathtools and siunitx package and considering comments to your question, one of among possible solutions is:

\documentclass{article}
\usepackage{mathtools}
\usepackage{siunitx}

\begin{document}
$$\begin{pmatrix} m^{11} & m^{12} & m^{13} & m^{14} \\ m^{21} & m^{22} & m^{23} & m^{24} \\ m^{31} & m^{32} & m^{33} & m^{34} \\ m^{41} & m^{42} & m^{43} & m^{44} \\ \end{pmatrix}$$

$$\begin{pmatrix*}[r] 0 & 0 & 1 & t\textsubscript{x} \\ -1 & 0 & 0 & t\textsubscript{y} \\ 0 & -1 & 0 & t\textsubscript{z} \\ 0 & 0 & 0 & 1 \end{pmatrix*}\begin{pmatrix} x \\ y \\ z \\ 1 \\ \end{pmatrix}$$

\subsubsection{Translation matrix}
TEXT

$$\left(\begin{array}{rrrS[table-format=1.3]} 0 & 0 & 1 & 5.39 \\ -1 & 0 & 0 & 6.26\\ 0 & -1 & 0 & 4.275 \\ 0 & 0 & 0 & 1 \end{array}\right)\begin{pmatrix} x \\ y \\ z \\ 1 \\ \end{pmatrix}$$
\end{document}