I'm struggling with aligning my equations and provide a number for them. I googled but haven't found a solution for the array environment.
I tried the align
env. but only with the array
env. I managed to get the result I was looking for.
Now I want to label the two conversation equations at the end of the line (preferably vertically centered).
\documentclass[12pt,a4paper]{scrartcl}
\usepackage{amsmath}
\usepackage{amssymb,amsthm}
\begin{document}
\begin{equation}
\begin{array}{lrcl}
\textbf{Conservation of energy} & E_{kin} &=& E'_{kin} \\
& m_1 v_1^2 + m_2 v_2^2 &=& m_1 {v'}_{1}^{2} + m_2 {v'}_{2}^{2} \\
& m_1 (v_1^2 - {v'}_1^2) &=& m_2 ({v'}_2^2 - v_2^2) \\
& m_1 (v_1 + {v'}_1) (v_1 - {v'}_1) &=& m_2 ({v'}_2 + v_2) ({v'}_2 - v_2) \\
\\
\textbf{Conservation of momentum} & p &=& p' \\
& m_1 v_1 + m_2 v_2 &=& m_1 {v'}_1 + m_2 {v'}_2\\
& m_1 (v_1 - {v'}_1) &=& m_2 ({v'}_2 - v_2)\\
\end{array}
\end{equation}
\end{document}
To make it clearer: I want the black number to be gone and the red numbers to appear:
Best Answer
amsmath has several environments designed to number each row, or as here number the group as a whole. Do not use
array
for such display constructs the spacing and style are not designed for that.